/* ==========================================================================
   Chesapeake Financial Planners: posts, archives, search, 404 and generic pages.
   Header, call-to-action band and footer come from cfp-chrome.css (variables included).
   Typography follows what the Pro-built layouts printed: Russo One headings, Poppins body, 14px root,
   #131313 text, #0171bb links, navy #003366 headline colour.
   ========================================================================== */

html { font-size: 14px; }

/* ===================== SINGLE POST ===================== */
.cfp-post-hero { background: var(--surface-gray); margin: 20px 0 0; padding: 0; }
.cfp-post-hero-grid { display: grid; grid-template-columns: 2fr 1fr; align-items: center; gap: 4vw; padding: 20px 0; }
.cfp-post-hero-grid.no-image { grid-template-columns: 1fr; }
.cfp-post-title { font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--navy); margin: 0; text-align: left; }
.cfp-post-image { display: flex; justify-content: center; }
.cfp-post-image img { display: block; width: 100%; height: auto; max-width: 688px; border-radius: 6px; }
.cfp-post-body { background: #fff; padding: 40px 0; }
.cfp-post-wrap { max-width: 1100px; }

.entry-content { font-size: 1rem; line-height: 1.7; color: var(--text-dark); overflow-wrap: break-word; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content > :first-child { margin-top: 0; }
.entry-content p { margin: 0 0 1.313em; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { font-family: var(--font-display); font-weight: 400; color: var(--text-dark); line-height: 1.25; margin: 1.6em 0 0.6em; clear: none; }
.entry-content h1 { font-size: 36px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--navy); margin-top: 0; }
.entry-content h2 { font-size: 28px; color: var(--navy); }
.entry-content h3 { font-size: 21px; }
.entry-content h4 { font-size: 18px; }
.entry-content h5, .entry-content h6 { font-size: 16px; }
.entry-content .cfp-dup-title { display: none; }
.entry-content a { color: var(--brand-blue); text-decoration: underline; text-underline-offset: 2px; }
.entry-content p a { font-weight: 700; }
.entry-content a:hover, .entry-content a:focus { color: var(--navy); }
.entry-content ul, .entry-content ol { margin: 0 0 1.313em; padding-left: 1.6em; }
.entry-content li { margin: 0 0 0.45em; }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--brand-blue); color: var(--text-muted); }
.entry-content blockquote p { font-size: 18px; margin: 0; }
.entry-content hr, .entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--border-light); margin: 2em 0; clear: both; }
.entry-content figure { margin: 0 0 1.4em; }
.entry-content figcaption { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.entry-content .wp-block-table { overflow-x: auto; margin: 0 0 1.6em; clear: both; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.entry-content th, .entry-content td { border: 1px solid #cfd6dd; padding: 9px 12px; text-align: left; vertical-align: top; }
.entry-content thead th, .entry-content tr:first-child th { background: var(--navy); color: #fff; border-color: var(--navy); }
.entry-content .wp-block-buttons { margin: 0 0 1.6em; }
.entry-content .wp-block-button__link, .entry-content .wp-element-button { display: inline-block; background: var(--brand-blue); color: #fff; font-weight: bold; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; text-decoration: none; padding: 14px 28px; border-radius: 3px; }
.entry-content .wp-block-button__link:hover, .entry-content .wp-element-button:hover { background: var(--navy); color: #fff; }
.entry-content .wp-block-file { margin: 0 0 1.4em; }
.entry-content .wp-block-file a:not(.wp-block-file__button) { font-weight: 700; }
.entry-content .wp-block-file .wp-block-file__button { background: var(--brand-blue); color: #fff; border-radius: 3px; padding: 8px 18px; font-size: 13px; text-decoration: none; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content .aioseo-author-bio-compact { clear: both; }
.entry-content img.aioseo-author-bio-compact-image { max-width: 180px; }
.cfp-page-links { margin: 1.6em 0 0; font-weight: bold; }

.cfp-share { display: flex; align-items: center; gap: 18px; margin: 54px 0 0; padding-top: 24px; border-top: 1px solid rgba(10,37,64,0.11); }
.cfp-share-label { font-size: 18px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--text-dark); }
.cfp-share-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cfp-share-list a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #0a2540; border-radius: 50%; transition: color .2s ease; }
.cfp-share-list a:hover, .cfp-share-list a:focus { color: #0073e6; }

/* ===================== ARCHIVE / SEARCH / 404 ===================== */
.cfp-band { position: relative; margin: 20px 0; padding: 70px 0; background: var(--navy); color: #fff; text-align: center; }
.cfp-band h1 { font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 1.15; text-transform: uppercase; margin: 0; color: #fff; overflow-wrap: anywhere; }
.cfp-band-intro { max-width: 760px; margin: 18px auto 0; font-size: 16px; color: #eef3f8; }
.cfp-listing { padding: 24px 0 56px; }
.cfp-archive-intro { max-width: 820px; margin: 0 auto 32px; font-size: 16px; line-height: 1.6; color: var(--text-muted); text-align: center; }
.cfp-archive-intro p { margin: 0 0 1em; }
.cfp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cfp-card { margin: 0; }
.cfp-card-link { display: flex; flex-direction: column; height: 100%; border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; overflow: hidden; color: var(--text-dark); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.cfp-card-link:hover, .cfp-card-link:focus { border-color: #a6c9e3; box-shadow: 0 5px 16px rgba(0,51,102,.09); transform: translateY(-2px); }
.cfp-card-media { display: block; aspect-ratio: 704 / 376; background: linear-gradient(140deg, #003366 0%, #0171bb 100%); overflow: hidden; }
.cfp-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cfp-card-ph { display: block; width: 100%; height: 100%; }
.cfp-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; }
.cfp-card-date { font-size: 12px; font-weight: bold; color: #737373; }
.cfp-card-title { font-family: var(--font-display); font-size: 17px; line-height: 1.35; color: var(--text-dark); }
.cfp-card-link:hover .cfp-card-title, .cfp-card-link:focus .cfp-card-title { color: var(--brand-blue); }
.cfp-empty { text-align: center; font-size: 16px; color: var(--text-muted); margin: 24px 0; }
.cfp-empty a, .cfp-notfound a:not(.cfp-btn) { color: var(--brand-blue); font-weight: 700; }

/* Full-width pager: Newer | numbers | Older (same behaviour as the Perspectives index) */
nav.cfp-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 12px; width: 100%; margin: 34px 0 0; padding: 0; text-align: center; }
.cfp-pagination .cfp-pager-numbers { grid-column: 2; display: flex; flex-flow: row wrap; justify-content: center; align-items: center; gap: 6px; }
.cfp-pagination .cfp-pager-prev { grid-column: 1; justify-self: start; }
.cfp-pagination .cfp-pager-next { grid-column: 3; justify-self: end; }
.cfp-pagination .cfp-pager-item { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; margin: 0; padding: 7px 11px; border: 1px solid #e2e2e2; border-radius: 4px; color: var(--navy); font-size: 14px; font-weight: bold; line-height: 1.2; text-decoration: none; white-space: nowrap; background: #fff; }
.cfp-pagination .cfp-pager-item.current, .cfp-pagination a.cfp-pager-item:hover { border-color: var(--brand-blue); background: var(--brand-blue); color: #fff; }
.cfp-pagination .cfp-pager-item.dots { border-color: transparent; background: none; min-width: 0; }

/* Search form + 404 */
.cfp-search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 32px; }
.cfp-search input[type="search"] { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid #c9ced3; border-radius: 4px; color: var(--text-dark); background: #fff; }
.cfp-search button, .cfp-btn { display: inline-block; font: inherit; font-size: 13px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.03em; color: #fff; background: var(--brand-blue); border: 0; border-radius: 3px; padding: 13px 24px; cursor: pointer; text-decoration: none; }
.cfp-search button:hover, .cfp-btn:hover, .cfp-search button:focus, .cfp-btn:focus { background: var(--navy); color: #fff; }
.cfp-notfound { text-align: center; font-size: 16px; line-height: 1.6; }
.cfp-notfound-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }

@media (max-width: 980px) {
  .cfp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfp-post-hero-grid { grid-template-columns: 1fr; gap: 18px; padding: 24px 0; }
  .cfp-post-image { justify-content: flex-start; }
}
@media (max-width: 700px) {
  .cfp-grid { grid-template-columns: 1fr; }
  .cfp-post-title { font-size: 26px; }
  .cfp-band { padding: 44px 0; }
  .cfp-band h1 { font-size: 30px; }
  .entry-content h1 { font-size: 26px; }
  .entry-content h2 { font-size: 22px; }
  .entry-content .wp-block-image { float: none; margin: 0 0 1.2em; }
  .entry-content .wp-block-image.alignright { float: none; margin: 0 0 1.2em; }
  nav.cfp-pagination { grid-template-columns: 1fr 1fr; row-gap: 12px; }
  .cfp-pagination .cfp-pager-numbers { grid-column: 1 / -1; grid-row: 1; }
  .cfp-pagination .cfp-pager-prev { grid-column: 1; grid-row: 2; }
  .cfp-pagination .cfp-pager-next { grid-column: 2; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .cfp-card-link { transition: none; } .cfp-card-link:hover { transform: none; } }
