/* ═══════════════════════════════════════════════════════════════
   NEWS — listing (/news) and articles (/news/{slug})
   Layout follows the DealerGreeter blog reference; colors, type and buttons are ExtendedQuick's
   (branding.css tokens, Figtree, action blue for buttons and small text on light backgrounds).
   Header (_SiteNav) and footer (_LandingFooter) keep their own styles.
   ═══════════════════════════════════════════════════════════════ */
.news-page {
  --news-ink: var(--brand-ink-navy);
  --news-prose: #17324a;
  --news-slate: #4a5e6d;          /* 6.4:1 on white, 6:1 on --news-cloud */
  --news-link: var(--brand-action-blue);
  --news-hairline: #dce6ee;
  --news-mist: #c3d3df;
  --news-cloud: #f6f9fc;
  --news-ice: #eaf3fa;
  --news-cyan-wash: #e2f4fb;
  --news-r-card: 20px;
  --news-r-panel: 24px;
  --news-shadow: 0 1px 2px rgba(var(--brand-ink-navy-rgb), .05), 0 12px 32px rgba(var(--brand-ink-navy-rgb), .07);
  --news-shadow-hover: 0 1px 2px rgba(var(--brand-ink-navy-rgb), .06), 0 16px 40px rgba(var(--brand-ink-navy-rgb), .13);
  --news-ease: cubic-bezier(.22, 1, .36, 1);
  background: #fff;
  color: var(--news-ink);
  overflow-x: hidden;
}
.news-page main { display: block; }
.news-page h1,
.news-page h2,
.news-page h3 { font-family: var(--font-family-display); color: var(--news-ink); margin: 0; }
.news-page main p,
.news-page main ul,
.news-page main ol,
.news-page main figure { margin: 0; }
.news-page :focus-visible { outline: 3px solid var(--news-link); outline-offset: 3px; border-radius: 6px; }
.news-page .news-cta :focus-visible { outline-color: #fff; }
html:has(.news-page) { scroll-padding-top: calc(var(--nav-h) + 24px); }

/* ─── Shared bits ───────────────────────── */
.news-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 15px; color: var(--news-slate); }
.news-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--news-slate); }
.news-crumbs a:hover { color: var(--news-ink); text-decoration: underline; }
.news-crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--news-mist); }

/* Section label: cyan line + uppercase text (site pattern). Text in action blue for contrast. */
.news-eyebrow { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--news-link); }
.news-eyebrow::before { content: ""; width: 32px; height: 3px; border-radius: 3px; background: var(--brand-primary-cyan); }

.news-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.news-tag { font-size: 13px; font-weight: 700; line-height: 1.5; padding: 3px 10px; border-radius: 999px; background: var(--news-ice); color: var(--news-ink); }
.news-tag--marine { background: var(--news-cyan-wash); color: #00557f; }
.news-tag--rv { background: #e7ecf1; color: var(--brand-field-navy); }

.news-meta { font-size: 14px; color: var(--news-slate); }

.news-title-link { color: var(--news-ink); text-decoration: none; background-image: linear-gradient(var(--brand-primary-cyan), var(--brand-primary-cyan)); background-repeat: no-repeat; background-size: 0 2px; background-position: 0 100%; transition: background-size .24s var(--news-ease); }
.news-title-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.news-title-link:hover { color: var(--news-ink); background-size: 100% 2px; }

.news-thumb { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--news-ice); }
.news-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--news-ease); }
.news-feature:hover .news-thumb img,
.news-post:hover .news-thumb img,
.news-pick:hover .news-thumb img { transform: scale(1.05); }

.news-btn-ghost { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .7); }
.news-btn-ghost:hover { background: #fff; color: var(--brand-ink-navy); border-color: #fff; transform: translateY(-2px); }

/* ─── Listing: top ──────────────────────── */
.news-top {
  padding: calc(var(--nav-h) + 28px) 0 0;
  border-bottom: 1px solid var(--news-hairline);
  background:
    radial-gradient(800px 420px at 8% -120px, rgba(var(--brand-primary-cyan-rgb), .22), transparent 70%),
    radial-gradient(800px 460px at 94% -100px, rgba(var(--brand-action-blue-rgb), .16), transparent 70%),
    #fff;
  background-repeat: no-repeat;
}
.news-top__in { display: flex; flex-direction: column; gap: 8px; }
.news-top__in > nav { margin-bottom: -6px; }
.news-top h1 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.news-top__lead { font-size: 20px; line-height: 1.55; color: var(--news-slate); max-width: 60ch; }

.news-filters { position: relative; display: flex; gap: 28px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.news-filters::-webkit-scrollbar { display: none; }
.news-filters[hidden] { display: none; }
.news-filter { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 52px; padding: 12px 2px; border: 0; border-bottom: 3px solid transparent; background: transparent; font: inherit; font-size: 17px; font-weight: 700; color: var(--news-slate); text-decoration: none; cursor: pointer; transition: border-color .24s var(--news-ease), color .16s var(--news-ease); }
.news-filter:hover { color: var(--news-ink); border-bottom-color: var(--news-mist); }
.news-filter small { font-size: 13px; font-weight: 600; color: var(--news-slate); font-variant-numeric: tabular-nums; }
.news-filter[aria-current="page"] { color: var(--news-ink); border-bottom-color: var(--brand-primary-cyan); }
/* Sliding underline (news.js moves it under the current tab; without JS the tab's own border shows). */
.news-filters__bar { position: absolute; left: 0; bottom: 0; width: 0; height: 3px; border-radius: 3px; background: var(--brand-primary-cyan); opacity: 0; pointer-events: none; transition: transform .38s var(--news-ease), width .38s var(--news-ease); }
.news-filters.is-enhanced .news-filters__bar { opacity: 1; }
.news-filters.is-enhanced .news-filter[aria-current="page"] { border-bottom-color: transparent; }
.news-filters.is-enhanced .news-filter:hover { border-bottom-color: transparent; }

/* Topic switch: content fades out, is replaced, then fades back in. */
[data-news-lede],
.news-grid-head,
[data-news-posts] { transition: opacity .2s ease, transform .2s ease; }
.news-list.is-swapping [data-news-lede],
.news-list.is-swapping .news-grid-head,
.news-list.is-swapping [data-news-posts] { opacity: 0; transform: translateY(10px); }

/* ─── Listing: featured + picks ─────────── */
.news-list { background: var(--news-cloud); padding-bottom: 8px; }
.news-lede { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; align-items: stretch; padding-top: 32px; }
.news-feature,
.news-picks,
.news-post { background: #fff; border: 1px solid var(--news-hairline); box-shadow: var(--news-shadow); }
.news-feature { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--news-r-panel); transition: box-shadow .24s var(--news-ease), transform .24s var(--news-ease); }
.news-feature:hover { box-shadow: var(--news-shadow-hover); transform: translateY(-3px); }
/* Pibank-style feature: title over the photo on a navy gradient. */
.news-feature__thumb { flex: 1; aspect-ratio: auto; min-height: 360px; }  /* fills the row: same height as Highlights */
/* The photo adapts to the card (absolute), so the row height comes from Highlights, not from the photo's proportions. */
.news-feature__thumb img { position: absolute; inset: 0; }
.news-feature__body { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 10px; padding: 96px 28px 26px; background: linear-gradient(180deg, rgba(var(--brand-field-navy-rgb), 0) 0%, rgba(var(--brand-field-navy-rgb), .78) 45%, rgba(var(--brand-field-navy-rgb), .94) 100%); }
.news-feature h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: #fff; max-width: 26ch; }
.news-feature .news-title-link,
.news-feature .news-title-link:hover { color: #fff; }
.news-feature .news-meta { color: rgba(255, 255, 255, .88); }
.news-feature__body > p:not(.news-meta) { font-size: 18px; line-height: 1.55; color: var(--news-slate); max-width: 60ch; }

.news-lede--single { grid-template-columns: minmax(0, 1fr); }
.news-lede--single .news-feature__thumb { flex: none; min-height: 0; aspect-ratio: 16 / 6.5; }
.news-picks[hidden] { display: none; }
.news-picks { display: flex; flex-direction: column; padding: 24px; border-radius: var(--news-r-panel); }
.news-picks h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.news-pick { flex: 1; position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--news-hairline); }
.news-picks h2 + .news-pick { border-top: 0; }
.news-pick__thumb { flex: 0 0 92px; width: 92px; aspect-ratio: 1; border-radius: 14px; }
.news-pick h3 { font-size: 17px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.news-pick .news-meta { margin-top: 4px; }

/* ─── Listing: grid ─────────────────────── */
.news-grid-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding: 56px 0 20px; }
.news-grid-head h2 { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.news-count { font-size: 15px; color: var(--news-slate); }
.news-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 28px; }
.news-post { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--news-r-card); transition: box-shadow .24s var(--news-ease), transform .24s var(--news-ease), border-color .24s var(--news-ease); }
.news-post:hover { box-shadow: var(--news-shadow-hover); transform: translateY(-4px); border-color: var(--news-mist); }
.news-post[hidden] { display: none; }
.news-post__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.news-post h3 { font-size: 21px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; }
.news-post .news-meta { margin-top: auto; padding-top: 8px; }
.news-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--news-slate); background: #fff; border: 1px dashed var(--news-mist); border-radius: var(--news-r-card); }
.news-empty[hidden] { display: none; }
.news-more { display: flex; justify-content: center; padding: 40px 0 0; }
.news-more .btn[hidden] { display: none; }

/* ─── CTA band (navy, cyan glow) ────────── */
.news-cta-sec { padding: 88px 0 96px; }
.news-list + .news-cta-sec { background: var(--news-cloud); }
.news-cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: clamp(36px, 5vw, 72px);
  border-radius: 32px;
  color: #fff;
  isolation: isolate;
  background: var(--brand-field-navy);
}
/* Background photo (marine by default, RV while the RV button is hovered or focused) under the navy color filter. */
.news-cta__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .6s var(--news-ease), transform 1.2s var(--news-ease); }
.news-cta[data-photo="marine"] .news-cta__photo--marine,
.news-cta[data-photo="rv"] .news-cta__photo--rv { opacity: 1; transform: none; }
.news-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(720px 440px at 0% 100%, rgba(var(--brand-primary-cyan-rgb), .30), transparent 60%),
    linear-gradient(90deg, rgba(var(--brand-field-navy-rgb), .94) 0%, rgba(var(--brand-field-navy-rgb), .86) 45%, rgba(var(--brand-field-navy-rgb), .55) 100%);
}
.news-cta h2 { color: #fff; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; max-width: 640px; text-wrap: balance; }
.news-cta p { margin-top: 10px; max-width: 560px; font-size: 18px; color: rgba(255, 255, 255, .82); }
.news-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ─── Article ───────────────────────────── */
.news-progress { position: fixed; left: 0; top: 0; z-index: 1001; width: 100%; height: 4px; background: linear-gradient(90deg, var(--brand-primary-cyan), var(--brand-action-blue)); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }
.news-a-head { grid-area: head; display: flex; flex-direction: column; gap: 12px; }
.news-a-head h1 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
.news-dek { font-size: 19px; line-height: 1.5; color: var(--news-slate); max-width: 62ch; }
.news-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 6px; font-size: 15px; color: var(--news-slate); }
.news-byline b { display: block; font-size: 16px; color: var(--news-ink); }
.news-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-field-navy); color: var(--brand-primary-cyan); font-size: 15px; font-weight: 800; letter-spacing: .02em; }

.news-cover { grid-area: cover; margin: 8px 0 0 !important; }
.news-cover img { display: block; width: 100%; aspect-ratio: 21 / 8; object-fit: cover; border-radius: var(--news-r-panel); background: var(--news-ice); }

/* Whole article on one grid, aligned with the site container: contents on the right from the top;
   header, cover and body share the right column so their left edges line up. */
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; grid-template-areas: "head toc" "cover toc" "body toc"; column-gap: 64px; row-gap: 24px; align-items: start; max-width: var(--container); margin: 0 auto; padding: calc(var(--nav-h) + 24px) 1.5rem 0; }
.news-layout > .news-prose { grid-area: body; margin-top: 16px; }
.news-toc { grid-area: toc; align-self: start; position: sticky; top: calc(var(--nav-h) + 32px); display: flex; flex-direction: column; gap: 20px; }
.news-toc h2 { font-family: var(--font-family-text); font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--news-slate); }
.news-toc ol { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--news-hairline); }
.news-toc a { display: block; margin-left: -2px; padding: 9px 0 9px 16px; border-left: 2px solid transparent; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--news-slate); text-decoration: none; transition: color .16s var(--news-ease), border-color .24s var(--news-ease); }
.news-toc a:hover { color: var(--news-ink); }
.news-toc a.is-active { color: var(--news-ink); border-left-color: var(--brand-primary-cyan); }
.news-share { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.news-share__btn { min-height: 44px; padding: 9px 16px; font-size: 15px; }
.news-share__status { min-height: 20px; font-size: 14px; font-weight: 600; color: var(--news-link); }

.news-prose { max-width: 68ch; font-size: 19px; line-height: 1.7; color: var(--news-prose); }
.news-prose > * + * { margin-top: 1.15em !important; }
.news-prose h2 { margin-top: 1.9em !important; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; font-weight: 800; letter-spacing: -.025em; scroll-margin-top: calc(var(--nav-h) + 24px); }
.news-prose h3 { font-size: 22px; line-height: 1.25; font-weight: 800; }
.news-prose p { color: var(--news-prose); }
.news-prose ul,
.news-prose ol { padding-left: 1.2em; }
.news-prose ul { list-style: disc; }
.news-prose ol { list-style: decimal; }
.news-prose li + li { margin-top: .45em; }
.news-prose li::marker { color: var(--news-link); font-weight: 700; }
.news-prose a:not(.btn) { color: var(--news-link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.news-pull { margin: 2em 0 !important; font-family: var(--font-family-display); font-size: clamp(24px, 2.8vw, 30px) !important; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; color: var(--news-ink) !important; }
.news-pull::before { content: ""; display: block; width: 56px; height: 5px; margin-bottom: 18px; border-radius: 999px; background: var(--brand-primary-cyan); }

.news-box { padding: 24px 26px; margin-top: 2em !important; background: var(--news-cloud); border: 1px solid var(--news-hairline); border-radius: var(--news-r-card); }
.news-box h3 { font-size: 20px; }
.news-box ul { margin-top: 12px !important; padding-left: 1.1em; }
.news-box p { margin-top: 12px !important; font-size: 17px; }

.news-inline-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 26px; margin-top: 2.2em !important; border-radius: var(--news-r-card); background: var(--news-ice); border-left: 4px solid var(--brand-primary-cyan); }
.news-inline-cta p { max-width: 28ch; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--news-ink); }

.news-note { font-size: 15px !important; line-height: 1.55; color: var(--news-slate) !important; }

/* Tables: navy header bar (rate card style), amounts in action blue. */
.news-table-wrap { overflow-x: auto; border: 1px solid var(--news-hairline); border-radius: 16px; }
.news-table { width: 100%; border-collapse: collapse; font-size: 17px; line-height: 1.4; }
.news-table caption { padding: 12px 18px; font-weight: 800; text-align: left; color: #fff; background: var(--brand-field-navy); caption-side: top; }
.news-table thead th { padding: 10px 18px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; color: var(--news-slate); background: var(--news-cloud); border-bottom: 1px solid var(--news-hairline); }
.news-table thead th + th,
.news-table td { text-align: right; }
.news-table tbody th,
.news-table td { padding: 12px 18px; border-top: 1px solid var(--news-hairline); }
.news-table tbody tr:first-child th,
.news-table tbody tr:first-child td { border-top: 0; }
.news-table tbody th { font-weight: 600; text-align: left; color: var(--news-ink); }
.news-table td { font-weight: 800; color: var(--news-link); font-variant-numeric: tabular-nums; white-space: nowrap; }

.news-author { display: flex; align-items: flex-start; gap: 16px; margin-top: 3em !important; padding-top: 28px; border-top: 1px solid var(--news-hairline); }
.news-author .news-avatar { width: 56px; height: 56px; font-size: 18px; }
.news-author b { font-size: 18px; color: var(--news-ink); }
.news-author p { margin-top: 4px !important; font-size: 16px; line-height: 1.55; color: var(--news-slate); }

.news-related { margin-top: 88px; padding: 72px 0; background: var(--news-cloud); }
.news-related h2 { margin-bottom: 24px; font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.news-related + .news-cta-sec { background: var(--news-cloud); padding-top: 0; }

/* ─── Motion (respects reduced motion) ──── */
.js .news-top__in > *,
.js .news-a-head > * { opacity: 0; transform: translateY(16px); animation: news-rise .52s var(--news-ease) forwards; }
.js .news-top__in > *:nth-child(2),
.js .news-a-head > *:nth-child(2) { animation-delay: 60ms; }
.js .news-top__in > *:nth-child(3),
.js .news-a-head > *:nth-child(3) { animation-delay: 120ms; }
.js .news-top__in > *:nth-child(4),
.js .news-a-head > *:nth-child(4) { animation-delay: 180ms; }
.js .news-a-head > *:nth-child(n+5) { animation-delay: 240ms; }
.js .news-posts .news-post.is-entering,
.js .news-posts:not(.is-live) .news-post { animation: news-card-in .46s var(--news-ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes news-rise { to { opacity: 1; transform: none; } }
@keyframes news-card-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* ─── Responsive ────────────────────────── */
@media (max-width: 920px) {
  .news-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "cover" "toc" "body"; row-gap: 24px; padding-top: calc(var(--nav-h) + 20px); }
  .news-layout > .news-prose { margin-top: 0; }
  .news-toc { position: static; padding: 20px 22px; background: var(--news-cloud); border: 1px solid var(--news-hairline); border-radius: var(--news-r-card); }
  .news-share { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (max-width: 900px) {
  .news-lede { grid-template-columns: minmax(0, 1fr); }
  .news-feature__thumb { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .news-top { padding-top: calc(var(--nav-h) + 20px); }
  .news-top__lead { font-size: 18px; }
  .news-posts { gap: 20px; }
  .news-cta-sec { padding: 64px 0 72px; }
  .news-cta { border-radius: 24px; }
  .news-cta__actions .btn,
  .news-inline-cta .btn { flex: 1 1 100%; }
  .news-cover img { aspect-ratio: 16 / 9; }
  .news-feature__thumb { aspect-ratio: 4 / 3.4; }
  .news-feature__body { padding: 72px 20px 20px; }
  .news-feature h2 { font-size: 23px; }
  .news-dek { font-size: 17px; }
  .news-prose { font-size: 18px; }
  .news-table { font-size: 16px; }
  .news-table caption,
  .news-table thead th,
  .news-table tbody th,
  .news-table td { padding-inline: 14px; }
  .news-related { margin-top: 64px; padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .news-cta__photo { transition: none !important; transform: none !important; }
  .news-filters__bar,
  [data-news-lede],
  .news-grid-head,
  [data-news-posts] { transition: none !important; }
  .js .news-top__in > *,
  .js .news-a-head > *,
  .js .news-posts .news-post { opacity: 1 !important; transform: none !important; animation: none !important; }
  .news-thumb img,
  .news-feature,
  .news-post,
  .news-title-link { transition: none !important; }
  .news-feature:hover .news-thumb img,
  .news-post:hover .news-thumb img,
  .news-pick:hover .news-thumb img { transform: none; }
}
