/*
Theme Name: Always Ballroom
Theme URI: https://www.alwaysballroom.ch
Author: Olivier Jeger
Author URI: mailto:jeger@computerscience.ch
Description: Theme für "Always Ballroom"
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: always-ballroom
Tags: dark, event, one-page, custom-colors, full-width-template, translation-ready
*/

/* ===== Design Tokens (extracted from the Herbst flyer) ===== */
:root {
  --gold:        #f4cf57;
  --gold-light:  #ffe488;
  --gold-deep:   #d9a441;
  --ink:         #140d08;   /* near-black backdrop */
  --ink-soft:    #241811;
  --panel:       #1e140c;
  --red:         #e0392b;
  --red-dark:    #b0241a;
  --cream:       #fdf6e6;
  --band:        #f7c948;   /* bright info band */
  --text:        #f3e9d6;
  --text-muted:  #cbb99a;

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Poppins", "Segoe UI", system-ui, sans-serif;

  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .40);
  --radius: 18px;
  --wrap: 1160px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh; display: flex; flex-direction: column; /* full-height: footer fills the bottom on short pages */
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 222, 130, .55) 0%, rgba(150, 100, 40, .18) 24%, transparent 50%),
    radial-gradient(circle at 50% 30%, #3a2714 0%, #1d130a 56%, #0f0905 100%)
    fixed, var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }
.section { padding: 33.6px 0 84px; position: relative; } /* top −60% before headings */
.center { text-align: center; }

/* ===== Site Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 9, 5, .82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(244, 207, 87, .28);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; } /* no underline on hover for the brand link */
.brand__mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold-deep));
  color: #97650e; /* "B" — medium gold */
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 18px;
  box-shadow: 0 0 16px rgba(244, 207, 87, .5);
}
.brand__mark-a { color: #79500b; font-style: italic; } /* "A" — dark gold, italic */
.brand__name {
  font-family: var(--font-display); font-weight: 900;
  font-size: 22px; letter-spacing: .3px;
}
.brand__name .t-red  { color: var(--red);  font-style: italic; }
.brand__name .t-gold { color: var(--gold); }
.main-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  color: var(--text); font-weight: 600; font-size: 15px;
  text-transform: uppercase; letter-spacing: .5px; text-decoration: none;
  padding-bottom: 3px; border-bottom: 2px solid transparent; transition: border-color .2s, color .2s;
}
.main-nav a:hover { border-color: var(--red); color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--gold); }

/* ===== Hero ===== */
.hero { padding: 63px 0 40px; overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
}
.hero__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3rem, 7.5vw, 6rem); line-height: .92;
  margin: 0 0 14px; letter-spacing: -1px;
}
.hero__title .t-red  { color: var(--red);  font-style: italic; display: block; }
.hero__title .t-gold { color: var(--gold); display: block; text-shadow: 0 0 30px rgba(244,207,87,.35); }
.hero__tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.5rem); font-weight: 600;
  margin: 0 0 18px; color: var(--text);
}
.hero__tagline-sub { display: block; font-size: .66em; margin-top: 0; line-height: 1; } /* "350 m² Parkett", smaller, same color, no gap above */
.hero__meta { font-size: 1.05rem; margin: 0 0 8px; color: var(--text-muted); }
.hero__meta strong { color: var(--gold); }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

.btn {
  display: inline-block; font-weight: 700; font-size: 15px;
  text-transform: uppercase; letter-spacing: .6px;
  padding: 14px 28px; border-radius: 999px; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease; text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn--primary { background: var(--red); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--gold); border: 2px solid var(--gold); }
.btn--ghost:hover { background: var(--gold); color: var(--ink); }

.hero__figure { position: relative; }
.hero__figure::before {
  content: ""; position: absolute; inset: -12% -12% -12% -12%;
  background: radial-gradient(circle, rgba(244,207,87,.45), transparent 62%);
  filter: blur(12px); z-index: 0;
}
.hero__figure img {
  position: relative; z-index: 1;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  transform: rotate(2deg); border: 6px solid rgba(244,207,87,.85);
}
.hero__badge {
  position: absolute; z-index: 2; bottom: -22px; left: -22px;
  background: var(--ink); color: var(--gold);
  width: 118px; height: 118px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  font-family: var(--font-display); font-weight: 900; line-height: 1.05;
  box-shadow: var(--shadow-md); transform: rotate(-8deg);
  border: 3px solid var(--red);
}
.hero__badge b { display: block; font-size: 30px; color: var(--red); }
.hero__badge small { font-size: 11px; letter-spacing: 1px; color: var(--gold-light); }

/* ===== Section headings ===== */
.section__head { text-align: center; margin-bottom: 28.8px; } /* −40% around headings */
.section__kicker {
  font-size: .95rem; color: var(--red);
  display: block; text-transform: uppercase; letter-spacing: 4px;
  font-weight: 700; margin-bottom: 7.2px; /* −40% kicker→title gap */
}
.section__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3rem); margin: 0; color: var(--gold);
}

/* ===== Info band (bright yellow, like the flyer) ===== */
.info-band { background: var(--band); color: var(--ink); padding: 15px 0; }
.info-band .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 14px 28px; text-align: center;
}
.info-band__item {
  font-family: var(--font-display); font-weight: 900; font-size: 1.35rem;
  display: inline-flex; align-items: center; gap: 10px;
}
.info-band__item + .info-band__item::before {
  content: "•"; color: var(--red); margin-right: 18px; font-size: 1rem;
}

/* ===== Dance styles — clean vertical list ===== */
.dance-list {
  list-style: none; margin: 0 auto 2em; padding: 0; max-width: 780px; /* 2em bottom = double a paragraph's trailing space */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 6px 34px;
}
.dance-list li {
  font-size: calc(1.08rem - 1px); font-weight: 500; color: var(--text); /* −10%, −1px */
  padding: 5px 0 5px 18px; position: relative;
  border-bottom: 1px solid rgba(244, 207, 87, .16);
  transition: color .2s, padding-left .2s;
}
.dance-list li::before {
  content: "◆"; position: absolute; left: 0; top: 7px;
  color: var(--red); font-size: .8rem;
}
.dance-list li:hover { color: var(--gold); padding-left: 24px; }

/* ===== Dates ===== */
.dates-section .section__title { color: var(--gold); }
/* "Saison …" kicker in white on the Termine page. */
#termine .section__kicker,
#termine-next .section__kicker { color: #fff; }
.dates {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 18px; max-width: 900px; margin-inline: auto;
}
.date-card {
  flex: 0 1 210px;   /* fixed target width; never grows, shrinks only on tiny screens */
  max-width: 210px;
  background: linear-gradient(160deg, var(--red), var(--red-dark));
  color: #fff; border-radius: var(--radius); padding: 24px 20px;
  text-align: center; box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,.12);
}
.date-card__day { font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: .9; font-size: .8rem; line-height: 1.3; }
/* Event time — same font/treatment as the weekday. */
/* Time and location stacked: location always on its own line just below the time. */
.date-card__meta {
  display: flex; flex-direction: column; align-items: center;
  gap: 0; margin-top: 6px;
}
.date-card__time,
.date-card__location { font-weight: 600; text-transform: uppercase; letter-spacing: 1px; opacity: .9; font-size: .8rem; line-height: 1.15; }
/* Any venue other than the default Chesselhuus is highlighted in gold, with a
   small warning emoji in front to flag the non-standard location. Likewise any
   weekday other than Monday. */
.date-card__location--away,
.date-card__day--away { color: var(--gold); opacity: 1; }
.date-card__location--away::before { content: "⚠️"; margin-right: .3em; }
.date-card__day--xmas::before { content: "🎄"; margin-right: .3em; } /* 18–27 Dec */
.date-card__date { font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; margin: 0; line-height: 1.3; }
.date-card__date time { color: inherit; }
.date-card__date--away { color: var(--gold); } /* non-Monday date in gold too (no extra emoji); time inherits it */
.dates-empty { text-align: center; color: var(--text-muted); font-size: 1.1rem; }
.hero__next-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin: 4px 0 22px; } /* top-align info with the event box */
.hero__next-row .hero__next { margin: 0; } /* row owns the spacing now */
/* Special-info callout — meant to pop (announces something for this event). */
.hero__next-info {
  position: relative;
  max-width: 300px;
  color: var(--ink);
  font-size: .98rem; font-weight: 600; line-height: 1.4;
  background: linear-gradient(135deg, var(--gold-light), var(--band));
  border-radius: 14px;
  padding: 14px 16px 14px 38px;
  transform: rotate(-8deg); /* tilt to the left */
  /* light-yellow shiny outer glow (static, no pulse) */
  box-shadow: 0 0 18px 3px rgba(255, 231, 150, .9), 0 0 46px 10px rgba(247, 201, 72, .5);
}
.hero__next-info__icon {
  position: absolute; left: 13px; top: 14px; /* = padding-top, aligns with first line */
  font-size: 1.2rem; line-height: 22px;
}
.hero__next-info p:first-of-type { margin-top: 0 !important; } /* first paragraph flush to top */
.hero__next-info p:last-of-type { margin-bottom: 0; }
.hero__next { margin: 4px 0 22px; } /* next-date card above the hero CTA */
.hero__next-title { /* match .section__kicker ("Von Standard bis Latin") */
  font-size: .95rem; color: var(--red); text-transform: uppercase;
  letter-spacing: 4px; font-weight: 700; margin: 0 0 10px;
}
.dates-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }

/* Past events — muted "Rückblick" look */
.date-card--past {
  background: linear-gradient(160deg, #3a2c22, #241811);
  border: 1px solid rgba(244, 207, 87, .22);
  color: var(--text-muted);
  opacity: .85;
}
.date-card--past .date-card__date { color: var(--gold-deep); }

/* ===== Info grid ===== */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px; max-width: 960px; margin: 0 auto 2em; /* 2em bottom = same trailing space as the dance list */
}
.info-card {
  background: #fae097; color: var(--ink);
  border-radius: var(--radius); padding: 16px 26px;
  text-align: center; box-shadow: var(--shadow-md); border-top: 5px solid var(--red);
}
.info-card--link { display: block; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .2s ease; }
.info-card--link:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.info-card__icon { font-size: 2.4rem; line-height: 1; }
.info-card h3 {
  font-family: var(--font-display); margin: 4px 0 2px; font-size: 1.1rem; color: #000;
  /* Never overflow the card: long words wrap (and hyphenate) inside the padding. */
  overflow-wrap: anywhere; hyphens: auto;
}
.info-card p { margin: 0; color: var(--ink-soft); }
.info-card p.info-card__sub { font-size: 75%; margin-top: 7px; } /* address / parking line — 25% smaller, with a gap above (beats .info-card p margin:0) */
.info-card a { color: var(--red-dark); }
.info-card .big { font-family: var(--font-display); font-weight: 900; font-size: 1.4rem; line-height: 1; margin: 5px 0; color: var(--red-dark); overflow-wrap: anywhere; hyphens: auto; }
.info-card__email { font-size: .8rem; letter-spacing: -.2px; }
/* Interactive location map (Google embed) — full width inside the content. */
.location-map { display: block; width: 100%; height: 420px; border: 0; border-radius: var(--radius); }

/* ===== Content (pages / posts) ===== */
.content-area { padding-bottom: 28.56px; } /* 84px − 66% — less space after the content on normal pages */
.entry {
  background: var(--panel); color: var(--text);
  border-radius: var(--radius); padding: 42px clamp(24px, 5vw, 60px);
  box-shadow: var(--shadow-md); max-width: 984px; margin: 0 auto; /* 820px + 20% */
  border: 1px solid rgba(244, 207, 87, .14);
}
.entry a { color: var(--red); } /* content links red on default-template pages (custom templates like the front page are unaffected) */
.entry h1, .entry h2, .entry h3 { font-family: var(--font-display); color: var(--gold); }
.entry .info-card h3 { color: #000; } /* info-card headings stay black, not the gold .entry heading colour */
.entry .info-card a { color: var(--red-dark); } /* card links (e.g. the email) stay reddish, not the gold .entry link colour */
/* H6 styled like the "Nächster Tanzabend" kicker (.hero__next-title). */
h6 {
  font-size: .95rem; color: var(--red); text-transform: uppercase;
  letter-spacing: 4px; font-weight: 700; margin: 0 0 10px;
}
.entry-title { font-family: var(--font-display); font-weight: 900; font-size: 2.4rem; margin-top: 0; color: var(--gold); }
.entry img { border-radius: 10px; }

/* ===== Footer ===== */
/* .site-content grows so the small footer stripe stays pinned to the bottom. */
.site-content { flex: 1 0 auto; }
.site-footer {
  flex: 0 0 auto; /* small fixed stripe, not a fill */
  display: flex; align-items: center; justify-content: center; /* centre the copyright in the stripe */
  min-height: calc(.85rem * 3); /* ~3× the copyright font size */
  background: #0c0704; color: var(--text-muted);
  padding: 0 0; text-align: center;
  border-top: 1px solid rgba(244, 207, 87, .2);
}
.site-footer .brand__name { font-size: 26px; }
.site-footer a { color: var(--gold); }
.footer-contact { margin: 14px 0; font-size: 1.05rem; }
.footer-contact strong { color: var(--gold); }
.footer-legal { opacity: .6; font-size: .85rem; margin: 0; }

/* ===== Responsive ===== */
/* "Mehr anzeigen" button — hidden by default; shown per breakpoint below. */
.dates-more-wrap { text-align: center; margin-top: 20px; }
.dates-more { display: none; }

/* Non-mobile: collapse the upcoming list to 12 entries; button reveals the rest. */
/* Desktop mode = tablets, laptops, desktops (everything wider than a phone). */
@media (min-width: 768px) {
  .dates.is-collapsed .date-card:nth-child(n+13) { display: none; }
  .dates-more.more-desktop:not([hidden]) { display: inline-block; }
  .date-card { padding-top: 10px; padding-bottom: 10px; } /* compact date cards on desktop (hero + Termine) */
  /* Drop the callout to the card's level (below the "Nächster Tanzabend" title). */
  .hero__next-info { margin-top: 34px; }
  /* All four info cards on a single row on desktop (shrink to fit narrow containers). */
  .info-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Mobile mode = smartphones only (portrait phones up to ~767px). */
@media (max-width: 767px) {
  .hero { padding-top: 14px; } /* ~20% of the desktop 70px, before the flyer on mobile */
  .hero__title { display: none; } /* hide the big "Always Ballroom" title on mobile */
  .info-band { display: none; }   /* hide info band on mobile */
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__cta { justify-content: center; }
  .hero__next .date-card { margin-inline: auto; } /* center the next-date card on mobile */
  .hero__next-row { justify-content: center; text-align: center; }
  .hero__next-info { margin-top: 22px; text-align: left; } /* more air above; keep the callout text left-aligned (row is centered) */
  .hero__figure { order: -1; max-width: 210px; margin: 0 auto 10px; } /* 50% smaller on mobile */
  /* "Eintritt" badge 30% smaller on mobile. */
  .hero__badge { width: 83px; height: 83px; border-width: 2px; }
  .hero__badge b { font-size: 21px; }
  .hero__badge small { font-size: 8px; }
  .main-nav { display: none; }
  .main-nav.open {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); border-bottom: 2px solid var(--gold);
  }
  .main-nav.open ul { flex-direction: column; padding: 18px 24px; gap: 14px; }
  .nav-toggle { display: block; }
  .section { padding: 24px 0 60px; } /* top −60% before headings */
  /* More compact date cards on small screens: less vertical padding. */
  .date-card { padding: 6px 18px; }
  .date-card__day { font-size: .72rem; }
  .date-card__date { font-size: 1.5rem; }
  /* Collapse to the first 5 upcoming dates; "Mehr anzeigen" reveals the rest. */
  .dates.is-collapsed .date-card:nth-child(n+6) { display: none; }
  /* :not([hidden]) so the button disappears once JS sets hidden (list expanded). */
  .dates-more.more-mobile:not([hidden]) { display: inline-block; }
}

/* Below 562px, drop the dance-styles block on the Infos page (page-id-91):
   the "Von Standard bis Latein" kicker, the "Diese Tänze erwarten Dich"
   heading and the dance list itself. The two headings are generic
   .wp-block-heading elements, so they're matched by their position relative
   to .dance-list (via :has()) rather than by text. */
@media (max-width: 561px) {
  .page-id-91 .dance-list,
  .page-id-91 .wp-block-heading:has(+ .dance-list),
  .page-id-91 .wp-block-heading:has(+ .wp-block-heading + .dance-list) {
    display: none;
  }
}
