/* =========================================================
   ARTICLE DETAIL PAGE
   ========================================================= */
.article-detail {
  padding-block: 0 96px;
}

.article-hero {
  position: relative;
  padding-block: 80px 48px;
  background: var(--paper);
  border-bottom: var(--rule);
}
.article-hero__kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-family: var(--font-sans);
  font-size: var(--fs-meta);
  color: var(--ink-soft);
}
.article-hero__kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.article-hero__kicker .eyebrow {
  color: var(--teal);
}
.article-hero__issue a {
  margin-left: auto;
  color: var(--ink-mute);
  border-bottom: 1px dotted var(--paper-edge);
  padding-bottom: 1px;
}
.article-hero__issue a:hover { color: var(--gold); }
.article-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}
.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-family: var(--font-sans);
  font-size: var(--fs-meta);
  color: var(--ink-soft);
}
.article-hero__meta a {
  color: var(--teal);
  border-bottom: 1px solid var(--paper-edge);
}
.article-hero__meta a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.article-hero__byline { font-weight: 500; color: var(--ink); }
.article-hero__photographer { color: var(--ink-mute); font-style: italic; }
.article-hero__date { color: var(--ink-mute); margin-left: auto; }

/* =========================================================
   ARTICLE BODY — magazine-style typography
   ========================================================= */
.article-body {
  padding-block: 48px 32px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--ink);
}
.article-body p {
  margin: 0 0 1.4em;
}
.article-body p:first-of-type::first-letter {
  /* Magazine-style drop cap */
  font-family: var(--font-serif);
  font-size: 4em;
  font-weight: 600;
  line-height: 0.85;
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--teal);
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2em 0 0.6em;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 1.8em 0 0.4em;
  color: var(--ink);
}
.article-body ul, .article-body ol {
  margin: 0 0 1.4em;
  padding-left: 1.5em;
}
.article-body li {
  margin: 0.4em 0;
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 8px 0 8px 28px;
  margin: 32px 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.2rem;
}

/* =========================================================
   ARTICLE FOOTER + SHARE
   ========================================================= */
.article-footer {
  padding-top: 16px;
  font-family: var(--font-sans);
}
.article-footer__note {
  font-size: var(--fs-meta);
  color: var(--ink-soft);
  margin: 24px 0;
}
.article-footer__note a { color: var(--teal); }
.article-share {
  margin-top: 32px;
  padding-top: 24px;
  border-top: var(--rule);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.article-share .eyebrow { margin-right: 8px; }
.article-share__btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--paper-edge);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  transition: all 0.15s ease;
}
.article-share__btn:hover {
  background: var(--teal);
  color: var(--paper);
  border-color: var(--teal);
}

/* Sponsor ad — only allowed on Expert Contributor articles */
.article-sponsor-ad {
  margin: 48px 0;
  padding: 24px;
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  text-align: center;
}
.article-sponsor-ad__label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
.article-sponsor-ad img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* =========================================================
   ARTICLE CARDS in /articles/ index
   ========================================================= */
.article-card {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}
.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 18px 36px -20px rgba(0,0,0,0.18);
}
.article-card__kicker {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
/* Directory-card logo thumb. Only rendered when the sponsor has a
   synced Zoho Record_Image. object-fit:contain so wide and square logos
   both fit. Soft frame so transparent PNGs stay legible on any backdrop. */
.article-card__logo {
  width: 100%;
  /* Bumped from 88px → 160px 2026-05-25 per Troy — logos were getting
     smashed into tiny thumbnails. Now they get room to breathe. */
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-md, 8px);
  padding: 8px;
  margin: 0 0 14px;
  overflow: hidden;
}
.article-card__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Wide-aspect logos (>4:1) get a shorter container so they read at
   maximum width instead of being letterboxed in a tall box. */
.article-card__logo--wide {
  height: 170px;
  padding: 8px 14px;
}
.article-card__logo--wide img {
  width: 100%;
  max-height: 150px;
  height: auto;
  object-fit: contain;
}
.article-card__title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--ink);
}
.article-card__teaser {
  font-family: var(--font-serif);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 16px;
  flex: 1;
}
.article-card__meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-mute);
  display: flex;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--paper-edge);
}

/* =========================================================
   WHO WE SUPPORT — nonprofit cards
   ========================================================= */
.nonprofit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.nonprofit-card {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.nonprofit-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 18px 36px -20px rgba(0,0,0,0.18);
}
/* Synced Zoho Record_Image, rendered when org has a logo on file. */
.nonprofit-card__logo {
  width: 100%;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-md, 8px);
  padding: 10px;
  margin: 0 0 16px;
}
.nonprofit-card__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
/* Nonprofit profile (per-org landing page) hero logo */
.nonprofit-profile__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  max-width: 220px;
  max-height: 160px;
}
.nonprofit-profile__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.nonprofit-card__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.25;
}
.nonprofit-card__mission {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 16px;
  flex: 1;
}
.nonprofit-card__meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-mute);
  padding-top: 14px;
  border-top: 1px solid var(--paper-edge);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
}
.nonprofit-card__pages {
  color: var(--teal);
  font-weight: 600;
}
.nonprofit-card__years {
  color: var(--gold);
  font-weight: 500;
}
.nonprofit-card__website {
  margin-left: auto;
  border-bottom: 1px dotted var(--paper-edge);
  color: var(--teal);
}
.nonprofit-card__website:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* Larger gauge for the /who-we-support/ page hero */
.gauge--large {
  width: 320px;
  height: 320px;
}
.gauge--large .gauge__center {
  padding: 20px;
}
.gauge--large .gauge__amount {
  font-size: 2.5rem !important;
}
.gauge--large .gauge__label {
  font-size: 1rem !important;
  margin-top: 4px !important;
}
.gauge--large .gauge__note {
  font-size: 0.75rem !important;
  margin-top: 12px !important;
}

/* =========================================================
   BUSINESS DIRECTORY — same grid shape as article cards
   ========================================================= */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.directory-grid .article-card {
  background: var(--paper);
}

/* =========================================================
   ISSUE CAROUSEL — appears under "Back to all issues" on each
   magazine-detail page. Horizontal scroll-snap strip showing
   the entire archive; current issue is centered + gold-ringed.
   ========================================================= */
.issue-carousel {
  background: var(--paper-deep);
  padding-block: 48px 56px;
  margin-top: 48px;
  border-top: 1px solid var(--paper-edge);
}
.issue-carousel__head {
  text-align: center;
  margin-bottom: 28px;
}
.issue-carousel__title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 6px 0 0;
  color: var(--ink);
}
.issue-carousel__viewport {
  position: relative;
  display: flex;
  align-items: center;
}
.issue-carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 24px 60px;
  scrollbar-width: thin;
  scroll-behavior: smooth;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.issue-carousel__track::-webkit-scrollbar {
  height: 6px;
}
.issue-carousel__track::-webkit-scrollbar-thumb {
  background: var(--paper-edge);
  border-radius: 3px;
}
.issue-carousel__card {
  flex: 0 0 auto;
  width: 130px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
  position: relative;
}
.issue-carousel__card:hover {
  transform: translateY(-4px);
}
.issue-carousel__card img {
  width: 130px;
  height: 169px;       /* 8.5:11 = 0.77 ratio */
  object-fit: cover;
  border: 1px solid var(--paper-edge);
  box-shadow: 0 6px 14px -6px rgba(0,0,0,0.15);
  background: var(--paper);
}
.issue-carousel__label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 12px;
  text-align: center;
}
.issue-carousel__card--current {
  transform: scale(1.15);
  z-index: 2;
}
.issue-carousel__card--current:hover {
  transform: scale(1.18) translateY(-2px);
}
.issue-carousel__card--current img {
  border: 3px solid var(--gold);
  box-shadow: 0 10px 24px -8px rgba(176, 126, 45, 0.45);
}
.issue-carousel__card--current .issue-carousel__label {
  color: var(--gold);
  font-weight: 700;
}
.issue-carousel__badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.issue-carousel__arrow {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--paper-edge);
  background: var(--paper);
  color: var(--teal);
  font-size: 1.8rem;
  font-family: var(--font-serif);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 3;
  user-select: none;
}
.issue-carousel__arrow:hover {
  background: var(--gold);
  color: var(--paper);
  transform: scale(1.08);
}
.issue-carousel__arrow--left { margin-right: -22px; }
.issue-carousel__arrow--right { margin-left: -22px; }

/* Magazine-cover card — appears in the "More from <Issue>" strip on every
   article page so readers see which issue they're reading and can jump back. */
.magazine-cover-card {
  background: linear-gradient(155deg, var(--teal) 0%, var(--teal-soft) 100%);
  border-color: var(--teal);
  overflow: hidden;
  position: relative;
}
.magazine-cover-card:hover {
  border-color: var(--gold);
  box-shadow: 0 18px 36px -16px rgba(19,52,60,0.5);
}
.magazine-cover-card__cover {
  margin: -20px -20px 16px;
  height: 200px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.magazine-cover-card__cover img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,0.3);
}

/* =========================================================
   GALLERY — Site_Photos per business or per page (Phase E)
   ========================================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.gallery__item {
  margin: 0;
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -16px rgba(0,0,0,0.2);
}
.gallery__item img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--paper);
}
.gallery__caption {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 10px 12px 12px;
  line-height: 1.4;
}

/* -------- article-card thumbnail (top image block) -------- */
.article-card__thumb {
  margin: -18px -18px 14px -18px;
  background: var(--paper-deep);
  overflow: hidden;
  border-radius: var(--radius-md, 8px) var(--radius-md, 8px) 0 0;
}
.article-card__thumb img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card--has-thumb:hover .article-card__thumb img {
  transform: scale(1.04);
}

/* -------- article-hero-image (full-bleed image below the title block) -------- */
.article-hero-image {
  margin: 0 0 32px 0;
  padding: 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.article-hero-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 540px;
  object-fit: cover;
  border-radius: var(--radius-md, 8px);
}
.article-hero-image figcaption {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
  padding: 0 16px;
}

/* -------- article-gallery (grid of additional photos) -------- */
.article-gallery {
  margin: 48px 0 16px;
  padding-top: 32px;
  border-top: var(--rule);
}
.article-gallery__heading {
  margin: 0 0 20px 0;
  font-size: 1.2rem;
}
.article-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.article-gallery__item {
  display: block;
  background: var(--paper-deep);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.article-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 640px) {
  .article-gallery__grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .article-hero-image img {
    max-height: 320px;
  }
  .article-card__thumb img {
    height: 160px;
  }
}

/* =========================================================
   SPORTS SECTION TREATMENT (Troy locked 2026-05-25)
   Three layers of "sports = special":
     1. --kl-sports color custom property — warm action orange
     2. Sports article cards get the orange kicker accent
     3. Sports article detail pages get a warmer hero + byline
     4. /sports/ landing page eyebrow + section accent
   ========================================================= */
:root {
  --kl-sports: #d9651b;        /* warm action orange */
  --kl-sports-soft: #f2a868;   /* lighter tint for hover/eyebrow on dark */
  --kl-sports-deep: #a84a10;   /* darker tint for tags on light bg */
}

/* Sports article cards — distinct kicker accent so they pop in any listing */
.article-card[data-category="sports"] .article-card__kicker {
  color: var(--kl-sports-deep);
  border-left: 3px solid var(--kl-sports);
  padding-left: 8px;
  margin-left: -11px;
}
.original[data-category="sports"] .original__kicker,
.is-cat-sports .article-card__kicker {
  color: var(--kl-sports-deep);
}

/* Sports article DETAIL page treatment */
body.is-cat-sports .article-hero__kicker .eyebrow {
  color: var(--kl-sports-deep);
  font-weight: 700;
  letter-spacing: 0.15em;
}
body.is-cat-sports .article-hero__byline {
  /* subtle warm tint vs default ink-soft */
  color: var(--kl-sports-deep);
}
body.is-cat-sports .article-hero-image {
  /* taller + edge-to-edge feel for the action shot */
  max-width: 1400px;
  margin-bottom: 40px;
}
body.is-cat-sports .article-hero-image img {
  max-height: 620px;
  /* subtle warm filter so the action photo reads as 'sports' */
  filter: saturate(1.08) contrast(1.04);
}
body.is-cat-sports .article-hero-image figcaption {
  border-left: 3px solid var(--kl-sports);
  padding-left: 14px;
  text-align: left;
  margin: 16px auto 0;
  max-width: 800px;
}

/* Sports gallery — slight warmer accent on the heading */
body.is-cat-sports .article-gallery__heading .eyebrow {
  color: var(--kl-sports-deep);
  font-weight: 700;
}

/* =========================================================
   /sports/ LANDING PAGE treatment
   ========================================================= */
body.page-sports .hero__eyebrow .eyebrow {
  color: var(--kl-sports-soft);
}
body.page-sports .hero__eyebrow .dot {
  background: var(--kl-sports-soft);
}
body.page-sports .hero .btn {
  background: var(--kl-sports);
  color: var(--white);
}
body.page-sports .hero .btn:hover {
  background: var(--kl-sports-soft);
  color: var(--ink);
}
body.page-sports .section-head .eyebrow {
  color: var(--kl-sports-deep);
  font-weight: 700;
}

/* Placeholder thumbnail for articles that don't yet have a hero photo.
   Used by the compact card in 'More from this issue' + 'You might also like'
   so every clickable article shows a visual hook — empty placeholder is the
   cue 'this one still needs a hero promoted'. */
.article-card__thumb--placeholder {
  background: linear-gradient(135deg, var(--paper-deep) 0%, var(--paper) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--paper-edge);
  border-radius: 4px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  height: 160px;
  margin: -18px -18px 14px -18px;
  border-radius: var(--radius-md, 8px) var(--radius-md, 8px) 0 0;
}
.article-card__thumb--placeholder .ph__label {
  opacity: 0.6;
}

/* =========================================================
   ARTICLE → NONPROFIT cross-link card
   Renders when article frontmatter has nonprofit_slugs.
   Bidirectional with the nonprofit page's 'Articles featuring
   this nonprofit' section.
   ========================================================= */
.article-nonprofit-feature {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
  background: var(--paper-deep);
  border-left: 4px solid var(--gold);
  padding: 20px 24px;
  margin: 40px 0 0;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-nonprofit-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(0,0,0,0.25);
}
.article-nonprofit-feature__logo {
  width: 100%;
  max-width: 120px;
  height: auto;
  object-fit: contain;
  background: var(--paper);
  border-radius: 8px;
  padding: 8px;
}
.article-nonprofit-feature__copy .eyebrow {
  color: var(--gold-deep, #8a5a00);
  font-weight: 700;
}
.article-nonprofit-feature__name {
  margin: 4px 0 8px;
  font-family: var(--font-display);
  font-size: 1.4rem;
}
.article-nonprofit-feature__copy p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}
.article-nonprofit-feature__cta {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 600;
}
@media (max-width: 640px) {
  .article-nonprofit-feature { grid-template-columns: 1fr; text-align: center; padding: 16px; }
  .article-nonprofit-feature__logo { max-width: 96px; margin: 0 auto; }
}

/* Contain variant — show the ENTIRE image (no crop), useful for BVM print
   ads, posters, vertical flyers. Pillarbox/letterbox bars fill the unused
   space with paper-deep so it reads as intentional layout. */
.article-hero-image--contain {
  background: var(--paper-deep);
  border-radius: var(--radius-md, 8px);
  padding: 12px;
  max-width: 900px;     /* narrower container — portrait ads display proportionally */
  margin-left: auto;
  margin-right: auto;
}
.article-hero-image--contain img {
  width: 100%;
  height: auto;
  max-height: 900px;    /* portrait ads can be taller than the default 540 */
  background: var(--paper);
  border-radius: 4px;
}
