/* ===================================
   Bauspielplatz Zürich-Affoltern
   Global Styles
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Caveat:wght@500;700&display=swap');

:root {
  /* Earthy, warm adventure palette */
  --color-wood: #8B5E3C;
  --color-wood-light: #A67C5B;
  --color-wood-dark: #5C3D2E;
  --color-grass: #4A7C59;
  --color-grass-light: #6BA368;
  --color-grass-dark: #2D5A3A;
  --color-sky: #5B9BD5;
  --color-sky-light: #B8D8F8;
  --color-fire: #E8742A;
  --color-fire-light: #F5A623;
  --color-cream: #FFF8F0;
  --color-sand: #F5E6D3;
  --color-text: #3A2E28;
  --color-text-light: #6B5D54;
  --color-white: #FFFFFF;
  --color-alert: #C0392B;

  /* Typography */
  --font-body: 'Nunito', -apple-system, sans-serif;
  --font-hand: 'Caveat', cursive;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width: 1140px;
  --radius: 12px;
  --radius-lg: 20px;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-cream);
  line-height: 1.7;
  font-size: 17px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-wood); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--color-fire); }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-wood-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-bottom: var(--space-sm); }

p + p { margin-top: var(--space-md); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===================================
   Navigation
   =================================== */
.site-nav {
  background: var(--color-white);
  border-bottom: 3px solid var(--color-sand);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 52px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
}

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--color-text);
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--color-sand);
  color: var(--color-wood-dark);
}

.nav-links a.active {
  background: var(--color-wood);
  color: var(--color-white);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: var(--color-wood);
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  color: white;
}

.nav-toggle svg { width: 28px; height: 28px; }

/* Language button */
.nav-lang {
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  background: var(--color-sky-light);
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}
.nav-lang:hover { background: var(--color-sky); color: white; }

/* Mobile Nav */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 3px solid var(--color-sand);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 1.05rem;
    padding: 0.7rem 0.75rem;
  }
}

/* ===================================
   Hero
   =================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-wood-dark);
}

.hero-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  filter: brightness(0.85);
}

@media (min-width: 768px) {
  .hero-img { height: 420px; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(58,46,40,0.3) 0%, rgba(58,46,40,0.6) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  text-align: center;
}

.hero-title {
  color: var(--color-white);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  text-shadow: 0 3px 20px rgba(0,0,0,0.5);
  max-width: 700px;
}

.hero-subtitle {
  font-family: var(--font-hand);
  color: var(--color-fire-light);
  font-size: clamp(1.3rem, 3vw, 2rem);
  margin-top: var(--space-sm);
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* ===================================
   Content Layout
   =================================== */
.page-content {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-3xl);
  }
}

/* ===================================
   Cards & Sections
   =================================== */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
}

.card + .card { margin-top: var(--space-xl); }

.card-highlight {
  border-left: 5px solid var(--color-fire);
  background: linear-gradient(135deg, #FFF8F0, #FFF3E8);
}

.card-alert {
  border-left: 5px solid var(--color-alert);
  background: #FFF5F5;
}

.card-alert p { color: var(--color-alert); font-weight: 700; }

.section-label {
  font-family: var(--font-hand);
  color: var(--color-fire);
  font-size: 1.3rem;
  display: block;
  margin-bottom: var(--space-xs);
}

/* ===================================
   Sidebar
   =================================== */
.sidebar .card {
  padding: var(--space-lg);
}

.sidebar-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-grass-dark);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sidebar-heading .icon {
  font-size: 1.4rem;
}

.sidebar .info-line {
  font-size: 0.95rem;
  color: var(--color-text-light);
  padding: 0.2rem 0;
}

.sidebar .info-line strong {
  color: var(--color-text);
}

/* Map */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===================================
   Image with caption
   =================================== */
.figure {
  border-radius: var(--radius);
  overflow: hidden;
  margin: var(--space-lg) 0;
}

.figure img {
  width: 100%;
  border-radius: var(--radius);
}

.figure figcaption {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-top: var(--space-xs);
  font-style: italic;
}

/* ===================================
   Photo Grid (Impressionen)
   =================================== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
}

.photo-grid img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.3s;
  cursor: pointer;
}

.photo-grid img:hover {
  transform: scale(1.03);
}

/* ===================================
   Rules list
   =================================== */
.rules-list {
  list-style: none;
  padding: 0;
}

.rules-list li {
  padding: var(--space-sm) 0;
  padding-left: 2rem;
  position: relative;
  font-size: 1rem;
}

.rules-list li::before {
  content: '🔨';
  position: absolute;
  left: 0;
  top: var(--space-sm);
}

/* ===================================
   CTA / Buttons
   =================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--color-wood);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-wood-dark);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-wood);
  border: 2px solid var(--color-wood);
}
.btn-outline:hover {
  background: var(--color-wood);
  color: var(--color-white);
}

/* ===================================
   Quick Links Grid (homepage)
   =================================== */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.quick-link {
  text-decoration: none;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  border: 2px solid var(--color-sand);
  transition: all 0.25s;
  color: var(--color-text);
}

.quick-link:hover {
  border-color: var(--color-wood-light);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  color: var(--color-wood-dark);
}

.quick-link .ql-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--space-sm);
}

.quick-link .ql-label {
  font-weight: 700;
  font-size: 0.95rem;
}

/* ===================================
   Footer
   =================================== */
.site-footer {
  background: var(--color-wood-dark);
  color: rgba(255,255,255,0.85);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.site-footer a {
  color: rgba(255,255,255,0.9);
}

.site-footer a:hover {
  color: var(--color-fire-light);
}

.footer-label {
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.7;
}

/* ===================================
   Utility
   =================================== */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Gentle page load animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeUp 0.5s ease-out both;
}

.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }

/* ===================================
   Event Grid (Programm page)
   =================================== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.event-grid .card { margin-top: 0; }

.event-grid .figure {
  margin-bottom: 0;
}

/* ===================================
   Person Cards (Über uns)
   =================================== */
.person-card {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-sand);
}

.person-card:last-child { border-bottom: none; }

.person-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-sand);
}

.person-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-wood-dark);
  margin-bottom: 0.2rem;
}

.person-role {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.person-bio {
  font-size: 0.92rem;
  margin-top: var(--space-xs);
  line-height: 1.6;
}

/* Two column layout for about page */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 768px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

/* ===================================
   Sponsors list
   =================================== */
.sponsor-list {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: var(--space-xl);
}

.sponsor-list li {
  padding: var(--space-xs) 0;
  font-size: 0.95rem;
  break-inside: avoid;
}

/* ===================================
   Memory Game (Games page)
   =================================== */
.game-container {
  display: grid;
  gap: 10px;
  justify-content: center;
  margin-top: var(--space-lg);
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 600px) {
  .game-container { grid-template-columns: repeat(3, 1fr); }
}

.game-card {
  background-color: var(--color-wood);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  max-width: 200px;
  transition: transform 0.2s;
}

.game-card:hover { transform: scale(1.03); }

.game-card img {
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
}

.game-card.flipped img { display: block; }

.game-stats {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}
