/* update-content.css
 * Styles for the content updates (kept out of the original Vite bundle CSS).
 * Linked from: / (index.html), /group-events/, /upcoming-events/, /past-events/
 *   1. Homepage header "Events" dropdown
 *   2. Homepage hero CTA row
 *   3. Events nav bar (shared by /group-events/, /upcoming-events/, /past-events/)
 *   4. /upcoming-events/ and /past-events/ page styles (scoped to body.events-page
 *      so they cannot affect the homepage or /group-events/)
 * Cache note: /assets/* is served as immutable for a year (netlify.toml). This file
 * has no content hash, so bump the ?v= number on each <link> when you change it.
 */

/* ============ 1. Homepage: header "Events" dropdown ============
   Injected left of "Book a Session" by the script at the end of index.html.
   Desktop: opens on hover or click, anchored under the button.
   Mobile (<640px): compact button; menu opens as a full-width panel under the header. */
.tg-events { position: relative; display: inline-block; margin-right: 0.6rem; }
.tg-events-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: inherit; font-weight: 600; font-size: 0.875rem; line-height: 1;
  padding: 0.5rem 1.1rem; min-height: 2.25rem; cursor: pointer; white-space: nowrap;
  background: transparent; color: hsl(14 74% 45%);
  border: 1.5px solid hsl(14 72% 52%); border-radius: 9999px;
  transition: background .2s ease, color .2s ease;
}
.tg-events-btn:hover, .tg-events.open .tg-events-btn { background: hsl(14 72% 52%); color: #fff; }
.tg-events-btn svg { width: 0.8em; height: 0.8em; transition: transform .2s ease; }
.tg-events.open .tg-events-btn svg { transform: rotate(180deg); }
.tg-events-menu { display: none; position: absolute; right: 0; top: 100%; padding-top: 0.5rem; min-width: 12.5rem; z-index: 60; }
.tg-events.open .tg-events-menu { display: block; }
@media (hover: hover) and (min-width: 640px) {
  .tg-events:hover .tg-events-menu { display: block; }
  .tg-events:hover .tg-events-btn svg { transform: rotate(180deg); }
}
.tg-events-panel {
  background: #fff; border: 1px solid rgba(21,35,63,0.12); border-radius: 0.75rem;
  box-shadow: 0 18px 40px -18px rgba(15,26,48,0.45); padding: 0.4rem; overflow: hidden;
}
.tg-events-item {
  display: block; padding: 0.65rem 0.9rem; border-radius: 0.5rem;
  font-size: 0.92rem; font-weight: 500; color: #1d2a44; text-decoration: none; white-space: nowrap;
}
.tg-events-item:hover, .tg-events-item:focus-visible { background: #f5f1e8; color: hsl(14 74% 40%); outline: none; }
@media (max-width: 639px) {
  .tg-events { margin-right: 0.4rem; position: static; }
  .tg-events-btn { font-size: 0.8rem; padding: 0.45rem 0.8rem; min-height: 2.1rem; }
  .tg-events-menu { position: fixed; left: 1rem; right: 1rem; top: 4.5rem; padding-top: 0; }
  .tg-events-item { padding: 0.85rem 1rem; font-size: 1rem; }
}
.events-page{
  margin:0 !important;
}
/* ============ 2. Homepage: hero CTA row ("Group Events" + "Request a Reading") ============
   CSS-only balance fix. The two buttons had different padding/line-height/border, so
   their heights differed. Scoped with :has() to the one container that holds the
   injected Group Events link, so no other button on the page is affected.
   Desktop/tablet: centered row, equal height (stretch) and equal width.
   Phone (<=560px): stacked, both full width up to 22rem. */
div:has(> .tg-group-cta--hero) {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 1rem;
}
div:has(> .tg-group-cta--hero) > .tg-group-cta--hero,
div:has(> .tg-group-cta--hero) > button[data-testid="button-hero-cta"] {
  box-sizing: border-box; flex: 0 1 16rem; min-width: 14rem; min-height: 4.25rem;
  margin: 0 !important; padding: 1rem 2rem;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  font-size: 1.125rem; line-height: 1.25; font-weight: 600; white-space: nowrap;
  border-width: 1.5px; border-radius: 9999px;
}
@media (max-width: 560px) {
  div:has(> .tg-group-cta--hero) { flex-direction: column; align-items: center; gap: 0.85rem; }
  div:has(> .tg-group-cta--hero) > .tg-group-cta--hero,
  div:has(> .tg-group-cta--hero) > button[data-testid="button-hero-cta"] {
    flex: 0 0 auto; width: 100%; max-width: 22rem; min-width: 0; min-height: 3.75rem; font-size: 1rem;
  }
}

/* ============ 3. Events nav bar (group-events, upcoming-events, past-events) ============
   Uses the colour variables (--navy-deep, --cream, --gold, --gold-soft) each page defines. */
nav.nav { background: var(--navy-deep); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.4rem 1.6rem; padding: 0.8rem 1rem; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; }
nav.nav a { color: var(--cream); text-decoration: none; padding: 0.2rem 0; border-bottom: 1px solid transparent; }
nav.nav a:hover { color: var(--gold-soft); }
nav.nav a.active { color: var(--gold-soft); border-bottom-color: var(--gold); }
nav.nav a.home { color: var(--gold-soft); font-weight: 600; }

/* ============ 4. /upcoming-events/ and /past-events/ ============
   Everything below only applies when <body class="events-page">. */
body.events-page {
  --navy: #15233f;
  --navy-deep: #0f1a30;
  --gold: #c2a14d;
  --gold-soft: #d8bd78;
  --cream: #f5f1e8;
  --cream-card: #fbf9f4;
  --ink: #1d2a44;
  --muted: #5d6678;
}
.events-page * { box-sizing: border-box; margin: 0; padding: 0; }
/* Sticky footer: page is at least viewport tall; footer is pushed to the bottom
   when the content is short, and follows the content otherwise. */
body.events-page { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); background: var(--cream); line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.events-page .serif { font-family: 'Cormorant Garamond', Georgia, serif; }
.events-page .wrap { max-width: 900px; margin: 0 auto; }

.events-page .hero {
  background: radial-gradient(1200px 500px at 80% -10%, rgba(194,161,77,0.18), transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--cream); text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem clamp(2.5rem, 6vw, 4.5rem);
}
.events-page .eyebrow { letter-spacing: 0.32em; text-transform: uppercase; font-size: 0.78rem; color: var(--gold-soft); font-weight: 600; margin-bottom: 1rem; }
.events-page .hero h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1.05; font-weight: 600; }
.events-page .hero h1 .gold { color: var(--gold); }
.events-page .hero p { opacity: 0.85; max-width: 46ch; margin: 1rem auto 0; }

.events-page .events { padding: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.events-page .grid { display: grid; gap: 1.5rem; }
.events-page .card { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; background: var(--cream-card); border-radius: 16px; padding: 1.5rem; box-shadow: 0 24px 50px -30px rgba(15,26,48,0.45); border: 1px solid rgba(194,161,77,0.25); }
.events-page .card img { width: 100%; height: auto; border-radius: 8px; display: block; }
.events-page .date { letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.75rem; color: #ad8c3c; font-weight: 600; margin-bottom: 0.4rem; }
.events-page .card h2 { font-family: 'Cormorant Garamond', Georgia, serif; color: var(--navy); font-size: 1.8rem; line-height: 1.15; font-weight: 600; margin-bottom: 0.4rem; }
.events-page .loc { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.8rem; }
.events-page .card p.desc { color: var(--ink); font-size: 0.95rem; margin-bottom: 1rem; }
.events-page .link { display: inline-block; color: var(--navy); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; font-size: 0.92rem; }
.events-page .link:hover { color: #ad8c3c; }

/* Layout option: add class "vertical" to a .card when the featured image is a
   tall poster/flyer. The image gets a wide column so all its text is readable;
   details sit beside it. Without the class, the compact standard layout is used. */
.events-page .card.vertical { grid-template-columns: minmax(280px, 400px) 1fr; align-items: start; gap: 2rem; }
.events-page .card.vertical .poster { position: sticky; top: 1.5rem; }
.events-page .card.vertical .poster a { display: block; }
.events-page .card.vertical img { border-radius: 10px; box-shadow: 0 18px 40px -20px rgba(15,26,48,0.6); }
.events-page .card.vertical h2 { font-size: clamp(1.9rem, 4vw, 2.4rem); }
/* 1:1 image for standard cards: crops a tall flyer to its top (title) area. */
.events-page .card img.square { aspect-ratio: 1 / 1; object-fit: cover; object-position: top; }
.events-page .tag { font-style: italic; color: var(--muted); margin-bottom: 1rem; }
.events-page .facts { list-style: none; display: grid; gap: 0.9rem; margin: 1.1rem 0 1.4rem; }
.events-page .facts li { padding-left: 1.1rem; border-left: 2px solid var(--gold); }
.events-page .facts .lbl { display: block; font-weight: 600; color: var(--navy); }
.events-page .facts .sub { display: block; color: var(--muted); font-size: 0.92rem; }
.events-page .services { list-style: none; display: grid; gap: 0.35rem; margin: 0.4rem 0 1.4rem; }
.events-page .services li::before { content: "✦"; color: var(--gold); margin-right: 0.55rem; }
.events-page .services small { color: var(--muted); }

.events-page .empty { text-align: center; background: var(--cream-card); border: 1px solid rgba(194,161,77,0.25); border-radius: 16px; padding: clamp(2rem, 5vw, 3.5rem) 1.5rem; box-shadow: 0 24px 50px -30px rgba(15,26,48,0.45); }
.events-page .empty h2 { font-family: 'Cormorant Garamond', Georgia, serif; color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 600; margin-bottom: 0.6rem; }
.events-page .empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.6rem; }
.events-page .empty .btn { margin: 0.3rem; }

.events-page .btn { display: inline-block; background: linear-gradient(135deg, var(--gold) 0%, #ad8c3c 100%); color: #fff; text-decoration: none; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.92rem; padding: 1rem 1.8rem; border-radius: 10px; box-shadow: 0 12px 24px -10px rgba(173,140,60,0.7); }
.events-page .btn.alt { background: transparent; color: var(--navy); box-shadow: none; border: 1px solid var(--gold); }

.events-page .more { text-align: center; padding: 0 1.5rem clamp(2.5rem, 6vw, 4rem); }

.events-page footer { margin-top: auto; background: var(--navy-deep); color: rgba(245,241,232,0.75); text-align: center; padding: 2rem 1.5rem; font-size: 0.85rem; }
.events-page footer a { color: var(--gold-soft); text-decoration: none; font-weight: 600; }

@media (max-width: 640px) {
  .events-page .card { grid-template-columns: 1fr; }
  .events-page .card img { max-width: 260px; margin: 0 auto; }
  .events-page .card.vertical { grid-template-columns: 1fr; gap: 1.5rem; }
  .events-page .card.vertical .poster { position: static; }
  .events-page .card.vertical img { max-width: 100%; }
}

/* ============ 5. Homepage header: equal-height buttons + mobile fit ============
   "Events" and "Book a Session" share one fixed height. The Book button is the
   bundle's own <button> sitting directly inside the header's .container. */
header .container > .tg-events .tg-events-btn,
header .container > button {
  box-sizing: border-box; height: 2.5rem; min-height: 2.5rem;
  padding-top: 0; padding-bottom: 0;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; white-space: nowrap; flex-shrink: 0;
}
header .container > .tg-events { display: inline-flex; align-items: center; flex-shrink: 0; }

@media (max-width: 639px) {
  /* Logo: max 120px wide, height auto (also shrinks on very narrow phones). */
  header img[data-testid="img-logo-header"] {
    height: auto; width: auto; max-width: min(120px, 30vw); flex-shrink: 1; min-width: 0;
  }
  header .container { padding-left: 0.75rem; padding-right: 0.75rem; gap: 0.4rem; }
  header .container > .tg-events .tg-events-btn,
  header .container > button {
    height: 2.25rem; min-height: 2.25rem;
    font-size: 0.78rem; padding-left: 0.75rem; padding-right: 0.75rem;
  }
  header .container > .tg-events { margin-right: 0; }
}
