/*
  Footer Redesign – FiRelax (Mobile-First)
  ------------------------------------------------------------
  Ziele:
  - klare Sektionen (visuell getrennt)
  - responsive Grid (1 → 2 → 4 Spalten)
  - gute Lesbarkeit / Kontrast via bestehende Design-Variablen
  - barrierefreie Focus-States + reduzierte Motion

  Hinweis: Farben/Typo basieren auf dem bestehenden Design-System
  (z.B. --firelax-*) und werden nicht neu „erfunden“.
*/

.site-footer {
  /* Beibehaltung der Corporate-Identity (Grundfläche kommt von .footer-dark in site.css) */
  hyphens: none;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Container-Bereich im Footer */
.site-footer__container {
  padding-top: 2.25rem;
  padding-bottom: 1.25rem;
}

/* Grid der Sektionen – Mobile First */
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Accordion wrapper (details) */
.site-footer__accordion {
  width: 100%;
}

.site-footer__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-footer__summary::-webkit-details-marker {
  display: none;
}

/* Chevron */
.site-footer__summary::after {
  content: "▾";
  color: var(--firelax-text-secondary);
  font-size: 1rem;
  line-height: 1;
  transition: transform var(--transition), color var(--transition);
}

.site-footer__accordion[open] .site-footer__summary::after {
  transform: rotate(180deg);
  color: var(--firelax-orange);
}

.site-footer__panel {
  padding-top: 0.5rem;
}

/* Desktop: kein "Dropdown" Look (alles offen), Chevron ausblenden */
@media (min-width: 769px) {
  .site-footer__summary {
    cursor: default;
  }

  .site-footer__summary::after {
    display: none;
  }
}

/* Ab Tablet: 2 Spalten */
@media (min-width: 576px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Ab Desktop: 4 Spalten */
@media (min-width: 992px) {
  .site-footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Desktop Alignment (nur Desktop):
   - Kundenservice rechts
   - Hilfe & Info + Rechtliches zentriert
   - Barrierefreiheit links (Default)
*/
@media (min-width: 992px) {
  .site-footer__section--customerservice {
    text-align: right;
  }

  .site-footer__section--helpinfo,
  .site-footer__section--legal {
    text-align: center;
  }

  /* Summary/Heading Ausrichtung */
  .site-footer__section--customerservice .site-footer__summary {
    justify-content: flex-end;
  }

  .site-footer__section--helpinfo .site-footer__summary,
  .site-footer__section--legal .site-footer__summary {
    justify-content: center;
  }

  /* Link-Ausrichtung */
  .site-footer__section--customerservice .footer-links a:not(.footer-cta) {
    justify-content: flex-end;
  }

  .site-footer__section--helpinfo .footer-links a:not(.footer-cta),
  .site-footer__section--legal .footer-links a:not(.footer-cta) {
    justify-content: center;
  }

  /* Button-Link (Cookie-Einstellungen) */
  .site-footer__section--legal .site-footer__button-link {
    justify-content: center;
  }

  /* CTA-Gruppe */
  .site-footer__section--customerservice .footer-cta-group {
    justify-content: flex-end;
  }
}

/* Jede Footer-Sektion ist „abgehoben“ (klarer Block) */
.site-footer__section {
  background: var(--firelax-card);
  border: 1px solid var(--firelax-border);
  border-radius: 0.9rem;
  padding: 1.1rem 1.1rem 0.9rem;
  min-width: 0;
}

/* Mobile: Footer ist in der "Native" Ansicht selbst schon eine Card – innen weniger "Card-in-Card" */
@media (max-width: 768px) {
  .site-footer__section {
    background: transparent;
  }

  /* Mobile: Panels standardmäßig kompakter */
  .site-footer__panel {
    padding-top: 0.25rem;
  }

  .site-footer__accordion[open] .site-footer__panel {
    border-top: 1px solid var(--firelax-border);
    margin-top: 0.4rem;
  }
}

/* Überschriften: kompakter, klarer Kontrast */
.site-footer .footer-heading {
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* Linklisten – semantisch als UL/LIs */
.site-footer .footer-links {
  margin: 0;
}

.site-footer .footer-links li {
  margin-bottom: 0.35rem;
}

/* Links: keine „Spring“-Animationen, klare Hit-Area, gute Lesbarkeit */
.site-footer .footer-links a:not(.footer-cta),
.site-footer__button-link {
  color: var(--firelax-text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 0.3rem 0;
  gap: 0.5rem;
  line-height: 1.35;
  transition: color var(--transition), text-decoration-color var(--transition);
}

/* Button-„Link“ (Cookie-Einstellungen) – sieht aus wie Link, ist aber ein Button */
.site-footer__button-link {
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

/* Icons im Footer (falls vorhanden) deutlich dezenten */
.site-footer .footer-links a i {
  color: var(--firelax-orange);
  width: 1rem;
  font-size: 0.95rem;
  text-align: center;
  flex-shrink: 0;
}

/* Hover: dezent, ohne Layout-Shift */
.site-footer .footer-links a:hover,
.site-footer__button-link:hover {
  color: var(--firelax-orange);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

/* Bestehende translateX-Animation aus site.css neutralisieren */
.site-footer .footer-links a:hover {
  transform: none;
}

/* CTA: bleibt als prominenter Link, aber ohne "springen" */
.site-footer .footer-cta:hover {
  transform: none;
}

/* Focus sichtbar (Tastatur) – auch für Button-Link */
.site-footer .footer-links a:focus-visible,
.site-footer__button-link:focus-visible,
.site-footer .footer-cta:focus-visible {
  outline: 2px solid var(--firelax-orange);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

/* Fokus auf summary (Tastatur) */
.site-footer__summary:focus-visible {
  outline: 2px solid var(--firelax-orange);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

/* Separator + Bottom-Bar */
.site-footer__divider {
  border-color: var(--firelax-border);
  margin: 1.75rem 0 1rem;
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

.site-footer__meta {
  color: var(--firelax-text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* Mobile: Touch-Ziele konsistent (passt zu bestehenden Mobile-Fixes) */
@media (max-width: 768px) {
  .site-footer .footer-links a,
  .site-footer__button-link {
    min-height: 48px;
  }
}

/* Reduced Motion (WCAG) */
@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-links a,
  .site-footer__button-link,
  .site-footer .footer-cta {
    transition: none;
  }

  .site-footer__summary::after {
    transition: none;
  }
}
