/* -------------------- */
/* 0. Variablen & Setup (FARBSCHEMA WIEDERHERGESTELLT) */
/* -------------------- */
:root {
  /* Farbschema: Dark Mode / Deep Navy */
  --bg-dark: #051220; /* Sehr dunkles Navy */
  --bg-light: #0d2942; /* Etwas helleres Petrol */
  --primary: #238ad2; /* Dein ursprüngliches Hellblau als Akzent */
  --accent: #3da9f5; /* Noch helleres Blau für Hover */

  --glass-dark: rgba(10, 25, 41, 0.85); /* Dunkler Glas-Hintergrund für Boxen */
  --glass-border: rgba(255, 255, 255, 0.15); /* Feine helle Kante */

  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.8);
}

/* -------------------- */
/* Global Reset         */
/* -------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  /* Farbe aus Variablen wiederhergestellt */
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
}

/* Typografie */
h1 {
  font-size: 48px;
  margin: 50px;
  text-align: center;
  color: var(--text-main);
}

h2 {
  font-size: 28px;
  /* NEU: Definiert H2 als Primärfarbe (Blau) */
  color: var(--primary);
  margin-bottom: 20px;
}

h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text-main);
}

p {
  font-size: 16px;
  text-align: left;
  line-height: 1.8;
  margin-bottom: 15px;
  color: var(--text-muted);
}

a:link,
a:visited {
  color: var(--text-main);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* NEU FIX: H1 Zentrierung und Margin für Haupttitel (z.B. Impressionen) */
.main > h1 {
  text-align: center;
  margin: 40px auto 30px auto; /* H-Margin auf auto für Zentrierung */
  max-width: 1200px;
}

/* ------------------------------------- */
/* Header (Layout, Breiten & LOGO FIX)   */
/* ------------------------------------- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  background: linear-gradient(90deg, #0a1929 0%, #0d2942 100%);
  padding: 0 20px;
  border-bottom: 2px solid #238ad2;
  border-radius: 0 0 0 0;
  position: relative;
  z-index: 10;
}

.header a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  padding: 20px;
  border-radius: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.header a.logo {
  font-size: 24px;
  font-weight: bold;
  padding: 20px;
  border-radius: 4px;
}

.header a:hover:not(.logo),
.header a.active {
  font-weight: 400; /* Bleibt normal */
  text-shadow: 0 0 0.5px currentColor; /* Fake-Bold Effekt */
  background: rgba(35, 138, 210, 0.4);
  box-shadow: inset 0 -4px 0 #238ad2;
}

.header-right {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr; /* Alle Spalten gleich breit */
  align-items: stretch;
}

.header-right a {
  display: flex;
  justify-content: center; /* Text horizontal zentrieren */
  align-items: center; /* Text vertikal zentrieren */
}

/* Icons */
.header-icon {
  border-radius: 20%;
  vertical-align: middle;
  margin-right: 15px;
  width: 100px;
  height: 100px;
}

.nav-icon {
  display: inline-block;
  border-radius: 20%;
  vertical-align: middle;
  margin-right: 2px;
  width: 20px;
  height: 20px;
  line-height: 0;
}

/* -------------------- */
/* Hero Section         */
/* -------------------- */
.hero {
  width: 100%;
  min-height: 85vh;
  background-image: url("../images/string_kanal4.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Farben aus Variablen wiederhergestellt */
  background: linear-gradient(to bottom, rgba(5, 18, 32, 0.6) 0%, rgba(35, 138, 210, 0.2) 50%, var(--bg-dark) 100%);
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1200px;
  padding: 40px 20px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text h1 {
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 900;
  margin-bottom: 20px;
  /* Farben aus Variablen wiederhergestellt */
  text-shadow: 0 0 20px rgba(35, 138, 210, 0.8);
  animation: glow-pulse 3s infinite;
}

@keyframes glow-pulse {
  0%,
  100% {
    text-shadow: 0 0 20px rgba(35, 138, 210, 0.8);
  }
  50% {
    text-shadow: 0 0 30px rgba(35, 138, 210, 1);
  }
}

.hero-text h2 {
  font-size: clamp(24px, 4vw, 42px);
  text-align: center;
  margin-bottom: 50px;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* -------------------- */
/* Hero Section - Badges Fix */
/* -------------------- */
.hero-badges {
  position: relative;
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 80px;
  z-index: 2;
}

.hero-badges img {
  width: 180px;
  max-width: 28vw;
  border-radius: 20px;
  /* Standard Schatten + Animation */
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
  animation: float 6s ease-in-out infinite;
  transition: all 0.4s ease-in-out; /* 'all' für sanftere Übergänge */
}

/* Fix: Die Animation-Delay muss auf die Anker (A-Tags) angewendet werden, 
   da diese die direkten Kinder des Containers sind. */
.hero-badges a:nth-child(2) img {
  animation-delay: 1s;
}
.hero-badges a:nth-child(3) img {
  animation-delay: 2s;
}

.hero-badges img:hover {
  transform: scale(1.1);
  /* Shiny Hover / Leuchten Effekt hinzufügen */
  box-shadow:
    0 0 20px var(--accent),
    0 0 30px var(--accent);
  border: 2px solid var(--accent); /* Optional: Betont das Leuchten */
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8)); /* Dunklerer Standard-Schatten */
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.hero-more {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  /* Farben aus Variablen wiederhergestellt */
  padding: 16px 40px;
  background-color: rgba(10, 25, 41, 0.7);
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  z-index: 3;
  transition: all 0.3s;
  animation: bounce 2s infinite;
}

.hero-more:hover {
  background: var(--primary);
  animation: none;
  color: #fff;
  text-decoration: none;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* -------------------- */
/* Main Content General */
/* -------------------- */
.main {
  flex: 1;
  width: 100%;
  padding: 40px 20px;
  text-align: center;
}

.main > section {
  width: 1200px;
  max-width: 100%;
  margin: 0 auto 100px auto;
  /* Farben aus Variablen wiederhergestellt (Glassmorphismus) */
  background: var(--glass-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.content-block {
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
  text-align: left;
}

.content-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

/* -------------------- */
/* Lightbox Gallery */
/* -------------------- */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.gallery-section h2 {
  max-width: 930px;
  padding-left: 95px !important;
  text-align: left;
}

.gallery a {
  display: block;
}

.gallery a img {
  display: block;
  max-width: 300px;
  height: auto;
  border: 2px solid var(--glass-border);
  border-radius: 8px;
  transition:
    transform 0.2s ease,
    border-color 0.2s;
}

.gallery a img:hover {
  transform: scale(1.03);
  border-color: var(--accent);
}

.caption {
  text-align: center;
  font-size: 0.9em;
  color: var(--text-muted);
  margin-top: 5px;
}

/* -------------------- */
/* Blog Page */
/* -------------------- */
.blog-list {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 40px auto;
  text-align: left;

  /* Farben aus Variablen wiederhergestellt */
  background: var(--glass-dark);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 50px;
  border-radius: 16px;
}

.blog-preview {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 2.5rem;
  margin-bottom: 2rem;
}

.blog-preview:last-child {
  border-bottom: none;
}

.blog-thumbnail {
  width: 300px;
  min-width: 300px;
  height: 225px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.blog-preview-content {
  flex: 1;
}

.blog-preview h3 {
  margin-top: 0;
  font-size: 1.8rem;
  color: var(--text-main);
  text-shadow: none;
}

.blog-preview .date {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.blog-preview p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.read-more {
  color: var(--accent) !important;
  font-weight: bold;
}

/* Einzelansicht Blog Post */
.blog-post {
  max-width: 1200px;
  margin: 0 auto;
}

.blog-post h1 {
  font-size: 32px;
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 15px;
}

.blog-post img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.back-button {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--accent);
}

/* -------------------- */
/* Wetter & Widgets     */
/* -------------------- */
.wetter-section {
  width: 100%;
  max-width: 1200px;
  margin: 50px auto;
}

.iframe-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.wetter-widget {
  /* Farben aus Variablen wiederhergestellt */
  border: 1px solid var(--glass-border) !important;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
}

/* -------------------- */
/* Impressum & Datenschutz */
/* -------------------- */
.impressum,
.datenschutz {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px;
  /* Farben aus Variablen wiederhergestellt */
  background: var(--glass-dark);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  text-align: left;
}

/* ========================================= */
/* 🔝 Back-to-Top Button - Ergänzende Styles */
/* ========================================= */

/* Diese Styles sind optional, da das JavaScript bereits inline-styles setzt */
/* Füge dies am Ende deiner styles.css ein, falls du die Styles zentral verwalten möchtest */

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    border: none;
    z-index: 999999;
    pointer-events: auto;
    transition: all 0.3s ease;
    opacity: 0;
}

#backToTop:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #2575fc, #6a11cb);
}

#backToTop:active {
    transform: scale(0.95);
}

#backToTop:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Responsive Anpassungen */
@media screen and (max-width: 768px) {
    #backToTop {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 22px;
    }
}

@media screen and (max-width: 400px) {
    #backToTop {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 20px;
    }
}

/* Animation für das Erscheinen */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#backToTop.show {
    animation: fadeInUp 0.3s ease forwards;
}

/* -------------------- */
/* Footer               */
/* -------------------- */
.footer {
  /* Farbe aus Variablen wiederhergestellt */
  background: var(--bg-dark);
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}

/* -------------------- */
/* Mobile Menu Toggle   */
/* -------------------- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  margin-top: 25px;
}

/* Hamburger Icon */
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: white;
  transition: all 0.3s ease;
}
.menu-toggle::before {
  top: 0;
  box-shadow: 0 10px 0 white;
}
.menu-toggle::after {
  bottom: 0;
}

.menu-toggle.open::before {
  top: 10px;
  transform: rotate(45deg);
  box-shadow: none;
}
.menu-toggle.open::after {
  bottom: 11px;
  transform: rotate(-45deg);
}

/* -------------------- */
/* Responsive           */
/* -------------------- */
@media (max-width: 768px) {
  /* Generelle Anpassung */
  .hero {
    height: auto;
    min-height: 60vh;
    background-attachment: scroll;
  }
  .main > section {
    padding: 20px;
    width: 95%;
    margin-bottom: 50px;
  }

  .content-block,
  .content-block.reverse {
    flex-direction: column;
  }

  /* Header Mobile */
  .menu-toggle {
    display: block;
  }
  .header-right {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    /* Farbe aus Variablen wiederhergestellt */
    background: var(--bg-dark);
    flex-direction: column;
    padding: 20px 0;
    border-bottom: 1px solid var(--primary);
  }
  .header-right.active {
    display: flex;
  }
  .header-right a {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  /* Fix für linksbündige Navigation im Hamburger-Menü */
  .header-right a {
    justify-content: flex-start; /* Stellt die Ausrichtung auf Links (Start) */
    padding-left: 40px; /* Fügt einen passenden linken Abstand hinzu */
  }

  /* Blog Mobile Fix */
  .blog-preview {
    flex-direction: column;
  }
  .blog-thumbnail {
    width: 100%;
    min-width: unset;
    height: auto;
    aspect-ratio: 16/9;
  }

  /* Gallery Mobile */
  .gallery a img {
    max-width: 100%;
    width: 100%;
  }

  .gallery-section h2 {
    /* Entfernt den 95px Padding-Offset */
    padding-left: 0 !important;
    /* Stellt die Breite auf volle 100% des Containers */
    max-width: 100% !important;
  }

  .gallery {
    /* Entfernt den 95px Margin-Offset */
    margin-left: auto !important;
    margin-right: auto !important;
    /* Setzt die Breite auf volle 100% des Containers */
    max-width: 100% !important;
  }

  /* Logo Größe auf Mobile reduzieren */
  .header-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .hero-more {
    display: none;
  }
  .hero-badges img {
    width: 90px;
  }
  .hero-text h1 {
    font-size: 36px;
  }
  .hero-badges {
    gap: 20px;
    padding: 0 10px;
  }
}
