/* ========================================
   Gewaltprävention BW – Hauptstylesheet
   Farben: Navy #0f2d4a | Anthrazit #2d3436 | Orange #e8700a
   ======================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0f2d4a;
  --navy2:   #1a3f63;
  --anthrazit: #2d3436;
  --orange:  #e8700a;
  --orange2: #f08030;
  --hell:    #f5f6fa;
  --weiss:   #ffffff;
  --text:    #333333;
  --grau:    #666666;
  --shadow:  0 4px 20px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--weiss);
  line-height: 1.6;
}

/* ---- NAVIGATION ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,45,74,0.97);
  backdrop-filter: blur(6px);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.nav-logo img { height: 44px; width: auto; }
.nav-logo span {
  color: var(--weiss); font-size: 14px; font-weight: 600; line-height: 1.3;
  display: block;
}
.nav-links {
  display: flex; list-style: none; gap: 4px;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 14px; border-radius: 6px;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--weiss); background: var(--orange);
}
.burger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; border: none; background: none;
}
.burger span {
  display: block; width: 24px; height: 2px; background: var(--weiss);
  transition: all 0.3s;
}
@media (max-width: 768px) {
  .burger { display: flex; }
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--navy); padding: 12px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 24px; border-radius: 0; }
  .nav-logo span { display: block; }
}

/* ---- HERO BILD ---- */
.hero-img-wrap {
  position: relative;
  margin-top: 64px;
  height: 720px;
  background-color: #000;
  overflow: hidden;
}
.hero-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 100%);
  z-index: 1;
}
.hero-bg-img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 100%;
  z-index: 0;
}
.hero-img-overlay {
  position: absolute; top: 80px; left: 50%;
  transform: translateX(-50%);
  text-align: center; width: 100%; padding: 16px;
  z-index: 2;
}
.hero-logo {
  width: min(400px, 55vw); height: auto; display: block; margin: 0 auto 16px;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.6));
}
.hero-tagline {
  color: var(--weiss); font-size: clamp(1rem, 2.5vw, 1.3rem); font-weight: 300;
  letter-spacing: 0em; text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
  margin-top: 40px;
}
.hero-tagline span { color: #ffe066; font-weight: 700; }

/* ---- HERO UNTER DEM BILD ---- */
.hero-below {
  background: var(--navy); text-align: center;
  padding: 40px 24px 52px;
}
.hero-sub {
  color: rgba(255,255,255,0.9); font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  margin-bottom: 28px; line-height: 1.8;
}

.btn {
  display: inline-block; padding: 14px 32px; border-radius: 6px;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: none; transition: all 0.25s; letter-spacing: 0.03em;
}
.btn-primary { background: var(--orange); color: var(--weiss); }
.btn-primary:hover { background: var(--orange2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,112,10,0.4); }
.btn-outline { background: transparent; color: var(--weiss); border: 2px solid var(--weiss); margin-left: 12px; }
.btn-outline:hover { background: var(--weiss); color: var(--navy); }

/* ---- SECTIONS ---- */
.section { padding: 72px 24px; }
.section-alt { background: var(--hell); }
.container { max-width: 1100px; margin: 0 auto; }
.section-title {
  text-align: center; margin-bottom: 48px;
}
.section-title h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--navy); font-weight: 700;
}
.section-title p { color: var(--grau); margin-top: 10px; font-size: 1.05rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.section-title .line {
  width: 60px; height: 4px; background: var(--orange); margin: 14px auto 0; border-radius: 2px;
}

/* ---- ÜBER UNS (index) ---- */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.about-grid .text h2 { font-size: 1.8rem; color: var(--navy); margin-bottom: 16px; }
.about-grid .text p { color: var(--grau); margin-bottom: 14px; line-height: 1.8; }
.about-img { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.about-img img { width: 100%; height: auto; display: block; }
.about-img .placeholder {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  height: 340px; display: flex; align-items: center; justify-content: center;
}
.about-img .placeholder span { color: var(--weiss); font-size: 60px; }
@media (max-width: 768px) { .about-grid { grid-template-columns: 1fr; } }

/* ---- KARTEN GRID ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  background: var(--weiss); border-radius: 12px; padding: 32px 28px;
  box-shadow: var(--shadow); transition: all 0.25s; border-top: 4px solid var(--orange);
  display: flex; flex-direction: column;
}
.card a { margin-top: auto; align-self: flex-start; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.card-icon { font-size: 2.4rem; margin-bottom: 16px; }
.card h3 { color: var(--navy); font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--grau); font-size: 0.95rem; line-height: 1.7; }

/* ---- STATS ---- */
.stats-band { background: var(--navy); padding: 48px 24px; text-align: center; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.stat-item {}
.stat-num { font-size: 3rem; font-weight: 800; color: var(--orange); line-height: 1; }
.stat-label { color: rgba(255,255,255,0.8); font-size: 0.95rem; margin-top: 8px; }

/* ---- LEHRTEAM ---- */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px;
}
.team-card {
  background: var(--weiss); border-radius: 12px; padding: 28px 20px;
  text-align: center; box-shadow: var(--shadow); transition: all 0.25s;
}
.team-card:hover { transform: translateY(-4px); }
.team-photo {
  width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 16px;
  display: block; object-fit: cover; object-position: center top;
  border: 3px solid var(--orange);
}
.team-avatar {
  width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--weiss); font-weight: 700;
  border: 3px solid var(--orange);
}
.team-card h3 { color: var(--navy); font-size: 1rem; font-weight: 700; }
.team-card p { color: var(--grau); font-size: 0.85rem; margin-top: 6px; line-height: 1.5; }

/* ---- KURSE ---- */
.kurs-item {
  background: var(--weiss); border-radius: 12px; padding: 36px 32px;
  box-shadow: var(--shadow); margin-bottom: 24px;
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
}
.kurs-icon {
  width: 56px; height: 56px; border-radius: 10px; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex-shrink: 0;
}
.kurs-item h3 { color: var(--navy); font-size: 1.2rem; margin-bottom: 10px; }
.kurs-item > div:first-child > p { color: var(--grau); line-height: 1.8; min-height: 72px; }
.kurs-item img { width: 100%; height: 210px; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); display: block; }
.kurs-item img.logo-img { object-fit: contain; padding: 24px; background: #fff; }
.kurs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  background: var(--hell); color: var(--navy); font-size: 0.8rem; font-weight: 600;
  padding: 4px 12px; border-radius: 20px; border: 1px solid #dde;
}
.tag-orange { background: var(--orange); color: var(--weiss); border-color: var(--orange); }
@media (max-width: 520px) { .kurs-item { grid-template-columns: 1fr; } .kurs-icon { display: none; } }

/* ---- KONTAKT ---- */
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.kontakt-info h3 { color: var(--navy); font-size: 1.2rem; margin-bottom: 20px; }
.info-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.info-icon {
  width: 44px; height: 44px; border-radius: 8px; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0; color: var(--weiss);
}
.info-item .label { font-size: 0.8rem; color: var(--grau); text-transform: uppercase; letter-spacing: 0.08em; }
.info-item .val { color: var(--text); font-weight: 500; }
.info-item a { color: var(--orange); text-decoration: none; }
.info-item a:hover { text-decoration: underline; }

.kontakt-form { background: var(--weiss); border-radius: 12px; padding: 36px; box-shadow: var(--shadow); }
.kontakt-form h3 { color: var(--navy); font-size: 1.2rem; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--anthrazit); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 1.5px solid #dde;
  border-radius: 7px; font-size: 0.95rem; font-family: inherit;
  color: var(--text); transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--orange);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-msg { padding: 12px 16px; border-radius: 7px; font-size: 0.9rem; margin-top: 12px; display: none; }
.form-msg.success { background: #e8f5e9; color: #2e7d32; display: block; }
.form-msg.error { background: #fdecea; color: #c62828; display: block; }
@media (max-width: 768px) { .kontakt-grid { grid-template-columns: 1fr; } }

/* ---- KALENDER / TERMINE ---- */
.termine-table { width: 100%; border-collapse: collapse; }
.termine-table th {
  background: var(--navy); color: var(--weiss); padding: 14px 18px;
  text-align: left; font-size: 0.9rem;
}
.termine-table td { padding: 14px 18px; border-bottom: 1px solid #eee; font-size: 0.95rem; }
.termine-table tr:hover td { background: var(--hell); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 0.78rem; font-weight: 700;
}
.badge-frei { background: #e8f5e9; color: #2e7d32; }
.badge-wenig { background: #fff8e1; color: #f57f17; }
.badge-voll { background: #fdecea; color: #c62828; }

/* ---- CTA BANNER ---- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  padding: 64px 24px; text-align: center;
}
.cta-band h2 { color: var(--weiss); font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.8); font-size: 1.05rem; margin-bottom: 28px; }

/* ---- FOOTER ---- */
footer {
  background: var(--anthrazit); color: rgba(255,255,255,0.8);
  padding: 40px 24px 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
  max-width: 1100px; margin: 0 auto; padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand img { height: 60px; margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; color: rgba(255,255,255,0.6); }
.footer-col h4 { color: var(--weiss); font-size: 0.95rem; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
  max-width: 1100px; margin: 20px auto 0;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 0.82rem; color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom a:hover { color: var(--orange); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ---- CHATBOT ---- */
#chat-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 900;
  height: 64px; border-radius: 32px;
  background: var(--navy); color: var(--weiss);
  border: 2px solid rgba(255,255,255,0.15); cursor: pointer;
  box-shadow: 0 6px 28px rgba(15,45,74,0.5);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px 0 6px;
  transition: all 0.25s;
}
#chat-btn:hover { background: var(--orange); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(232,112,10,0.5); }
#chat-btn .chat-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid var(--orange);
  background: #eee;
}
#chat-btn .chat-avatar img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
}
#chat-btn .chat-label {
  display: flex; flex-direction: column; line-height: 1.25;
}
#chat-btn .chat-label strong { font-size: 1rem; font-weight: 700; }
#chat-btn .chat-label span { font-size: 0.72rem; opacity: 0.72; }
#chat-window {
  position: fixed; bottom: 100px; right: 28px; z-index: 900;
  width: min(380px, calc(100vw - 40px));
  background: var(--weiss); border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  display: none; flex-direction: column; overflow: hidden;
}
#chat-window.open { display: flex; }
.chat-header {
  background: var(--navy); color: var(--weiss);
  padding: 14px 18px; display: flex; justify-content: space-between; align-items: center;
}
.chat-header span { font-weight: 600; font-size: 0.95rem; }
.chat-header button { background: none; border: none; color: var(--weiss); cursor: pointer; font-size: 1.1rem; }
.chat-body { flex: 1; padding: 16px; height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 0.88rem; line-height: 1.5; }
.chat-msg.bot { background: var(--hell); align-self: flex-start; }
.chat-msg.user { background: var(--navy); color: var(--weiss); align-self: flex-end; }
.chat-input-row { display: flex; border-top: 1px solid #eee; }
.chat-input-row input {
  flex: 1; padding: 12px 14px; border: none; outline: none;
  font-size: 0.9rem; font-family: inherit;
}
.chat-input-row button {
  padding: 12px 18px; background: var(--orange); color: var(--weiss);
  border: none; cursor: pointer; font-size: 1rem; transition: background 0.2s;
}
.chat-input-row button:hover { background: var(--orange2); }

/* ---- SEITENHEADER (Unterseiten) ---- */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  padding: 120px 24px 56px;
  text-align: center;
}
.page-header h1 { color: var(--weiss); font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; }
.page-header p { color: rgba(255,255,255,0.75); margin-top: 10px; font-size: 1.05rem; }

/* ---- UTILITIES ---- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-top { padding-top: 64px; }

/* ========================================
   RESPONSIVE DESIGN
   Breakpoints: 900px | 768px | 480px
   ======================================== */


/* --- Mittlere Bildschirme / Laptops (900px–1400px) --- */
@media (min-width: 901px) and (max-width: 1400px) {
  .hero-img-overlay { top: 50px; }
  .hero-logo { width: min(260px, 45vw); }
}

/* --- Tablet (bis 900px) --- */
@media (max-width: 900px) {
  .hero-img-wrap { height: 480px; }
  .hero-logo { width: min(220px, 40vw); }
  .about-grid { gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* --- Tablet / großes Handy (bis 768px) --- */
@media (max-width: 768px) {

  /* Hero */
  .hero-img-wrap { height: 340px; }
  .hero-img-overlay { top: 40px; }
  .hero-logo { width: min(180px, 38vw); }

  /* Buttons untereinander statt nebeneinander */
  .hero-below a.btn,
  .cta-band a.btn {
    display: block;
    width: fit-content;
    margin: 10px auto 0 !important;
  }
  .hero-below { padding: 28px 16px 36px; }

  /* Kurs-Items: Bild unter Text statt rechts */
  .kurs-item { flex-direction: column !important; }
  .kurs-item > div[style*="flex-shrink"] { width: 100% !important; }
  .kurs-item img { height: 200px; }

  /* Jahr-Filter: horizontal scrollbar statt Zeilenumbruch */
  div[style*="position:sticky"][style*="top:64px"] {
    overflow-x: auto;
    white-space: nowrap;
    text-align: left !important;
    padding: 12px 16px !important;
  }

  /* Section Padding */
  .section { padding: 48px 16px; }
  .cta-band { padding: 48px 16px; }

  /* Ordnungsdienst 4-Spalten → 2-Spalten */
  div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* --- Smartphone (bis 480px) --- */
@media (max-width: 480px) {

  /* Hero */
  .hero-img-wrap { height: 260px; }
  .hero-img-overlay { top: 8px; transform: translateX(-50%); }
  .hero-logo { width: min(160px, 44vw); margin-bottom: 4px; }
  .hero-tagline { display: block; margin-top: 8px; font-size: 0.52rem; letter-spacing: 0.06em; }

  /* Navigation: Logo-Text kürzen */
  .nav-logo span { font-size: 12px; max-width: 160px; }

  /* Karten einspaltig */
  .cards { grid-template-columns: 1fr; }

  /* Stats kleiner */
  .stat-num { font-size: 2.2rem; }

  /* Ordnungsdienst 4-Spalten → 1-Spalte */
  div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr !important;
  }

  /* Kurs-Item Bild nicht zu hoch */
  .kurs-item img { height: 160px; }

  /* Modal auf Vollbreite */
  #modal-overlay > div {
    padding: 24px 16px !important;
    border-radius: 0 !important;
    min-height: 100vh;
  }

  /* CTA-Band */
  .cta-band h2 { font-size: 1.3rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
