h2 {
  text-align: center;
}

* {margin:0; padding:0; box-sizing:border-box;}
body {font-family: Arial, sans-serif; background-color:#f4f9ff; color:#002b5c; scroll-behavior: smooth;}

.slideshow-container {
  max-width: 900px;
  position: relative;
  margin: 40px auto;
  background-color: #000;
  overflow: hidden;
  border-radius: 15px; /* schöne, deutlich sichtbare runde Ecken */
  aspect-ratio: 16 / 9; /* feste Proportion, ersetzt das komplizierte padding-bottom */
}

/* Alle Slides überlagern sich exakt */
.mySlides {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Die Bilder passen sich perfekt an, füllen den Container */
.mySlides img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* füllt das Bild sauber aus */
  border-radius: 15px; /* gleiche Rundung wie Container */
  display: block;
}

/* Die grauen Flächen mit Haupttexten */
.about-section {
  margin-bottom: 30px;         /* Abstand zwischen den Unterabschnitten */
  background-color: #d3d3d3;   /* Hellgrau */
  color: black;                /* Weißer Text */
  padding: 20px;               /* Innenabstand für Luft zum Text */
  border-radius: 10px;         /* Runde Ecken */
}

/* Untertitel zu Haupttexten */
.about-section h3 {
  color: #000000; /* Schwarz */
  margin-bottom: 10px;
}

/* Haupttitel weiss oben */
header {
  background-color: #000000; /* Schwarz */
  color: white; /* Weißer Text */
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* leichter Schatten für Tiefe */
}

/* Menülinks oben inkl DE-EN */
nav a {
  color: white;
  text-decoration: none;
  margin: 0 20px;
  font-size: 1rem;
  transition: transform 0.2s, color 0.2s;
}

nav a:hover {
  color: #ffd700; /* goldgelb beim Hover */
  transform: scale(1.1); /* kleiner Hover-Effekt */
}

/* Haititelbild für Web und Natel */
.hero {
    /* Alle Hintergrund-Eigenschaften trennen, um sie responsiv überschreiben zu können */
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('fuchshai.webp');
    background-size: cover;
    background-position: center center; /* Standard: horizontal und vertikal zentriert */
    background-repeat: no-repeat; 
    
    background-color: #005bbb; 
    color: white; 
    text-align: center; 
    padding: 180px 20px;
}

/* MOBILE FIXES: Reduziert LCP und behebt die Position des Hais */
@media (max-width: 768px) {
    .hero {
        /* 1. LCP-Performance-Fix: Lade das viel kleinere mobile-optimierte Bild */
        background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('fuchshai-mobile.webp');
        
        /* 2. Hai-Position-Fix: Zeige den linken Teil, wo der Hai ist */
        background-position: left center;
    }
}

.hero h1 {font-size:2.5rem; margin-bottom:10px;}
.gallery {display:grid; grid-template-columns:repeat(auto-fit, minmax(250px,1fr)); gap:15px; margin-top:20px;}
.gallery img {width:100%; border-radius:10px; box-shadow:0 4px 6px rgba(0,0,0,0.1);}
/* Kontaktformular */
form {display:flex; flex-direction:column; gap:10px; margin-top:20px;}
input, textarea {padding:10px; border:1px solid #ccc; border-radius:5px;}
button {background-color:#004a99; color:white; padding:10px; border:none; border-radius:5px; cursor:pointer;}
button:hover {background-color:#004a99;}
/* Schlusszeilen Homepage */
footer {background-color:#000000; color:white; text-align:center; padding:20px; margin-top:40px;}

/* --- MOBILE FIX FOR LANGUAGE SWITCH --- */
@media (max-width: 768px) {
  .language-switch {
    top: 10px;            /* etwas tiefer */
    right: 10px;          /* leicht nach innen */
    font-size: 14px;      /* kleinerer Text */
    background-color: rgba(255, 255, 255, 0.8); /* besser lesbar */
    padding: 4px 8px;
    border-radius: 8px;
  }
}
/* --- Sprachbutton im Menü --- */
.lang-btn {
  background-color: #333;      /* leicht abgesetzt vom Rest */
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
}

.lang-btn:hover {
  background-color: #ffd700;
  color: black;
}

/* --- NAVIGATION MOBILE FIX --- */
@media (max-width: 768px) {
  nav {
    display: flex;
    flex-wrap: wrap; /* Statt Spalte -> mehrere Zeilen falls nötig */
    justify-content: center; /* Zentriert im Header */
    gap: 6px;
  }

  nav a {
    padding: 6px 10px;
    font-size: 15px;
  }

  header {
    height: auto; /* Verhindert, dass das Bild überlappt */
  }

  #home img, 
  .hero, 
  .title-image {
    object-fit: cover;
    width: 100%;
    height: auto; /* Kein abgeschnittenes Bild */
  }
}
.about-img {
  width: 100%;
  max-width: 400px; /* begrenzt die Größe */
  border-radius: 10px;
  display: block;
  margin: 20px auto; /* mittig und mit Abstand */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* Abstände zwischen verschiedenen Themen */
section {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 20px; /* nur seitliche Abstände, kein oben/unten */
}
#about {
  padding: 70px 20px 40px 20px; /* oben / rechts / unten / links */
}

#gallery {
  padding: 10px 20px 20px 20px;
}

#contact {
  padding: 70px 20px 60px 20px;
}
#gallery {
  scroll-margin-top: 60px; /* Höhe deines fixen Headers */
}
.slideshow-container {
  margin-bottom: 40px; /* Abstand nach unten */
}

.youtube-lazy {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 25px auto;
  background-color: #000;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Play-Button */
.youtube-lazy .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  transform: translate(-50%, -50%);
  transition: transform 0.2s;
}

.youtube-lazy .play-button::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 12px;
  width: 0;
  height: 0;
  border-left: 20px solid white;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.youtube-lazy:hover .play-button {
  transform: translate(-50%, -50%) scale(1.1);
}

/* Mobilanpassung */
@media (max-width: 768px) {
  .youtube-lazy {
    max-width: 90%;
  }
}
