/* ============================================================
   Förderverein Grundschule Langenenslingen — Gemeinsame Styles
   ============================================================ */

:root {
  --orange: #FF7043;
  --orange-dark: #E65100;
  --orange-light: #FFF3E0;
  --green: #4CAF50;
  --green-dark: #2E7D32;
  --green-light: #E8F5E9;
  --blue: #42A5F5;
  --blue-dark: #1565C0;
  --blue-light: #E3F2FD;
  --warm-bg: #FFF9F0;
  --brown: #5D4037;
  --brown-light: #8D6E63;
  --gold: #FFD54F;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Quicksand', sans-serif; background: var(--warm-bg); color: #333; }

/* === NAV === */
.nav { display: flex; align-items: center; justify-content: space-between;
       padding: 12px 5%; background: #fff; position: sticky; top: 0; z-index: 100;
       box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo .icon { width: 40px; height: 40px; background: var(--orange);
                  border-radius: 50% 50% 50% 10%; transform: rotate(-10deg);
                  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-logo .icon span { transform: rotate(10deg); color: #fff; font-size: 20px;
                       font-weight: 800; font-family: 'Baloo 2', cursive; }
.nav-logo .text { font-family: 'Baloo 2', cursive; font-size: 17px;
                  color: var(--orange-dark); line-height: 1.1; }
.nav-logo .text small { display: block; font-family: 'Quicksand', sans-serif;
                        font-size: 11px; color: var(--brown-light); font-weight: 600; }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-size: 13px; font-weight: 700;
               color: var(--brown); padding: 8px 16px; border-radius: 24px;
               transition: all .2s; white-space: nowrap; }
.nav-links a:hover { background: var(--orange-light); color: var(--orange-dark); }
.nav-links a.active { background: var(--orange); color: #fff; }

/* === HERO === */
.hero { position: relative; height: 420px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0;
                background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.1) 60%);
                display: flex; flex-direction: column; justify-content: flex-end;
                padding: 40px 5%; color: #fff; }
.hero-overlay h1 { font-family: 'Baloo 2', cursive; font-size: 38px; line-height: 1.1;
                   text-shadow: 2px 3px 10px rgba(0,0,0,.4); }
.hero-overlay p { font-size: 16px; opacity: .9; margin-top: 6px; max-width: 560px; }
.hero-dots { display: flex; gap: 6px; margin-top: 14px; }
.hero-dots span { width: 14px; height: 14px; border-radius: 50%; }
.hero-caption { font-size: 11px; opacity: .7; margin-top: 4px; }
.hero-wave { position: absolute; bottom: -2px; left: 0; right: 0; height: 40px; display: block; }

.hero-small { height: 240px; }
.hero-small .hero-overlay h1 { font-size: 30px; }

/* === SECTIONS === */
.section { padding: 48px 5%; }
.section-title { font-family: 'Baloo 2', cursive; font-size: 26px;
                 color: var(--orange-dark); margin-bottom: 6px; }
.section-sub { font-size: 15px; color: var(--brown-light);
               margin-bottom: 24px; max-width: 640px; }
.section-white { background: #fff; }
.section-blue { background: var(--blue-light); }

/* === BUBBLE CARDS === */
.bubbles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.bubble { background: #fff; border-radius: 20px; padding: 16px 18px;
          border: 2px dashed #FFCC80; display: flex; gap: 14px; align-items: flex-start;
          transition: transform .2s, border-color .2s; }
.bubble:hover { transform: translateY(-2px); border-color: var(--orange); }
.bubble .ico { width: 48px; height: 48px; border-radius: 50%;
               display: flex; align-items: center; justify-content: center;
               font-size: 22px; flex-shrink: 0; }
.bubble h3 { font-size: 15px; font-weight: 700; color: var(--brown); }
.bubble p { font-size: 12px; color: var(--brown-light); line-height: 1.4; margin-top: 3px; }

/* === NEWS CARDS === */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden;
             border: 2px solid var(--orange-light);
             transition: transform .2s, border-color .2s; }
.news-card:hover { transform: translateY(-3px); border-color: var(--orange); }
.news-card .news-img { height: 160px; overflow: hidden; }
.news-card .news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-img img { transform: scale(1.05); }
.news-card .news-body { padding: 14px 16px; }
.news-card .news-date { font-size: 11px; color: var(--orange); font-weight: 700; }
.news-card h4 { font-size: 14px; font-weight: 700; color: var(--brown); margin: 4px 0; }
.news-card p { font-size: 12px; color: #888; line-height: 1.4; }

/* === REGION === */
.region-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.region-card { border-radius: var(--radius); overflow: hidden; position: relative; height: 200px; }
.region-card img { width: 100%; height: 100%; object-fit: cover; }
.region-card .cap { position: absolute; bottom: 0; left: 0; right: 0;
                    background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
                    color: #fff; padding: 16px; }
.region-card .cap h4 { font-family: 'Baloo 2', cursive; font-size: 16px; }
.region-card .cap p { font-size: 12px; opacity: .85; }

/* === TEAM === */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.team-member { text-align: center; padding: 16px 8px; background: #fff;
               border-radius: var(--radius); border: 2px solid var(--green-light); }
.team-member.with-photo { padding: 0; overflow: hidden; }
.team-member.with-photo .photo { width: 100%; aspect-ratio: 1; background: var(--green-light);
                                   display: flex; align-items: center; justify-content: center; }
.team-member.with-photo .photo img { width: 100%; height: 100%; object-fit: cover; }
.team-member.with-photo .photo .placeholder { font-family: 'Baloo 2', cursive;
                                                font-size: 32px; color: var(--green-dark); }
.team-member.with-photo .info { padding: 12px 8px; }
.team-member .av { width: 52px; height: 52px; border-radius: 50%; background: var(--green-light);
                   display: flex; align-items: center; justify-content: center;
                   margin: 0 auto 8px; font-size: 16px; font-weight: 700;
                   color: var(--green-dark); font-family: 'Baloo 2', cursive; }
.team-member .name { font-size: 13px; font-weight: 700; color: var(--brown); }
.team-member .role { font-size: 11px; color: var(--brown-light); margin-top: 2px; }

/* === TEACHER LIST === */
.teacher-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.teacher-card { background: #fff; border-radius: 14px; padding: 14px;
                border-left: 4px solid var(--orange); display: flex; gap: 12px; align-items: center; }
.teacher-card .ph { width: 48px; height: 48px; border-radius: 50%;
                    background: var(--orange-light); flex-shrink: 0;
                    display: flex; align-items: center; justify-content: center;
                    font-family: 'Baloo 2', cursive; font-size: 16px; color: var(--orange-dark); }
.teacher-card .info { flex: 1; min-width: 0; }
.teacher-card .info .name { font-weight: 700; color: var(--brown); font-size: 13px; }
.teacher-card .info .role { font-size: 11px; color: var(--brown-light); }
.teacher-card.lead { border-left-color: var(--green-dark); }
.teacher-card.lead .ph { background: var(--green-light); color: var(--green-dark); }

/* === BEIRAT TABLE === */
.beirat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.beirat-card { background: #fff; border-radius: 14px; padding: 16px;
               border-left: 4px solid var(--green); }
.beirat-card .klasse { font-family: 'Baloo 2', cursive; font-size: 18px;
                       color: var(--green-dark); }
.beirat-card .names { font-size: 13px; color: var(--brown); margin-top: 4px; line-height: 1.5; }

/* === DATES BOX === */
.dates-box { background: linear-gradient(135deg, var(--green-light), #F1F8E9);
             border-radius: var(--radius); padding: 20px 24px;
             border: 2px solid var(--green); margin-top: 24px; }
.dates-box h3 { font-family: 'Baloo 2', cursive; font-size: 20px;
                color: var(--green-dark); margin-bottom: 12px;
                display: flex; align-items: center; gap: 8px; }
.dates-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.date-item { background: #fff; border-radius: 10px; padding: 10px 14px;
             display: flex; gap: 12px; align-items: center; }
.date-item .date { background: var(--green); color: #fff; padding: 4px 10px;
                   border-radius: 8px; font-weight: 700; font-size: 11px; min-width: 70px;
                   text-align: center; font-family: 'Baloo 2', cursive; }
.date-item .text { font-size: 13px; color: var(--brown); }
.date-item .text small { display: block; font-size: 11px; color: var(--brown-light); }

/* === CONTACT BOX === */
.contact-box { background: #fff; border-radius: var(--radius); padding: 20px 24px;
               border-top: 4px solid var(--orange); display: grid;
               grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-box .ci { font-size: 13px; color: var(--brown); }
.contact-box .ci strong { display: block; color: var(--orange-dark);
                          font-family: 'Baloo 2', cursive; font-size: 15px; margin-bottom: 4px; }
.contact-box .ci a { color: var(--brown); text-decoration: none; }
.contact-box .ci a:hover { color: var(--orange); }

/* === CTA === */
.cta { background: var(--green); padding: 40px 5%;
       display: flex; align-items: center; justify-content: space-between;
       flex-wrap: wrap; gap: 16px; }
.cta-text { color: #fff; }
.cta-text h2 { font-family: 'Baloo 2', cursive; font-size: 24px; }
.cta-text p { font-size: 14px; opacity: .9; }
.cta .btn { background: var(--gold); color: var(--brown); font-weight: 800;
            font-size: 15px; padding: 14px 32px; border-radius: 30px;
            border: none; cursor: pointer; font-family: 'Quicksand', sans-serif;
            transition: transform .2s; text-decoration: none; display: inline-block; }
.cta .btn:hover { transform: scale(1.05); }

/* === FOOTER === */
.footer { background: var(--brown); color: rgba(255,255,255,.7);
          padding: 24px 5%; display: flex; justify-content: space-between;
          align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.footer a { color: var(--gold); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .nav { padding: 10px 4%; }
  .nav-logo .text { font-size: 14px; }
  .nav-logo .text small { font-size: 10px; }
  .nav-links a { font-size: 12px; padding: 6px 12px; }
}
@media (max-width: 768px) {
  .hero { height: 320px; }
  .hero-overlay h1 { font-size: 26px; }
  .bubbles { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .teacher-list { grid-template-columns: 1fr; }
  .beirat-grid { grid-template-columns: 1fr; }
  .dates-list { grid-template-columns: 1fr; }
  .contact-box { grid-template-columns: 1fr; }
  .region-strip { grid-template-columns: 1fr; }
}

/* === INFO BOXES (Instagram, Familienrallye) === */
@media (max-width: 768px) {
  /* The two info boxes have a 1fr Xpx layout - stack on mobile */
  section .section > div[style*="grid-template-columns: 1fr 200px"],
  section .section > div[style*="grid-template-columns: 1fr 160px"] {
    grid-template-columns: 1fr !important;
  }
}

/* === SCHULBILDER auf grundschule_html === */
/* Eltern-Grid: 2 Spalten Desktop, 1 Spalte Mobile */
.schule-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* Desktop: 2 Bilder rechts vom Text, gleich hohe Zeilen, cover */
.schule-photos {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}
.schule-photo {
  border-radius: var(--radius);
  overflow: hidden;
}
.schule-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Schulhof-Highlight-Bild — Caption-Overlay funktioniert auf allen Größen */
.schulhof-highlight {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.schulhof-highlight img {
  width: 100%;
  height: auto;
  display: block;
}
.schulhof-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  color: #fff;
  padding: 16px 20px;
}
.schulhof-title {
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
}
.schulhof-text {
  font-size: 12px;
  opacity: .9;
  margin-top: 2px;
}

/* MOBILE: Bilder komplett anzeigen — kein Beschnitt mehr */
@media (max-width: 768px) {
  /* Eltern-Grid kollabiert auf 1 Spalte */
  .schule-section-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Die beiden Schulbilder werden auf Mobile untereinander angezeigt.
     Hier sorgen wir dafür, dass das ganze Bild sichtbar ist, ohne dass es
     seitlich abgeschnitten wird. */
  .schule-photos {
    grid-template-rows: auto auto;
  }
  .schule-photo {
    /* Container bekommt automatische Höhe, Bild bestimmt sie selbst */
    height: auto;
  }
  .schule-photo img {
    width: 100%;
    height: auto;            /* keine fixe Höhe &#8594; Bild behält volle Sichtbarkeit */
    object-fit: contain;     /* falls je beschnitten würde, komplett anzeigen */
    display: block;
  }

  /* Schulhof-Highlight: ist sowieso schon mit height: auto und kein object-fit, also OK.
     Caption etwas kompakter auf kleinen Screens. */
  .schulhof-caption {
    padding: 12px 14px;
  }
  .schulhof-title {
    font-size: 15px;
  }
  .schulhof-text {
    font-size: 11px;
  }
}

/* === PDF EMBED === */
.pdf-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #e0e0e0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.pdf-embed object,
.pdf-embed iframe {
  display: block;
  width: 100%;
}

/* Mobile: shorter embed (PDFs are hard to view on small screens — user can open in new tab) */
@media (max-width: 768px) {
  .pdf-embed object,
  .pdf-embed iframe {
    height: 500px;
  }
}

/* === NEWS HIGHLIGHT — Hängebrücke / fresh news === */
.news-highlight {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  background: linear-gradient(135deg, #FFF7E6 0%, #FFEEDD 100%);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
  border-left: 6px solid var(--orange);
  position: relative;
  overflow: hidden;
}
.news-highlight::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: .35;
  pointer-events: none;
}
.news-highlight-text {
  position: relative;
  z-index: 1;
}
.news-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(255,112,67,.3);
  animation: pulse-badge 2.4s ease-in-out infinite;
}
.news-highlight-badge-icon {
  font-size: 14px;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.news-highlight-text h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 24px;
  color: var(--orange-dark);
  margin-bottom: 10px;
  line-height: 1.15;
}
.news-highlight-text p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 10px;
}
.news-highlight-meta {
  font-size: 11px;
  color: var(--brown-light);
  font-style: italic;
  margin-top: 8px;
}
.news-highlight-img {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  transition: transform .2s;
  text-decoration: none;
  align-self: start;
}
.news-highlight-img:hover {
  transform: translateY(-3px) scale(1.01);
}
.news-highlight-img img {
  width: 100%;
  height: auto;
  display: block;
}
.news-highlight-zoom {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 14px;
  opacity: 0;
  transition: opacity .2s;
}
.news-highlight-img:hover .news-highlight-zoom {
  opacity: 1;
}

@media (max-width: 768px) {
  .news-highlight {
    grid-template-columns: 1fr;
    padding: 20px 22px;
  }
  .news-highlight-text h3 {
    font-size: 20px;
  }
  /* On mobile, always show the zoom hint (no hover available) */
  .news-highlight-zoom {
    opacity: 1;
  }
}
