/* responsive.css — Mobile-First Responsive Styles fuer bildlich gesagt */

/* ============================================
   MOBILE-FIRST ANSATZ (nach Markenkit)
   Basis = Mobile (bis 640px)
   Tablet = ab 641px
   Desktop = ab 1025px
   ============================================ */

/* ============================================
   1. MOBILE — Basis (Default, bis 640px)
   ============================================ */

/* --- Schriftgroessen Mobile --- */
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

/* --- Container Mobile --- */
.container {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* --- Section Padding Mobile --- */
.section-padding {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* --- Navigation Mobile --- */
.nav {
  position: relative;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.nav-logo img {
  height: 40px;
}

/* Hamburger-Button — sichtbar auf Mobile/Tablet */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--farbe-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger-Animation: X wenn offen */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile-Menue — versteckt, Fullscreen-Overlay */
.nav-menu {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--farbe-hintergrund);
  padding: 5rem 1.5rem 2rem;
  z-index: 100;
  overflow-y: auto;
}

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

.nav-menu a {
  display: block;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--farbe-text);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--farbe-hintergrund-alt);
}

.nav-menu a:hover {
  color: var(--farbe-primary);
}

/* --- Portfolio-Dropdown Mobile --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}

.nav-dropdown-toggle::after {
  content: '▾';
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.nav-dropdown-toggle.open::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  flex-direction: column;
  width: 100%;
  padding-left: 1rem;
}

.nav-dropdown-menu.open {
  display: flex;
}

.nav-dropdown-menu a {
  font-size: 1rem;
  font-weight: 400;
  padding: 0.5rem 0;
}

/* --- Buttons Mobile: volle Breite --- */
.btn {
  display: block;
  width: 100%;
  text-align: center;
}

/* Buttons nebeneinander opt-in */
.btn-inline {
  display: inline-block;
  width: auto;
}

/* --- Grid-Layout Mobile: 1 Spalte --- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

/* --- Flex-Layout Mobile: Spalte --- */
.flex-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* --- Bilder --- */
img {
  max-width: 100%;
  height: auto;
}

/* --- Footer Mobile: untereinander --- */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  text-align: center;
}

.footer-bottom {
  flex-direction: column;
  gap: var(--space-1);
  text-align: center;
}

/* --- Header Mobile: immer oben fixiert --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* --- Hero Mobile: kompakter --- */
.hero {
  height: 70vh;
  min-height: 400px;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.hero--sub {
  height: 45vh;
  min-height: 280px;
}

.hero-bild {
  object-position: center 30%;
}

.hero h1 {
  font-size: 1.75rem;
}

.hero-subtitle {
  font-size: 0.95rem;
}

/* --- Unterseiten-Hero mit Bild-Grid (Kita/Mini/Mikro/Doku) Mobile --- */
.hero:has(.hero-bild-grid) {
  flex-direction: column;
  height: auto;
  min-height: auto;
  padding: 0;
}

.hero-bild-grid {
  width: 100% !important;
  grid-template-columns: repeat(2, 1fr) !important;
  height: auto !important;
  gap: 4px !important;
  order: 1;
}

.hero-bild-grid .hero-bild {
  position: relative !important;
  border-radius: 0 !important;
  height: 140px;
  object-fit: cover;
}

.hero:has(.hero-bild-grid) .hero-overlay {
  display: none;
}

.hero:has(.hero-bild-grid) .hero-content {
  position: relative;
  order: 2;
  padding: 1.5rem 1rem 2rem;
  z-index: 1;
}

.hero:has(.hero-bild-grid) .hero-title {
  color: var(--farbe-text) !important;
  text-shadow: none !important;
  font-size: 1.5rem;
}

.hero:has(.hero-bild-grid) .hero-subtitle {
  color: var(--farbe-text) !important;
  text-shadow: none !important;
  font-size: 0.9rem;
  opacity: 0.8;
}

.hero:has(.hero-bild-grid) .hero-logo {
  max-width: 120px !important;
}

.hero:has(.hero-bild-grid) .hero-logo-section {
  margin-bottom: 1rem;
}

/* --- Bilder Mobile: kompakter --- */
.sparten-card {
  aspect-ratio: 1 / 1;
}

.galerie-grid {
  gap: 0.5rem;
}

.galerie-bild {
  border-radius: 8px;
}

/* --- Allgemeine Bildgroessen Mobile --- */
.about-portrait,
.portrait-bild {
  max-height: 350px;
  object-fit: cover;
  border-radius: 12px;
}

/* Kita/Mini/Mikro/Doku Vorteile-Bilder Mobile */
.vorteil-bild,
.feature-bild,
.section-bild {
  max-height: 250px;
  object-fit: cover;
  border-radius: 12px;
}

/* ============================================
   2. TABLET — ab 641px
   ============================================ */

@media (min-width: 641px) {

  /* --- Schriftgroessen Tablet --- */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }
  h3 { font-size: 1.35rem; }
  h4 { font-size: 1.125rem; }

  /* --- Container Tablet --- */
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* --- Section Padding Tablet --- */
  .section-padding {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Hamburger bleibt auf Tablet sichtbar */

  /* --- Buttons Tablet: nebeneinander moeglich --- */
  .btn {
    display: inline-block;
    width: auto;
  }

  /* --- Grid Tablet: 2 Spalten --- */
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* --- Flex-Layout Tablet: Zeile --- */
  .flex-row {
    flex-direction: row;
  }

  /* --- Footer Tablet: 2 Spalten --- */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }

  /* --- Hero Tablet --- */
  .hero {
    height: 80vh;
    min-height: 450px;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero--sub {
    height: 50vh;
    min-height: 320px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  /* --- Unterseiten-Hero Tablet: gestapelt, etwas groesser --- */
  .hero:has(.hero-bild-grid) {
    flex-direction: column;
    height: auto;
    min-height: auto;
    padding: 0;
  }

  .hero-bild-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    height: 280px !important;
  }

  .hero:has(.hero-bild-grid) .hero-content {
    padding: 2rem 1.5rem 2.5rem;
  }

  .hero:has(.hero-bild-grid) .hero-title {
    color: var(--farbe-text) !important;
    text-shadow: none !important;
    font-size: 2rem;
  }

  .hero:has(.hero-bild-grid) .hero-subtitle {
    color: var(--farbe-text) !important;
    text-shadow: none !important;
  }

  .hero:has(.hero-bild-grid) .hero-overlay {
    display: none;
  }

  /* --- Bilder Tablet --- */
  .galerie-bild {
    border-radius: 12px;
  }

  .about-portrait,
  .portrait-bild {
    max-height: 450px;
  }

  .vorteil-bild,
  .feature-bild,
  .section-bild {
    max-height: 350px;
  }
}

/* ============================================
   3. DESKTOP — ab 1025px
   ============================================ */

@media (min-width: 1025px) {

  /* --- Schriftgroessen Desktop (= style.css Werte) --- */
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  h4 { font-size: var(--text-xl); }

  /* --- Container Desktop --- */
  .container {
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  /* --- Section Padding Desktop --- */
  .section-padding {
    padding-top: var(--space-section);
    padding-bottom: var(--space-section);
  }

  /* --- Navigation Desktop: horizontal --- */
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-3);
    position: static;
    background: none;
    padding: 0;
    overflow: visible;
  }

  .nav-menu a {
    display: inline;
    font-size: var(--text-base);
    padding: 0;
    border-bottom: none;
  }

  /* --- Portfolio-Dropdown Desktop: schwebend --- */
  .nav-dropdown {
    position: relative;
  }

  .nav-dropdown-toggle::after {
    content: '▾';
    margin-left: 0.25rem;
  }

  .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    padding: 0.5rem 0;
    background-color: var(--farbe-weiss);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 200;
  }

  .nav-dropdown-menu a {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: var(--text-sm);
  }

  .nav-dropdown-menu a:hover {
    background-color: var(--farbe-hintergrund);
  }

  /* --- Grid Desktop: 3 Spalten --- */
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  /* --- Footer Desktop: 3–4 Spalten --- */
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    text-align: left;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  /* --- Hero Desktop --- */
  .hero {
    height: 100vh;
    min-height: 600px;
    padding-top: var(--space-section);
    padding-bottom: var(--space-section);
  }

  .hero--sub {
    height: 55vh;
    min-height: 380px;
  }

  /* --- Unterseiten-Hero Desktop: Original-Layout wiederherstellen --- */
  .hero:has(.hero-bild-grid) {
    flex-direction: row;
    height: 100vh;
    min-height: 600px;
    padding: 0;
  }

  .hero-bild-grid {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .hero:has(.hero-bild-grid) .hero-overlay {
    display: block;
  }

  .hero:has(.hero-bild-grid) .hero-content {
    position: relative;
    padding: var(--space-section);
  }

  .hero:has(.hero-bild-grid) .hero-title {
    color: var(--farbe-weiss) !important;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15) !important;
    font-size: var(--text-4xl);
  }

  .hero:has(.hero-bild-grid) .hero-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1) !important;
  }

  .hero:has(.hero-bild-grid) .hero-logo {
    max-width: 220px !important;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  /* --- Bilder Desktop: volle Groesse --- */
  .about-portrait,
  .portrait-bild {
    max-height: none;
  }

  .vorteil-bild,
  .feature-bild,
  .section-bild {
    max-height: none;
  }
}

/* ============================================
   4. GROSSER DESKTOP — ab 1440px (optional)
   ============================================ */

@media (min-width: 1440px) {

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}
