/**
 * A49 Hero — Phase 2.G SITE.png immersive image-led layout
 * Used by: templates/front-page.html
 *
 * Structure (vertical stack on dark bg):
 *   - eyebrow (top-left, small mono)
 *   - hero-img (edge-to-edge, ~4:1 panoramic)
 *   - foot (flex row, wraps below 1100px)
 *       - title (left, large serif, cream)
 *       - cta-block (right, mono meta + boxed link)
 */

.a49-hero-immersive {
  background: var(--wp--preset--color--ink, #0A0A0A);
  color: var(--wp--preset--color--text-inv, #F2EFE9);
  padding: 80px 0 0;  /* Handoff #5b Fix A1: clear fixed-header (~72px) — eyebrow no longer hides under it */
  margin: 0;
}

.a49-hero-immersive__eyebrow {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 239, 233, 0.55);
  margin: 0;
  padding: 18px 56px 22px;
}

.a49-hero-immersive__image {
  margin: 0;
  width: 100%;
  display: block;
  aspect-ratio: 4 / 1;
  overflow: hidden;
}

.a49-hero-immersive__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.a49-hero-immersive__foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  flex-wrap: wrap;
  /* Handoff #5b Fix A2: !important defends against theme.json block-level padding
     resets που μπορεί να collapse the 56px gutter, leaving title flush-left. */
  padding: 48px 56px 64px !important;
  max-width: 100%;
}

.a49-hero-immersive__title,
h1.a49-hero-immersive__title,
.a49-hero-immersive .wp-block-heading.a49-hero-immersive__title {
  flex: 0 1 auto;
  max-width: 70%;            /* Handoff #5 Fix 3: widened από 62% to allow balanced wrap */
  min-width: 0;
  font-family: var(--wp--preset--font-family--serif), "GFS Didot", Garamond, Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.005em;
  color: #F2EFE9 !important;
  margin: 0;
  text-wrap: balance;        /* Handoff #5 Fix 3: balance line lengths automatically */
}

.a49-hero-immersive__title em,
.a49-hero-immersive__title i {
  font-style: italic;
  font-weight: 400;
  color: #F0E4CF !important;
}

.a49-hero-immersive__cta-block {
  display: flex !important;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: 0 1 auto;
  max-width: 35%;
  text-align: right;
}

.a49-hero-immersive__artist {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 239, 233, 0.75);
  margin: 0;
}

.a49-hero-immersive__dates {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(242, 239, 233, 0.55);
  margin: 0 0 14px;
}

.a49-hero-immersive__cta-wrap {
  margin: 0;
}

.a49-hero-immersive__cta,
.a49-hero-immersive__cta:link,
.a49-hero-immersive__cta:visited {
  display: inline-block;
  border: 1px solid rgba(242, 239, 233, 0.85);
  padding: 14px 22px;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #F2EFE9 !important;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.a49-hero-immersive__cta:hover {
  background: #F2EFE9;
  color: #0A0A0A !important;
}

/* Handoff #6 Fix 7c: REMOVED the *-inv rules (a49-eyebrow-inv, a49-section-heading-inv,
   a49-card-date-inv, a49-card-title-inv, a49-muted-inv, a49-card-subtitle-inv).
   The homepage upcoming + past sections now use LIGHT backgrounds (paper/cream)
   with ink text — styles live σε style.css. Hero section keeps its own dark
   `a49-hero-immersive*` classes (not removed). */

/* Responsive collapse */
@media (max-width: 1100px) {
  .a49-hero-immersive__eyebrow { padding: 14px 32px 18px; }
  .a49-hero-immersive__image { aspect-ratio: 16 / 9; }
  .a49-hero-immersive__foot { padding: 32px 32px 48px; gap: 32px; }
  .a49-hero-immersive__title { flex: 1 1 100%; max-width: 100%; font-size: clamp(38px, 8vw, 64px); text-wrap: balance; }
  .a49-hero-immersive__cta-block { align-items: flex-start; text-align: left; }
}

@media (max-width: 700px) {
  .a49-hero-immersive__eyebrow { padding: 12px 24px 16px; font-size: 10px; }
  .a49-hero-immersive__image { aspect-ratio: 3 / 2; }
  .a49-hero-immersive__foot { padding: 24px 24px 40px; gap: 24px; }
  .a49-hero-immersive__title { font-size: clamp(32px, 9vw, 48px); }
}

/* ============================================================
 * BACK-COMPAT: keep old .a49-hero rules so any legacy reference
 * doesn't break. To be removed after full Phase 2.G adoption.
 * ============================================================ */
.a49-hero { display: none; }

/* ============================================================
 * Phase 2.H — Upcoming + Past exhibitions sections on front-page.
 * Upcoming section auto-hides when no future exhibitions exist
 * (via :has() — well supported in modern browsers since 2023).
 * Past section is always visible.
 * ============================================================ */

.a49-upcoming-section { display: none !important; }
.a49-upcoming-section:has(.wp-block-post) { display: block !important; }

/* Handoff #6 Fix 7c: removed adjacent-sibling padding-top fallback
   (past section now has 96px hardcoded in template; was 0 only for dark-continuation). */

/* "Όλες οι εκθέσεις →" link styling on dark bg */
.a49-link-inv,
.a49-link-inv:link,
.a49-link-inv:visited {
  color: #F2EFE9 !important;
  text-decoration: none;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 14px 24px;
  border: 1px solid rgba(242, 239, 233, 0.85);
  display: inline-block;
  transition: background 0.2s ease, color 0.2s ease;
}
.a49-link-inv:hover {
  background: #F2EFE9;
  color: #0A0A0A !important;
}

/* Hero title block — title + subtitle (2nd title) + artists stacked, beside the cta-block (2026-05-25) */
.a49-hero-immersive__titleblock { flex: 0 1 68%; min-width: 0; max-width: 68%; }
.a49-hero-immersive__titleblock .a49-hero-immersive__title { max-width: 100%; }
.a49-hero-immersive__subtitle {
  font-family: var(--wp--preset--font-family--serif), Georgia, serif;
  font-style: italic; font-size: clamp(17px, 1.9vw, 24px); line-height: 1.28;
  color: #F0E4CF; margin: 14px 0 0; max-width: 34em;
}
.a49-hero-immersive__artists {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 12px; letter-spacing: 0.06em; line-height: 1.7;
  color: rgba(242, 239, 233, 0.6); margin: 16px 0 0; max-width: 44em;
}
@media (max-width:782px){ .a49-hero-immersive__titleblock { flex-basis: 100%; max-width: 100%; } }
