/**
 * Footer Component
 *
 * Enthält:
 * - Site Footer (mit SVG Gradient-Wellen)
 * - Footer Columns (3-Spalten Grid)
 * - Social Icons
 * - Copyright Bereich
 *
 * Dependencies:
 * - base.css (CSS Variables)
 * - SVG Assets: wave-footer.svg, wave-footer-bottom.svg
 *
 * Extrahiert aus components.css: Zeilen 1488-1729
 * Datei-Größe: ~241 Zeilen
 *
 * @package SLV_Transporte
 * @version 1.0.0
 */



/* ============================================
   FOOTER mit Gradient-Streifen
   ============================================ */

/**
 * Site Footer Container
 * Gradient-Streifen oben: #5cb8e9 → #fcbc5b (gespiegelt zu Header)
 * Gradient-Streifen unten: #fcbc5b → #5cb8e9 (wie Header oben)
 */
.site-footer {
  background: var(--slv-bg-white);
  margin-top: 4rem;
  position: relative;
}

/**
 * Gradient-Welle oben: Blau → Gelb (SVG, gespiegelt zu Header)
 * 50px hoch (responsive), geschwungene Wellen nach oben
 * SVG-Datei: assets/images/wave-footer.svg
 *
 * Alte Implementierung (Backup):
 * background: linear-gradient(90deg, #5cb8e9 0%, #fcbc5b 100%);
 * height: 5px;
 */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: url('../../images/wave-footer-animated.svg') repeat-x;
  background-size: 200% 100%;
  background-position: 0% top;
  z-index: 1;
  animation: wave-scroll-footer 20s linear infinite;
}

/**
 * Gradient-Welle unten: Gelb → Blau (SVG, wie Header oben)
 * 50px hoch (responsive), geschwungene Wellen nach unten
 * SVG-Datei: assets/images/wave-footer-bottom.svg
 *
 * WICHTIG: Welle bleibt INNERHALB des Footers (kein transform)
 * Position: Am unteren Rand des Footers
 */
.site-footer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: url('../../images/wave-footer-bottom-animated.svg') repeat-x;
  background-size: 200% 100%;
  background-position: 0% bottom;
  z-index: 1;
  animation: wave-scroll-footer 25s linear infinite reverse;
}

/**
 * Wave Scroll Animation (Footer)
 *
 * KORRIGIERT: Verwendet background-position statt translateX
 * für sichtbare horizontale Wellenbewegung.
 *
 * Funktionsweise:
 * - SVG ist doppelt breit (200%)
 * - Animation scrollt von 0% zu 100% (volle SVG-Breite)
 * - SVG wiederholt sich nahtlos (seamless loop)
 * - Linear timing für gleichmäßige Bewegung
 *
 * @since 1.2.1 - Korrigierte Wave Animation
 */
@keyframes wave-scroll-footer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 100% center;
  }
}

/**
 * Footer Hauptbereich (weiß)
 * Hintergrund MUSS weiß sein, damit Gradient-Welle sichtbar ist
 *
 * WICHTIG: Padding-Top reserviert Platz für obere Welle (50px)
 * - Top: ~4rem für obere Welle (50px + spacing)
 * KEIN z-index, damit Wellen (::before/::after) nicht überdeckt werden
 */
.footer-main {
  background-color: #ffffff;
  padding: 4rem 0 3rem 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/**
 * Footer Spalten
 */
.footer-column h3 {
  color: var(--slv-text-dark);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-column p {
  color: var(--slv-text-muted);
  line-height: 1.8;
  margin: 0.5rem 0;
}

.footer-column a {
  color: var(--slv-primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: var(--slv-primary-yellow);
  text-decoration: underline;
}

/**
 * Footer Legal Navigation (vertikal im Footer-Main)
 * Rechtliches-Spalte rechts neben Kontakt
 */
.footer-legal-nav h3 {
  color: var(--slv-text-dark);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-legal-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-legal-list li {
  margin-bottom: 0.75rem;
}

.footer-legal-list a {
  color: var(--slv-text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1rem;
  line-height: 1.8;
  position: relative;
  display: inline-block;
}

/**
 * Animierte Unterstreichung für Footer Legal Links
 *
 * Feature: Linie "wächst" von links nach rechts bei Hover
 * Ersetzt statisches text-decoration: underline
 *
 * @since 1.1.0 - Animation Enhancement Phase 1
 */
.footer-legal-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--slv-primary-blue);
  transition: width 0.3s ease;
}

.footer-legal-list a:hover {
  color: var(--slv-primary-blue);
}

.footer-legal-list a:hover::after {
  width: 100%;
}

/**
 * Social Icons Container
 */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--slv-primary-blue);
  color: #ffffff;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--slv-primary-yellow);
  color: var(--slv-text-dark);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(252, 188, 91, 0.4);
}

.no-social-links {
  font-size: 0.875rem;
  color: var(--slv-text-muted);
  font-style: italic;
}

/**
 * Footer Bottom (Nur Copyright)
 * Zentrierter Copyright-Text
 *
 * WICHTIG: Padding-Bottom reserviert Platz für untere Welle (50px)
 * - Bottom: ~4rem für untere Welle (50px + spacing)
 * KEIN z-index, damit Wellen (::before/::after) nicht überdeckt werden
 */
.footer-bottom {
  background: #ffffff;
  padding: 2rem 0 4rem 0;
  border-top: 1px solid #e9ecef;
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/**
 * Copyright-Text (zentriert)
 */
.footer-bottom .copyright {
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0;
  padding: 0;
}

/**
 * SVG Wave Responsive Höhen
 * Mobile: 30px (kompakter)
 * Desktop: 50px (volle Pracht)
 * Gilt für: Header oben, Header unten, Footer oben, Footer unten
 */
@media (max-width: 767px) {
  .site-header::before,
  .site-header::after,
  .site-footer::before,
  .site-footer::after {
    height: 30px;
  }

  /* Anpassung der Paddings für kleinere Wellen */
  .header-container {
    padding: 2.5rem 1rem;
  }

  .footer-main {
    padding: 3rem 0 2rem 0;
  }

  .footer-bottom {
    padding: 1.5rem 0 3rem 0;
  }

  /**
   * Footer-Bottom: Bleibt zentriert auf Mobile
   * Nur Copyright (keine Legal-Links mehr)
   */
  .footer-bottom .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Kleinere Schrift auf Mobile */
  .footer-bottom .copyright {
    font-size: 0.85rem;
  }
}

/**
 * Footer Responsive - Tablet/Desktop
 */
@media (min-width: 768px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom .footer-container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr); /* 2 statt 3 Spalten (Kontakt + Rechtliches) */
  }
}

/* ============================================
   FOOTER SOCIAL LINKS (Sprint 2, Task 2.2)
   ============================================ */

/**
 * Social Media Links im Footer
 * Inline SVG Icons mit Hover-Effekten
 */

.footer-social {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-social__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--slv-bg-white, #ffffff);
}

/* Social Links Container */
.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* Einzelner Social Link */
.social-link {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--slv-bg-white, #ffffff);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

/* Hover-Effekte */
.social-link:hover {
  background: var(--slv-primary-yellow, #fcbc5b);
  color: var(--slv-text-dark, #2c3e50);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 16px rgba(252, 188, 91, 0.3);
}

.social-link:hover svg {
  transform: scale(1.1);
}

/* Focus State (Accessibility) */
.social-link:focus-visible {
  outline: 3px solid var(--slv-primary-yellow, #fcbc5b);
  outline-offset: 4px;
}

/* Platform-spezifische Hover-Farben (optional) */
.social-link--facebook:hover {
  background: #1877F2;
  color: white;
}

.social-link--linkedin:hover {
  background: #0A66C2;
  color: white;
}

.social-link--instagram:hover {
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF);
  color: white;
}

.social-link--twitter:hover {
  background: #000000;
  color: white;
}

.social-link--youtube:hover {
  background: #FF0000;
  color: white;
}

/* Responsive */
@media (max-width: 767px) {
  .footer-social {
    margin-top: 32px;
    padding-top: 24px;
  }

  .social-links {
    gap: 12px;
  }

  .social-link {
    width: 44px;
    height: 44px;
  }

  .social-link svg {
    width: 22px;
    height: 22px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .social-link,
  .social-link svg {
    transition: none;
  }

  .social-link:hover {
    transform: none;
  }

  /* Wave Animation deaktivieren */
  .site-footer::before,
  .site-footer::after {
    animation: none;
  }
}
