/* === Kinderbetreuung Baumhaus === */

:root {
  --leaf-deep: #2d4a2b;
  --leaf: #4a6b3a;
  --moss: #7a8f5c;
  --bark: #6b4a2b;
  --bark-light: #8b6b47;
  --cream: #faf6ec;
  --cream-warm: #f3ead4;
  --sun: #e8a83a;
  --sun-soft: #f4c97a;
  --berry: #b8462e;
  --ink: #2a2418;
  --paper: #fdfaf0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lora', Georgia, serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(122, 143, 92, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(232, 168, 58, 0.06) 0%, transparent 40%);
}

/* === Header === */
.site-header {
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--paper) 100%);
  border-bottom: 3px solid var(--leaf-deep);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 12px;
  background-image:
    radial-gradient(circle at 10px 12px, var(--leaf-deep) 6px, transparent 7px),
    radial-gradient(circle at 30px 12px, var(--leaf-deep) 6px, transparent 7px),
    radial-gradient(circle at 50px 12px, var(--leaf-deep) 6px, transparent 7px);
  background-size: 40px 12px;
  background-repeat: repeat-x;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

h1.site-title {
  font-family: 'Caveat', 'Lora', cursive;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--leaf-deep);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h1.site-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--sun);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.logo-link {
  display: block;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.logo-link:hover {
  transform: rotate(-2deg) scale(1.04);
}

.logo-link img {
  width: 200px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(45, 74, 43, 0.15));
}

/* === Navigation === */
nav.main-nav {
  background: var(--leaf-deep);
  border-bottom: 4px solid var(--bark);
}

nav.main-nav ul {
  list-style: none;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

nav.main-nav a {
  display: block;
  padding: 1.1rem 1.8rem;
  color: var(--cream);
  text-decoration: none;
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  position: relative;
}

nav.main-nav a:hover {
  background: var(--leaf);
  color: var(--sun-soft);
}

nav.main-nav a.active {
  background: var(--sun);
  color: var(--leaf-deep);
}

nav.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bark);
}

/* === Main content === */
main {
  flex: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
  width: 100%;
}

.lead {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--bark);
  line-height: 1.3;
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  padding: 1.5rem 1rem;
}

.lead::before,
.lead::after {
  content: '❦';
  color: var(--sun);
  font-size: 1.4rem;
  display: block;
  margin: 0.5rem 0;
}

main h2 {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem;
  color: var(--leaf-deep);
  margin: 2rem 0 1rem;
  border-bottom: 2px dashed var(--moss);
  padding-bottom: 0.3rem;
}

main p {
  margin-bottom: 1.3rem;
  font-size: 1.08rem;
}

main p.greeting {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  color: var(--leaf);
  margin-bottom: 1rem;
}

/* Steckbrief list */
ul.steckbrief {
  list-style: none;
  display: grid;
  gap: 1.2rem;
  margin: 2rem 0;
}

ul.steckbrief li {
  background: var(--cream);
  border-left: 5px solid var(--sun);
  padding: 1.2rem 1.5rem;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 2px 8px rgba(45, 74, 43, 0.06);
  position: relative;
  padding-left: 3.5rem;
  font-size: 1.05rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

ul.steckbrief li:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(45, 74, 43, 0.12);
}

ul.steckbrief li::before {
  content: '🌿';
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
}

ul.steckbrief li:nth-child(2)::before { content: '🍎'; }
ul.steckbrief li:nth-child(3)::before { content: '🎓'; }
ul.steckbrief li:nth-child(4)::before { content: '⛑️'; }
ul.steckbrief li:nth-child(5)::before { content: '📜'; }

ul.steckbrief strong {
  color: var(--leaf-deep);
  display: block;
  font-family: 'Lora', serif;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

/* Impressum & Datenschutz blocks */
.impressum-block {
  background: var(--cream);
  padding: 1.5rem 1.8rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--moss);
}

.impressum-block h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.impressum-block p {
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.impressum-block ul.ds-list {
  list-style: none;
  margin: 0.6rem 0 0.9rem;
  padding-left: 0;
  display: grid;
  gap: 0.35rem;
}

.impressum-block ul.ds-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 1rem;
}

.impressum-block ul.ds-list li::before {
  content: '›';
  position: absolute;
  left: 0.2rem;
  color: var(--sun);
  font-weight: 700;
}

/* === Footer === */
footer {
  margin-top: auto;
  background: var(--leaf-deep);
  color: var(--cream);
  padding: 2rem 1.5rem 1.5rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 12px;
  background-image:
    radial-gradient(circle at 10px 0, var(--paper) 6px, transparent 7px),
    radial-gradient(circle at 30px 0, var(--paper) 6px, transparent 7px),
    radial-gradient(circle at 50px 0, var(--paper) 6px, transparent 7px);
  background-size: 40px 12px;
  background-repeat: repeat-x;
}

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(250, 246, 236, 0.2);
}

.footer-links a {
  color: var(--sun-soft);
  text-decoration: none;
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-line {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--cream);
}

.contact-line .nowrap {
  white-space: nowrap;
}

.contact-line a {
  color: var(--sun-soft);
  text-decoration: none;
}

.contact-line a:hover {
  text-decoration: underline;
}

.contact-line .sep {
  color: var(--moss);
  margin: 0 0.5rem;
}

/* === Gallery === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--cream);
  border: 4px solid var(--cream);
  box-shadow: 0 4px 14px rgba(45, 74, 43, 0.12);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 0;
}

.gallery-item:nth-child(odd) {
  transform: rotate(-1deg);
}

.gallery-item:nth-child(even) {
  transform: rotate(1deg);
}

.gallery-item:hover {
  transform: rotate(0) scale(1.04);
  box-shadow: 0 8px 22px rgba(45, 74, 43, 0.22);
  z-index: 2;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 4px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item .caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(45, 74, 43, 0.85) 100%);
  color: var(--cream);
  padding: 2rem 0.8rem 0.7rem;
  font-family: 'Caveat', cursive;
  font-size: 1.3rem;
  text-align: center;
  line-height: 1.1;
}

.gallery-item.video-item .video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 74, 43, 0.25);
  pointer-events: none;
}

.gallery-item.video-item .play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(250, 246, 236, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gallery-item.video-item .play-icon::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent var(--leaf-deep);
  margin-left: 6px;
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 8, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}

.lightbox.open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  cursor: default;
  animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--leaf-deep);
  border: 3px solid var(--leaf-deep);
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 1001;
  font-family: 'Lora', serif;
}

.lightbox-close:hover {
  background: var(--sun);
  transform: rotate(90deg) scale(1.1);
}

.lightbox-close:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--leaf-deep);
  border: 3px solid var(--leaf-deep);
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 1001;
  transition: background 0.2s ease, transform 0.2s ease;
  font-family: 'Lora', serif;
  padding: 0;
}

.lightbox-nav:hover {
  background: var(--sun);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.lightbox-prev {
  left: 1.2rem;
}

.lightbox-next {
  right: 1.2rem;
}

.lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(45, 74, 43, 0.85);
  color: var(--cream);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  z-index: 1001;
}

body.lightbox-open {
  overflow: hidden;
}

/* === Responsive === */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem 2rem;
  }

  .logo-link img {
    width: 160px;
  }

  nav.main-nav ul {
    padding: 0;
    justify-content: center;
  }

  nav.main-nav a {
    padding: 0.9rem 1.2rem;
    font-size: 1.3rem;
  }

  main {
    padding: 2rem 1.2rem 3rem;
  }

  .footer-links {
    gap: 1.2rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
  }

  .gallery-item .caption {
    font-size: 1.05rem;
    padding: 1.5rem 0.5rem 0.5rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .lightbox-counter {
    bottom: 1rem;
    font-size: 1rem;
  }
}
