/**
 * Hero — styles for the social-hero cover block, front-page hero columns,
 * eyebrow rows, story cards, CTA button, and hero post titles.
 * Applies to single daily_feed, archive, and front page.
 * Selectors are scoped with body.single-daily_feed, body.post-type-archive-daily_feed, or body.home
 * so our rules win over theme/block defaults. Prefer fixing block output (e.g. render_block
 * filter) over !important so styles remain maintainable.
 */

/* ─── Brand explainer (shared header pattern used on all daily_feed pages) ── */

.front-brand-explainer.wp-block-group {
  margin-top: 24px;
  padding-top: clamp(2rem, 4vw, 3rem) !important;
  padding-bottom: clamp(1.25rem, 2.5vw, 2rem) !important;
  padding-left: var(--wp--preset--spacing--40) !important;
  padding-right: var(--wp--preset--spacing--40) !important;
  text-align: center !important;
}

/* Single daily_feed: remove bottom padding so the header-byline is flush with the brand explainer */
body.single-daily_feed .front-brand-explainer.wp-block-group {
  padding-bottom: 0 !important;
}

.front-brand-heading.wp-block-heading {
  font-size: clamp(2.25rem, 8vw, 3.25rem) !important; /* ~52px cap = 3.25rem */
  font-weight: 400 !important;
  letter-spacing: 3px !important;
  line-height: 1 !important;
  color: #fff !important;
  margin: 0 auto 0 !important;
  text-align: center !important;
  display: block !important;
  width: 100% !important;
}

.front-brand-heading .front-brand-the,
.front-brand-heading .front-brand-daily {
  color: #fff !important;
  font-weight: 400 !important;
}

.front-brand-green,
.front-brand-heading .front-brand-feed {
  color: var(--sc-green) !important;
  font-weight: 400 !important;
}

.front-brand-tagline.wp-block-paragraph {
  font-family: var(--sc-condensed-font) !important;
  font-size: 14px !important;
  letter-spacing: 0.5px !important;
  color: var(--sc-silver);
  margin: 6px auto 0 !important;
  max-width: 560px;
}

.front-brand-tagline-egg {
  display: inline-block;
  line-height: 0;
  vertical-align: -0.2em;
}

.front-brand-tagline-egg svg {
  display: block;
  width: 0.95em;
  height: 1.12em;
}

/* ─── Hero entrance animations ────────────────────────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* ─── Hero wrapper background depth ──────────────────────────────────────── */

body.home .front-hero-wrapper.wp-block-group {
  background-image: radial-gradient(ellipse at 70% 50%, rgba(105, 190, 40, 0.04) 0%, transparent 70%);
}

/* ─── Hero column ordering & entrance stagger ────────────────────────────── */

/* Content is first in DOM (for mobile stacking), but image shows first on desktop */
body.home .front-hero-columns {
  flex-direction: row;
}

body.home .front-hero-col-image {
  order: -1;
  animation: fadeUp 0.6s ease-out both;
}

body.home .front-hero-col-content {
  order: 0;
  animation: fadeUp 0.6s ease-out 0.1s both;
}

/* ─── Social Hero (featured image + overlaid title) ───────────────────────── */

/* Force 1:1 aspect ratio: use grid so height is driven by aspect-ratio, not by flex content.
   Without this, when inner-container is position:static (query/archive stretched-link),
   the cover sizes to content and gets squished. */
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero.wp-block-cover {
  display: grid;
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 680px; /* match archive card size so single and archive hero look the same */
  margin-left: auto;
  margin-right: auto;
  padding: 0; /* no gap between border and image */
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--sc-green);
  position: relative;
  box-shadow: 0 0 40px rgba(105, 190, 40, 0.12);
}

/* Stack all layers in the same grid cell; position them to fill the box (no gaps). */
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero.wp-block-cover > * {
  grid-column: 1;
  grid-row: 1;
}

/* Background span: fill the entire cover so no gap at edges; sits behind image. */
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero.wp-block-cover > .wp-block-cover__background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  z-index: 0;
}

/* Image: fill the cover edge-to-edge; scale on hover is clipped by overflow:hidden on cover. */
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero .wp-block-cover__image-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
  z-index: 1;
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero:hover .wp-block-cover__image-background {
  transform: scale(1.03);
}

/* Text overlay: fill entire card so gradient covers zoomed image on hover; content pinned to bottom. */
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero .wp-block-cover__inner-container {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 24px 28px;
  z-index: 2;
  background: linear-gradient(to top, rgba(0, 10, 30, 0.55) 0%, transparent 100%);
}

/* ─── Query-card: full-card stretched link ────────────────────────────────── */

/* Revert inner container to static (flex child of cover) so the title link's
   ::after anchors to the cover block — not the inner container — and covers
   the entire card (stretched-link pattern). Override block/theme padding. */
:is(body.post-type-archive-daily_feed, body.home, body.single-daily_feed) .wp-block-query .daily-feed-social-hero,
:is(body.post-type-archive-daily_feed, body.home, body.single-daily_feed) .daily-feed-social-hero {
  padding: 0 !important;
}

:is(body.post-type-archive-daily_feed, body.home, body.single-daily_feed) .wp-block-query .daily-feed-social-hero .wp-block-cover__inner-container,
:is(body.post-type-archive-daily_feed, body.home, body.single-daily_feed) .daily-feed-social-hero .wp-block-cover__inner-container {
  position: static !important;
  background: none !important;
  padding: 12px 16px 16px !important;
  align-self: end; /* sit at bottom of 1:1 grid cell */
}

:is(body.post-type-archive-daily_feed, body.home, body.single-daily_feed) .wp-block-query .daily-feed-social-hero .wp-block-post-title > a::after,
:is(body.post-type-archive-daily_feed, body.home, body.single-daily_feed) .daily-feed-social-hero .wp-block-post-title > a::after {
  content: '';
  position: absolute;
  inset: 0;
}

/* Title: scale to card width (override block typography) — same on all pages */
:is(body.post-type-archive-daily_feed, body.home, body.single-daily_feed) .wp-block-query .daily-feed-social-hero .wp-block-post-title,
:is(body.post-type-archive-daily_feed, body.home, body.single-daily_feed) .daily-feed-social-hero .wp-block-post-title {
  font-size: clamp(13px, 2.5vw, 20px) !important;
  line-height: 1.05 !important;
}

/* Eyebrow row: green line · issue # · date (override block inline typography/margin) */
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-hero-eyebrow.wp-block-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  margin: 0 0 8px;
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-hero-eyebrow.wp-block-group::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sc-green);
  flex-shrink: 0;
  margin-right: 8px;
}

body.single-daily_feed .daily-feed-hero-eyebrow-label,
body.single-daily_feed .daily-feed-hero-eyebrow-issue.wp-block-paragraph,
body.single-daily_feed .daily-feed-hero-eyebrow-sep.wp-block-paragraph,
body.single-daily_feed .daily-feed-hero-eyebrow-date.wp-block-post-date,
body.single-daily_feed .daily-feed-hero-eyebrow-date.wp-block-post-date time,
body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-label,
body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-issue.wp-block-paragraph,
body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-sep.wp-block-paragraph,
body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-date.wp-block-post-date,
body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-date.wp-block-post-date time,
body.home .daily-feed-hero-eyebrow-issue.wp-block-paragraph,
body.home .daily-feed-hero-eyebrow-sep.wp-block-paragraph,
body.home .daily-feed-hero-eyebrow-date.wp-block-post-date,
body.home .daily-feed-hero-eyebrow-date.wp-block-post-date time {
  font-family: var(--wp--preset--font-family--bebas-neue) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 4px !important;
  text-transform: uppercase !important;
  color: var(--sc-green) !important;
  margin: 0 !important;
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed) .daily-feed-hero-eyebrow-label {
  margin-right: 4px !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-hero-eyebrow-issue.wp-block-paragraph {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-hero-eyebrow-sep.wp-block-paragraph {
  margin-right: 4px !important;
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-hero-eyebrow-date.wp-block-post-date {
  display: inline !important;
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-hero-eyebrow-date.wp-block-post-date time {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

/* ─── Front-page right column: eyebrow, bullets, button ──────────────────── */

body.home .front-hero-eyebrow.wp-block-group {
  display: flex;
  align-items: center;
  gap: 0;
}

body.home .front-hero-eyebrow.wp-block-group::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--sc-green);
  flex-shrink: 0;
  margin-right: 10px;
}

/* Right column: accent border + padding */
body.home .front-hero-col-content {
  border-left: 2px solid rgba(105, 190, 40, 0.25);
  padding-left: clamp(1.2rem, 3vw, 2.5rem);
}

/* Headline above story cards (override block typography) */
body.home .front-hero-headline {
  font-family: var(--wp--preset--font-family--bebas-neue) !important;
  font-size: clamp(1.3rem, 2.5vw, 1.6rem) !important;
  color: #fff !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin: 0.4em 0 0.8em !important;
  line-height: 1.1 !important;
}

/* Story cards (mini-cards with numbered badges) */
body.home .seachickens-hero-bullets {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 0.5em;
}

body.home .hero-story-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(14, 23, 36, 0.7);
  border: 1px solid rgba(30, 47, 69, 0.8);
  border-left: 3px solid var(--sc-green);
  border-radius: 6px;
  padding: 14px 16px;
  transition: background 0.2s, border-left-color 0.2s;
}

body.home .hero-story-card:hover {
  background: rgba(20, 33, 58, 0.9);
  border-left-color: var(--sc-gold);
}

body.home .hero-story-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: rgba(105, 190, 40, 0.15);
  border: 1px solid rgba(105, 190, 40, 0.3);
  font-family: var(--wp--preset--font-family--barlow);
  font-weight: 800;
  font-size: 12px;
  color: var(--sc-green);
  line-height: 1;
}

body.home .hero-story-text {
  font-family: var(--wp--preset--font-family--barlow);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sc-text-primary);
}

/* CTA button (override block/button inline styles) */
body.home .seachickens-hero-read-link {
  display: inline-block;
  text-decoration: none;
  margin-top: var(--wp--preset--spacing--30, 1.5rem);
  padding: 14px 28px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(105, 190, 40, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
}

body.home .seachickens-hero-read-link:hover {
  text-decoration: none;
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(105, 190, 40, 0.45);
}

/* NEW badge */
body.home .hero-new-badge {
  display: inline-block;
  background: var(--sc-green);
  color: var(--sc-navy);
  font-family: var(--wp--preset--font-family--barlow);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 10px;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}

/* ─── Mobile layout (≤600px) ─────────────────────────────────────────────── */

@media (max-width: 600px) {
  .front-brand-heading.wp-block-heading {
    font-size: clamp(1.85rem, 9vw, 2.75rem) !important;
    letter-spacing: 2px !important;
  }

  :is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero.wp-block-cover {
    border-radius: 0;
    aspect-ratio: 1 / 1;
  }

  /* Narrow band gradient on mobile (match desktop): dark only in bottom ~35–40% */
  :is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero .wp-block-cover__background {
    background: linear-gradient(to top, rgba(0, 10, 30, 0.92) 0%, rgba(0, 10, 30, 0.6) 32%, rgba(0, 10, 30, 0) 45%) !important;
  }

  :is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-hero-eyebrow.wp-block-group {
    flex-wrap: wrap;
    row-gap: 3px;
    justify-content: flex-start;
  }

  body.single-daily_feed .daily-feed-hero-eyebrow-label,
  body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-label,
  body.home .daily-feed-hero-eyebrow-issue.wp-block-paragraph {
    flex: 0 1 auto;
    white-space: normal;
  }

  body.single-daily_feed .daily-feed-hero-eyebrow-label,
  body.single-daily_feed .daily-feed-hero-eyebrow-date.wp-block-post-date,
  body.single-daily_feed .daily-feed-hero-eyebrow-date.wp-block-post-date time,
  body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-label,
  body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-date.wp-block-post-date,
  body.post-type-archive-daily_feed .daily-feed-hero-eyebrow-date.wp-block-post-date time,
  body.home .daily-feed-hero-eyebrow-issue.wp-block-paragraph,
  body.home .daily-feed-hero-eyebrow-sep.wp-block-paragraph,
  body.home .daily-feed-hero-eyebrow-date.wp-block-post-date,
  body.home .daily-feed-hero-eyebrow-date.wp-block-post-date time {
    letter-spacing: 1px !important;
    font-size: 10px !important;
  }

  body.home .front-hero-col-image {
    order: -1;
  }

  body.home .front-hero-col-content {
    order: 0;
    border-left: none;
    padding-left: 0;
    padding: 0 var(--wp--preset--spacing--30);
  }

  body.home .hero-story-text {
    font-size: 0.88rem;
  }

  body.home .hero-story-card {
    padding: 10px 12px;
    gap: 10px;
  }

  body.home .seachickens-hero-read-link {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

/* Hero / card post titles: shared heading font + uppercase white links */
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero .wp-block-post-title,
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero .wp-block-post-title a,
.front-hero-title.wp-block-post-title,
.front-hero-title.wp-block-post-title a,
.feed-card-title.wp-block-post-title,
.feed-card-title.wp-block-post-title a {
  font-family: var(--wp--preset--font-family--bebas-neue) !important;
  color: #fff !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}

/* Social hero post title (override block typography) */
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero .wp-block-post-title,
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero .wp-block-post-title a {
  font-size: clamp(22px, 5vw, 34px) !important;
  line-height: 0.95 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 24px rgba(0, 0, 0, 0.6) !important;
  margin: 0 !important;
  transition: color 0.2s ease;
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero:hover .wp-block-post-title,
:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero:hover .wp-block-post-title a {
  color: var(--sc-green) !important;
}

/* ─── Feed card post-title (archive cards grid) ──────────────────────────── */

.feed-card-title.wp-block-post-title,
.feed-card-title.wp-block-post-title a {
  font-size: clamp(0.85rem, 1.8vw, 1.2rem) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85) !important;
  margin: 0.4rem 0 0 !important;
  transition: color 0.2s ease;
}

.daily-feed-social-hero:hover .feed-card-title.wp-block-post-title a {
  color: var(--sc-green) !important;
}

/* ─── Card subhead (from daily_feed_card_subhead post meta) ──────────────── */

.card-title-sub {
  display: block;
  font-size: 0.72em !important;
  font-weight: 700 !important;
  text-transform: none !important;
  line-height: 1.12 !important;
  margin-top: 0.3em !important;
  opacity: 0.95;
  letter-spacing: 0 !important;
}

:is(body.single-daily_feed, body.post-type-archive-daily_feed, body.home) .daily-feed-social-hero .card-title-sub {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.45) !important;
}
