/* --- Base / Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #443B30;
  background: #fff;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #E4428E;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Layout --- */
main, footer {
  max-width: 54rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* --- Header (sticky, always visible) --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid rgba(68, 59, 48, 0.15);
}

.header-inner {
  max-width: 54rem;
  margin: 0 auto;
  padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.logo {
  max-height: 3.5rem;
  width: auto;
  display: block;
}

/* Hamburger: hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hamburger-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #443B30;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

nav.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

nav a {
  color: #443B30;
  font-size: 0.95rem;
  padding: 0.35em 0.1em;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

nav a:hover {
  color: #E4428E;
}

/* --- Sections --- */
section {
  padding: 2.75rem 0;
}

/* Offset for sticky header when scrolling to section from nav */
#ueber-mich,
#so-lernen-wir,
#organisatorisches {
  scroll-margin-top: 2rem;
}

section:has(.bee-section:last-child) {
  padding-bottom: 0;
}

section:nth-child(even) {
  background: rgba(126, 205, 233, 0.12);
}

h1 {
  font-size: 1.75rem;
  line-height: 1.35;
  margin: 0 0 1.25rem;
  color: #E4428E;
}

h2 {
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  color: #7ECDE9;
}

/* Hero title: base text #443B30, keywords in #E4428E, #FECA44, #7ECDE9 */
#hero h1.hero-title {
  color: #443B30;
}

#hero .t-lernen { color: #E4428E; }
#hero .t-spielen { color: #FECA44; }
#hero .t-wachsen { color: #7ECDE9; }

/* Hero title: alternating DE / EN with crossfade */
.hero-title-wrap {
  display: block;
  position: relative;
  min-height: 5rem;
}

.hero-title-de,
.hero-title-en {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;
}

.hero-title-de {
  animation: hero-lang-de 5s ease-in-out infinite;
}

.hero-title-en {
  animation: hero-lang-en 5s ease-in-out infinite;
}

@keyframes hero-lang-de {
  0%, 45% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

@keyframes hero-lang-en {
  0%, 45% { opacity: 0; }
  55%, 100% { opacity: 1; }
}

section p, section ul {
  margin: 0 0 1.25rem;
}

ul {
  padding-left: 1.5rem;
}

/* Extra padding for text inside sections */
section h1,
section h2,
section p,
section ul,
.map-attribution,
footer p {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* --- Bee section (full-width white background for non‑transparent bee images) --- */
.bee-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #fff;
  padding: 1.25rem 0;
  margin-bottom: 0;
  text-align: center;
}

.bee-section img {
  display: block;
  margin: 0 auto;
  vertical-align: middle;
}

/* --- Hero --- */
#hero {
  text-align: center;
  padding-top: 3rem;
}

#hero .bee-section {
  margin-top: 2rem;
}

#hero .bee-section .hero-bee {
  max-width: 8rem;
  animation: bee-fly 2.8s ease-in-out infinite;
}

@keyframes bee-fly {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(3px, -8px); }
  50% { transform: translate(0, -12px); }
  75% { transform: translate(-3px, -6px); }
}

/* --- CTA --- */
#cta {
  text-align: center;
  background: rgba(254, 202, 68, 0.18);
}

.cta-link {
  font-weight: 600;
}

/* --- Standort --- */
.standort-address {
  margin-bottom: 1.5rem;
}

.standort-map {
  margin-bottom: 0;
  max-width: 100%;
}

.standort-map iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: 0;
  pointer-events: none;
}

.map-attribution {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #443B30;
}

#standort .bee-section {
  margin-top: 1.5rem;
}

#standort .bee-section .deco-bee {
  max-width: 5rem;
  opacity: 0.85;
}

/* --- Section with image (Das bin ich, Mehr als nur Englisch) --- */
.section-with-image {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.section-with-image img {
  flex: none;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  border-radius: 0.5rem;
}

.section-with-image > div {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* --- So lernen wir: image row --- */
.image-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.image-row img {
  flex: 1 1 140px;
  min-width: 0;
  border-radius: 0.5rem;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* --- Für Eltern: single section image --- */
.section-image {
  display: block;
  margin: 1.5rem auto 0;
  border-radius: 0.5rem;
  max-width: 28rem;
}

/* --- Organisatorisches --- */
#organisatorisches .bee-section {
  margin-top: 1.5rem;
}

#organisatorisches .bee-section .deco-bee {
  max-width: 4rem;
  opacity: 0.8;
}

/* --- Footer --- */
footer {
  padding: 2.5rem 0 calc(3rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  background: rgba(254, 202, 68, 0.12);
  border-top: 1px solid rgba(68, 59, 48, 0.15);
}

footer:has(.bee-section:last-child) {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

footer p {
  margin: 0 0 1rem;
}

footer p:last-of-type {
  margin-bottom: 1.25rem;
}

footer .bee-section {
  margin-top: 1.25rem;
}

footer .bee-section .footer-bee {
  max-width: 4rem;
  opacity: 0.85;
}

/* --- Responsive: tablet and down --- */
@media (max-width: 768px) {
  main, header, footer {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  section {
    padding: 2.25rem 0;
  }
}

@media (max-width: 640px) {
  .standort-map iframe {
    height: 220px;
  }
}

/* --- Responsive: phone --- */
@media (max-width: 600px) {
  .hamburger {
    display: flex;
    order: 2;
  }

  nav.nav-menu {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    order: 3;
    gap: 0;
    padding-top: 0.5rem;
  }

  header.is-open nav.nav-menu {
    display: flex;
  }

  nav.nav-menu a {
    padding: 0.6rem 0;
  }

  header.is-open .hamburger .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  header.is-open .hamburger .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  header.is-open .hamburger .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .logo {
    max-height: 2.75rem;
  }

  .image-row {
    gap: 1rem;
    margin-top: 1.5rem;
  }

  .image-row img {
    flex: 1 1 100%;
    min-width: 0;
  }

  #hero {
    padding-top: 2.5rem;
  }

  #hero .bee-section .hero-bee,
  .bee-section .deco-bee,
  .bee-section .footer-bee {
    max-width: 5rem;
  }

  h1 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
  }

  h2 {
    font-size: 1.2rem;
    margin: 0 0 1rem;
  }

  section p, section ul {
    margin: 0 0 1rem;
  }
}

/* --- Responsive: small phone --- */
@media (max-width: 400px) {
  main, header, footer {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  section {
    padding: 1.75rem 0;
  }

  #hero {
    padding-top: 2rem;
  }

  h1 {
    font-size: 1.35rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  .standort-map iframe {
    height: 200px;
  }
}
