/* --- 1. GLOBALE ANPASSUNGEN --- */
body.index-body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px;
  padding-bottom: 150px;
  box-sizing: border-box; /* Verhindert, dass Padding die Breite sprengt */
  max-width: 100%;        /* Absicherung gegen Überbreite */
  overflow-x: hidden;     /* Verhindert horizontales Scrollen im Body */
}

/* --- 2. CONTAINER ANPASSUNGEN --- */
#main-website {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch; 
  padding: 10px; 
  width: 100%;   
  box-sizing: border-box;
  max-width: 100%;        /* Absicherung */
}

#content-viewport {
  width: 100%;
  max-width: 900px;
  margin: 40px auto 0 auto; 
  padding: 0 15px; 
  box-sizing: border-box;
}

/* KORREKTUR: Grid-Basis-Eigenschaften für die Vor- und Nachteile hinzugefügt */
.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Standard: 2 Spalten nebeneinander */
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Design für die einzelnen Karten (Vorteile / Nachteile) */
.card {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.nav-container {
  position: relative;
  padding: 15px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  width: 100%;        
  max-width: 450px;   
  margin: 0 auto;
  box-sizing: border-box;
}

.suitcooler-btn, .headcooler-btn {
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

/* --- 4. TEXT, GALERIE & INTRO AREA --- */
.intro-flex-container {
    display: flex;
    gap: 30px; 
    align-items: center; 
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

.intro-text-column {
    flex: 1.5; 
    font-size: 1.1em;
}

.image-placeholder {
    flex: 1; 
    display: flex;
    justify-content: center; 
}

.image-preview-container {
    width: 100%;
    max-width: 220px; 
    aspect-ratio: 3 / 4; 
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: #eaeaea;
}

/* KORREKTUR: Galerie-Reihe sicherer gemacht */
.bilder-galerie-reihe {
    display: flex;
    flex-direction: row;
    gap: 15px; 
    width: 100%;
    margin-bottom: 35px;
    box-sizing: border-box;
}

.bilder-galerie-reihe .image-placeholder {
    flex: 1; 
    min-width: 0; 
}

.bilder-galerie-reihe .image-preview-container {
    width: 100%;
    max-width: 100%; 
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: #eaeaea;
    margin-bottom: 0; 
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.thumb-img:hover {
    transform: scale(1.02);
    filter: brightness(0.9);
}

/* --- 5. BUTTONS & LIGHTBOX OVERLAY --- */
.nav-request-button {
    display: inline-block;
    background-color: #2b6cb0;
    color: #ffffff;
    text-decoration: none; 
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(43, 108, 176, 0.3);
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
}

.nav-request-button:hover {
    background-color: #1a365d; 
}

.nav-request-button:active {
    transform: scale(0.98); 
}

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.aktiv {
    display: flex;
    opacity: 1;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-schliessen {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
/* --- 3. RESPONSIVE MEDIA QUERIES (Am Ende der Datei einfügen) --- */

/* Für Tablets und Desktops (Bildschirme ab 768px Breite) */
@media (min-width: 768px) {
    #main-website {
        align-items: center; 
        padding: 20px;
    }
    
    #content-viewport {
        margin-top: 130px; 
        padding: 0; 
    }

    .nav-container {
        width: max-content; 
    }
}

/* Responsive Design für Mobilgeräte (Unter 680px Breite) */
@media (max-width: 680px) {
    #content-viewport {
        margin-top: 60px; 
    }

    .intro-flex-container {
        flex-direction: column; /* Stapelt Text und Bild vertikal */
        gap: 20px;
    }
    
    .image-preview-container {
        max-width: 280px; 
    }

    /* Bändigt die Vor- und Nachteile: Stapelt sie sauber untereinander */
    .grid-container {
        grid-template-columns: 1fr !important; 
        width: 100% !important;
    }

    /* 🛠️ WICHTIGE REPARATUR FÜR DIE BILDER-GALERIE AUF SMARTPHONES */
    .bilder-galerie-reihe {
        flex-direction: column !important; /* Stapelt die 3 Bilder untereinander */
        gap: 15px !important;
        align-items: center !important;
    }

    .bilder-galerie-reihe .image-placeholder {
        width: 100% !important;
        max-width: 280px !important; /* Gibt den Bildern ein schönes, lesbares Maß auf Handys */
    }
}

/* Speziell für sehr kleine Smartphones (unter 400px Breite) */
@media (max-width: 400px) {
    #content-viewport {
        margin-top: 60px; 
    }
    body.index-body {
        padding: 10px; 
    }
    .lightbox-schliessen {
        top: 10px;
        right: 20px;
        font-size: 30px; 
    }
}
