@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  src: url('../fonts/Inter/Inter-VariableFont_opsz,wght.ttf') format('truetype'); 
}

@font-face {
  font-family: 'Playfair Display SC';
  font-style: normal;
  font-weight: 900;
  src: url('../fonts/Playfair_Display_SC/PlayfairDisplaySC-Black.ttf') format('truetype'); 
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 300 800;
  src: url('../fonts/Playfair_Display/PlayfairDisplay-VariableFont_wght.ttf') format('truetype'); 
}


/* ========================== GLOBAL ========================== */
/* Box-Sizing auf alle Elemente anwenden */
* {
    box-sizing: border-box;
}

/* ========================== BODY ========================== */

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Legt es hinter alles andere */
    background: url('../img/index/hintergrund_alhambra.webp') no-repeat center center;
    background-size: cover;
}

html, body {
    background: none; /* Entferne den Hintergrund vom eigentlichen Body */
    height: 100vh;
    height: 100dvh; /* Zwingt den Body auf die volle Fensterhöhe */
    margin: 0; /* Standard-Margin entfernen */
    display: flex;
    flex-direction: column; /* Stapelt Header, Main und Footer UNTEREINANDER */
    font-family: 'Inter', Arial, sans-serif;

    font-size: 1rem; /* Basis-Schriftgröße */
    line-height: 1.6; /* Zeilenhöhe */
    overflow: hidden; /* Verhindert äußeren Scrollbalken */
    animation: fadeInUp 0.5s ease-in-out;
    scrollbar-gutter: auto;
}

@keyframes kiwiriStyle {
    0% {
        opacity: 0;
        transform: translateX(10px); /* Startpunkt: Etwas tiefer */
        filter: blur(2px);          /* Optional: Ein leichter Blur macht es noch weicher */
    }
    100% {
        opacity: 1;
        transform: translateX(0);    /* Endpunkt: Originalposition */
        filter: blur(0);
    }
}

/* Diese Klasse hängst du an deine Inhalts-Container */
.animate-slide-up {
   animation: kiwiriStyle 0.9s cubic-bezier(0.075, 0.82, 0.4, 1) forwards;
}


/* ========================== PAGE CONTAINER ========================== */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Mindestens die volle Fensterhöhe */
    min-height: 100dvh; /* Mindestens die volle Fensterhöhe */
    width: 100vw;       /* Nimmt die volle Breite ein */
    align-items: stretch; /* Zwingt Kinder (Header/Footer), die volle Breite zu nutzen */
    background: transparent;
}


/* ========================== HEADER ========================== */
.header {
    width: 100vw;
    min-height: 80px; /* Messe die Höhe deines Headers und trage sie hier fest ein */
    flex-shrink: 0;
    background: rgba(43,43,43,0.85);
    color: #fff;
    text-align: center;
    position: sticky; /* bleibt am oberen Rand kleben */
    top: 0;
    z-index: 50; /* über Content */
    overflow: visible;
}

.header-top {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    overflow: visible;
}

/* Abstand zwischen Logo und erstem Menüpunkt angepasst auf Nav-Gap */
.header-top a {
    margin-right: 20px; 
    display: flex;
    align-items: center;
}

.header h1 {
    margin-right: 2rem;
    font-size: 1.5rem;
    color: #fff;
}

/* ========================== HEADER NAV ========================== */
.header-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Wir hängen den Trenner NUR an das li, 
   aber positionieren ihn absolut, damit er das Panel nicht verschiebt */
.nav-item {
    position: relative;
 #   display: flex;
 #   align-items: center;
}

/* Der Container der Liste */
.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;            /* Nutzt die volle verfügbare Breite */
    justify-content: space-evenly; /* Verteilt Punkte mit exakt gleichen Abständen */
    align-items: center;    /* Vertikale Zentrierung */
    gap: 20px;
}

.nav-item:not(:last-child)::after {
 #   content: "|";
 #   color: #fff;
 #   opacity: 0.5;
 #   margin-left: 10px;
 #   margin-right: 10px;
 #   font-size: 1rem;
 #   pointer-events: none;
    display: none;
}

.header-nav a {
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
    padding: 8px 5px;
    font-weight: 400;
    white-space: nowrap; /* Verhindert Zeilenumbruch im Menüpunkt */
}

.header-nav a:hover {
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* ========================== MEGA PANEL ========================== */
.nav-item {
    position: relative;
}

.mega-panel {
    position: absolute;
    top: 100%;
    /* Zentriert das Panel genau unter dem jeweiligen Menüpunkt */
    left: 0; 
    transform: none; 
    
    width: 250px; /* Breite etwas reduziert für bessere Optik */
    display: block;
    padding: 1rem 0;
    background-color: #2b2b2b;
    border-top: 3px solid #fff;
    opacity: 0;
    max-height: 0;
    overflow: hidden; /* Verhindert Blitzer beim Ausfahren */
    transition: opacity 0.3s ease, max-height 0.3s ease;
    pointer-events: none;
    z-index: 9999;
}

.nav-item:hover > .mega-panel,
.nav-item.active > .mega-panel {
    opacity: 0.95;
    max-height: 600px;
    pointer-events: auto;
}

.mega-panel-wrapper {
    max-width: 1300px;
    display: flex;
    gap: 3rem;
}

.mega-column {
    min-width: 200px;
}

.mega-column h3 {
    font-size: 1.1rem;
    font-weight: 300;
    color: #fff;
    border-bottom: 1px solid #fff; /* Weiß statt grün */
    padding-bottom: 0.3rem;
    margin-bottom: 0.8rem;
    margin-left: 0.8rem;
    margin-right: 0.8rem;
    text-align: left;
}

.mega-column a {
    font-family: 'Inter';
    display: flex;
    color: #fff;
    text-decoration: none;
    margin: 0.2rem 0;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.0; /* engerer Zeilenabstand */
    padding-left: 1.2rem; /* Rückt die Unterpunkte nach rechts */
    padding-right: 1.2rem;
}

.mega-column a:hover {
    color: #9ad3b3;
}

/* ========================== CONTENT ========================== */
.content {
    flex: 1 1 auto;
    display: flex;    
    flex-direction: column;   

    width: 100%;
    height: 100%; /* Wichtig für Safari */
    min-height: 0; /* Safari Fix für verschachtelte Flex-Items */

 
    overflow: visible;
    position: relative;
    z-index: 1;
    background: transparent;
}

.content {
    flex: 1 1 auto; /* Erlaubt das Wachsen (Grow) UND Schrumpfen */
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%; /* Wichtig für Safari */
    min-height: 0; /* Verhindert Overflows in Flexbox */
    overflow: visible;
    position: relative;
    z-index: 1;
    background: transparent;
}

.content iframe {
    flex: 1; /* Zwingt das iframe, den gesamten Platz von .content zu füllen */
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
}

/* ========================== ALLGEMEIN ========================== */

.allgemein-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;    /* Startet oben, nicht zentriert */
    width: 100%;
    min-height: 100vh;
    padding: 0px 0;            /* Abstand oben/unten, damit der weiße Kasten nicht klebt */
    overflow: hidden;         /* Verhindert, dass die Hauptseite scrollt */
  }

.allgemein {
    /* 1. Flexbox für die vertikale Ausrichtung */
    display: flex;
    flex-direction: column;
    
    /* 2. Responsive Breite */
    width: 100%;           /* Erlaubt das Schrumpfen auf kleinen Schirmen */
    max-width: 1300px;     /* Deckelt die Breite bei 1300px */
    margin: 0 auto;        /* Zentriert den Kasten horizontal */
    
    /* 3. Abstände und Optik */
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    
    /* 4. Scroll-Verhalten */
    min-height: 100vh; 
    max-height: calc(100vh - 80px); 
    overflow-y: auto;      /* Innere Scrollbar, wenn Inhalt zu lang */
    overflow-x: hidden;    /* Verhindert horizontales Wackeln */
}

.allgemein  h1 { font-size: 1.3rem; font-weight: 700; margin-top: 0.6rem; margin-bottom: 0.3rem}
.allgemein  h2 { font-size: 1.1rem; font-weight: 500; margin-top: 0.6rem; margin-bottom: 0.3rem;}
.allgemein  h3 { font-size: 1.0rem; font-weight: 500; margin-top: 0.6rem; margin-bottom: 0.3rem;}
.allgemein  p { font-size: 1.0rem; font-weight: 300; line-height: 1.6; margin-top: 0.3rem; margin-bottom: 0.3rem;; letter-spacing: 0.03em; text-align: justify; hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto; }
.allgemein  ul { font-size: 1rem; font-weight: 300; line-height: 1.6; margin-top: 0.5rem; margin-bottom: 0.3rem; letter-spacing: 0.03em; }
.allgemein  li { font-size: 1rem; font-weight: 300; line-height: 1.6; margin-top: 0.5rem; margin-bottom: 0.3rem; letter-spacing: 0.03em; }

/* ========================== ALLGEMEIN 01 (NEU: GRID-LAYOUT) ========================== */
.allgemein_01 {
    display: grid !important;
    grid-template-columns: 25% 70% 5%;
    align-items: stretch;
    
    padding: 0px !important;
    background-color: rgba(255, 255, 255, 0.95);
    margin: 0px auto 0 auto;
    width: 100%;
    max-width: 1300px;
    border-radius: 8px;
    border: 3px solid rgba(0,0,0,0);

    /* Korrektur des Scrollbalkens: Header (80px) + Footer (80px) */
    flex: 1; /* Nimmt den gesamten verfügbaren Platz zwischen Header/Footer ein */
    min-height: 0; /* Wichtig für Flexbox-Korrektur in Safari */
    height: auto;      /* Erlaubt das Mitwachsen */    
    overflow-y: auto;
    overflow-x: hidden; 
}

.allgemein_01  h1 { font-size: 1.3rem; font-weight: 700; margin-top: 0.6rem; margin-bottom: 0.3rem}
.allgemein_01  h2 { font-size: 1.1rem; font-weight: 500; margin-top: 0.6rem; margin-bottom: 0.3rem;}
.allgemein_01  h3 { font-size: 1.0rem; font-weight: 500; margin-top: 0.6rem; margin-bottom: 0.3rem;}
.allgemein_01  p { font-size: 1.0rem; font-weight: 300; line-height: 1.6; margin-top: 0.3rem; margin-bottom: 0.3rem;; letter-spacing: 0.03em; text-align: justify; hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto; }
.allgemein_01  ul { font-size: 1rem; font-weight: 300; line-height: 1.6; margin-top: 0.5rem; margin-bottom: 0.3rem; letter-spacing: 0.03em; }
.allgemein_01  li { font-size: 1rem; font-weight: 300; line-height: 1.6; margin-top: 0.5rem; margin-bottom: 0.3rem; letter-spacing: 0.03em; }

.pattern-side {
    background-color: #f4f1ea; 
    background-image: url('../img/background/alhambra-pattern.png');
    background-repeat: repeat;
    /* Skaliert das Muster proportional zur Spaltenbreite */
    background-size: 100% auto; 
    border-right: 0px solid rgba(0,0,0,0.1);
}

.content-center {
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
}

.spacer-right {
    background: transparent;
}


/* ========================== KONTAKTSEITE ========================== */
.kontakt label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.kontakt input,
.kontakt textarea,
.kontakt button {
    display: block;
    width: 95%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
}

.kontakt button {
    background-color: #2f6f4e;
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.kontakt button:hover {
    background-color: #3fa77a;
}

/* ========================== FOOTER ========================== */
.footer {
    width: 100vw;
    background: rgba(43,43,43,0.85);
    color: #fff;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem;
    text-align: center;
    height: 80px;
    flex-shrink: 0;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0; /* Gap entfernen */
    margin: 0;
    padding: 0;
    align-items: center;
}

/* Der Trenner im Footer */
.footer-nav ul li:not(:last-child)::after {
    content: "|";
    color: #fff;
    opacity: 0.5;
    margin: 0 10px;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 5px;
    font-weight: 500;
    transition: background 0.3s ease;
    /* Skaliert zwischen 0.7rem und 1rem je nach Viewport */
    font-size: clamp(0.7rem, 2vw, 1rem); 
    white-space: nowrap; /* Verhindert hässliche Umbrüche pro Wort */
}

.footer-nav a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.footer p {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

footer {
    /* Behält dein Design bei, fügt aber unten Platz für die Systemleiste hinzu */
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

/* ========================== HAMBURGER-MENU (RESPONSIVE) ========================== */
.nav-toggle {
    display: none;
}

/* ========================== SHOP GRID ========================== */
/* 2. Page-Wrapper als Flex-Container */
.shop-page {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Erzwingt exakt die Fensterhöhe */
    max-width: 1300px;
    width: 100%;
    padding: 20px;
    justify-content: center;
    margin: 0 auto;
    display: block;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    min-height: 100%; /*Füllt Raum bis zum Footer aus */
}

/* 3. Der Container, der Sidebar und Content hält */
.shop-container {
    display: flex;
    flex: 1;          /* Nutzt den gesamten verfügbaren Platz */
    overflow: hidden; /* Verhindert, dass der Container selbst scrollt */
    width: 100%;
    padding-left: 15px; 
    padding-bottom: 20px;
}

/* 5. Main-Content Scrollbar machen */
.shop-main-content {
    flex: 1;
    height: 100%;     /* Wichtig! */
    overflow-y: auto; /* Aktiviert den Scrollbalken */
    overflow-x: auto; /* Aktiviert den Scrollbalken */
    padding: 20px;
    max-height: calc(100vh - 40px); /* Deckelt die Höhe, bevor sie aus dem Bild läuft */
}

/* 4. Sidebar Scrollbar machen */
.sidebar {
    flex: 0 0 300px;
    padding: 1.5rem;    
    height: auto;     /* Wichtig! */
    max-height: calc(100vh - 40px); /* Deckelt die Höhe, bevor sie aus dem Bild läuft */
    overflow-y: auto; /* Aktiviert den Scrollbalken */

    /* Ausrichtung */
    margin-left: 0;
    position: sticky;
    top: 20px;

    background-color: #ffffff; /* Reinweiß */
    border-radius: 8px;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.1);
    border: none; 
}

.sidebar h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
    font-size: 0.9rem;
}

.sidebar h3 + div {
    margin-bottom: 1rem;
}

.sidebar label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.85rem;
}

#subtypes-container label {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

/* ========================== PRODUKTGRID ========================== */
.product-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

#product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
}

/* ========================== PRODUKT-CARDS MIT JS-OVERLAY ZOOM ========================== */
.product-card {
    background-color: rgba(255,255,255,0.95);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    position: relative;
    overflow: visible;
    background-color: rgba(255, 255, 255, 0.95); /* Gleiches Weiß wie Sidebar */
    border-radius: 8px; /* Gleiche Abrundung */
    padding: 15px;
    
    /* EXAKT DER GLEICHE SCHATTEN WIE DIE SIDEBAR */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none; /* Entferne eventuelle Standard-Rahmen */
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Leichter Hover-Zoom */
}

.product-card img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.product-card .product-name,
.product-card .price,
.product-card .availability {
    position: relative;
    z-index: 1;
}

/* ========================== JS-OVERLAY ZOOM MIT SCROLLBAR ========================== */
:root {
    --header-height: 80px; /* Höhe des Headers */
}

.zoom-overlay {
    display: none;
    position: fixed;
    top: var(--header-height); /* direkt unter Header */
    left: 50%;
    transform: translateX(-50%);
    padding: 20px; /* Weißer Randsaum */
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    box-sizing: border-box;
    max-width: 80vw;
    max-height: calc(100vh - var(--header-height) - 40px); /* maximale Höhe */
    z-index: 100000;
    justify-content: center;
    align-items: center;
    overflow: auto; /* scrollbar bei zu großen Bildern */
}

.zoom-overlay img {
    max-width: 65%;
    max-height: 65%;
    width: auto;
    height: auto;
    object-fit: contain; /* proportional skalieren */
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
    display: block;
}

/* X-Button immer oben rechts innerhalb Overlay */
.zoom-overlay .zoom-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.95);
    color: #333;
    font-weight: bold;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 100001;
}

/* ========================== THEMES CONTAINER ========================== */
.themes-container {
    display: flex;
    flex-direction: row;    /* Sidebar links, Content rechts */
    gap: 2rem;
    max-width: 1300px;      /* Oder deine gewünschte Breite */
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 15px rgba(0, 0, 0, 0.1);

    padding: 0px 0px 0px 20px;
    /* Verhindert, dass der Container unendlich wächst */
    min-height: calc(100vh - 120px); 
    margin: 0 auto;
    overflow: hidden; /* Wichtig, damit nur die inneren Boxen scrollen */
}

/* ========================== THEMES SIDEBAR ========================== */
.themes-sidebar {
    /* Layout & Flex-Logik */
    display: flex;
    flex-direction: column;
    flex: 0 0 250px;
    
    /* Positionierung */
    position: sticky;
    top: 20px;
    
    /* Dimensionen */
    height: auto;
    max-height: calc(100vh - 40px);
    
    /* Ästhetik (Dein Original-Style) */
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-left: 0;
    border: none;
    background-color: rgba(255, 252, 250, 0.4);

    /* WICHTIG: Die Sidebar selbst darf NICHT scrollen */
    overflow: hidden; 
}

.sidebar-header {
    flex-shrink: 0; /* Header bleibt starr */
    padding: 0;
    background-color: transparent; /* Vererbt Sidebar-Hintergrund */
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px; /* Kleiner Abstand zur Liste */
}

.sidebar-scroll-area {
    flex-grow: 1;
    overflow-y: auto; /* NUR hier wird gescrollt */
    padding: 5px 0;
    
    /* Optional: Scrollbar-Styling für einen cleanen Look */
    scrollbar-width: thin;
}

#themes-list {
    margin: 0;
    padding: 0;
    list-style: none;
}


.themes-sidebar h3 {
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
    margin-bottom: 0.8rem;
}

#themes-list-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;                /* WICHTIG für Flexbox-Scrolling */
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #eee;
}

#themes-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    overflow-y: auto; 
    flex-grow: 1;
}

#themes-list li {
    font-size: 1.0rem;
    font-weight: 500;
    margin-bottom: 0.6rem;
    cursor: pointer;
}

/* Aktiver Zustand: Text nach rechts rücken */
#themes-list li.active-plant {
    color: #2f6f4e;
    font-weight: 700;
    position: relative;
    /* Erhöhtes Padding, um Platz für den Punkt zu schaffen */
    padding-left: 28px !important; 
    transition: all 0.2s ease;
}

/* Der grüne Punkt: Absolut positioniert im Padding-Bereich */
#themes-list li.active-plant::before {
    content: "●";
    position: absolute;
    /* Positioniert den Punkt ganz links im Padding-Bereich */
    left: 5px; 
    /* Zentriert den Punkt vertikal zur ersten Zeile */
    top: 50%;
    transform: translateY(-50%);
    color: #2f6f4e;
    font-size: 1rem; 
    line-height: 1;
}

.themes-nav-controls {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    padding: 5px;
    position: relative; /* Stellt sicher, dass es über dem Hintergrund liegt */
    z-index: 10;        /* Bringt die Buttons in den Vordergrund */
}

#themes-list {
    font-size: 1.0rem; 
}

#themes-list li {
    font-size: 1.0rem;
}



.themes-nav-btn {
    background: #f8f9fa;
    border: 1px solid #ccc;
    color: #444;
    
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.themes-nav-btn:hover:not(:disabled) {
    /* Leichter Grauschleier beim Drüberfahren */
    background: #e2e6ea;
    border-color: #bbb;
    color: #000;
}

.themes-nav-btn:active:not(:disabled) {
    background: #dae0e5;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
}

.themes-nav-btn:disabled {
    /* Inaktive Pfeile verblassen dezent */
    opacity: 0.4;
    background: #fdfdfd;
    border-color: #ddd;
    color: #aaa;
    /* Hier nutzen wir 'default' statt 'not-allowed' für ein ruhigeres UI */
    cursor: default;
}

#themes-list li:hover {
    color: #2f6f4e;
}

/* ========================== THEMES CONTENT ========================== */
.themes-content {
    flex: 1 1 auto; /* flexibel, nimmt restlichen Platz */
    flex-grow: 1;          /* Nimmt den restlichen Platz ein */
    flex-shrink: 1;        /* Erlaubt dem Container zu schrumpfen */
    min-width: 0;          /* WICHTIG: Verhindert, dass Flex-Items überlaufen */
    width: 100%; /* füllt Container aus */
    height: 100vh; /* volle Höhe minus Header + Padding */
    overflow-y: auto; /* nur Content scrollt */
    overflow-x: hidden; /* kein horizontaler Scroll */
    padding: 20px;
    padding-right: 40px;
    box-sizing: border-box; /* Padding wird in die Breite eingerechnet */
    box-sizing: border-box;
}

.themes-content  h1 { font-size: 1.3rem; font-weight: 700; margin-top: 0.6rem; margin-bottom: 0.3rem}
.themes-content  h2 { font-size: 1.1rem; font-weight: 500; margin-top: 0.6rem; margin-bottom: 0.3rem;}
.themes-content  h3 { font-size: 1.0rem; font-weight: 500; margin-top: 0.6rem; margin-bottom: 0.3rem;}
.themes-content  p { font-size: 1.0rem; font-weight: 300; line-height: 1.6; margin-top: 0.3rem; margin-bottom: 0.3rem;; letter-spacing: 0.03em; text-align: justify; hyphens: auto; -webkit-hyphens: auto; -ms-hyphens: auto; }
.themes-content  ul { font-size: 1rem; font-weight: 300; line-height: 1.6; margin-top: 0.5rem; margin-bottom: 0.3rem; letter-spacing: 0.03em; }
.themes-content  li { font-size: 1rem; font-weight: 300; line-height: 1.6; margin-top: 0.5rem; margin-bottom: 0.3rem; letter-spacing: 0.03em; }

/* Karte der Bioregionen horizontal scrollbar */
#themes-content {
    overflow-x: auto; /* Erlaubt horizontales Scrollen */
    -webkit-overflow-scrolling: touch; /* Sanftes Scrollen auf Mobilgeräten */
}

/* Sicherstellen, dass die Karte der Bioregionen nicht gestaucht wird */
#themes-content > div[style*="background-image"] {
    min-width: 700px; /* Die Breite deiner WORLD_MAP_CONFIG */
    margin-bottom: 15px;
}

.themes-empty-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px; /* Ausreichend Platz im Content-Bereich */
    text-align: center;
    color: #666;
    background: rgba(255, 255, 255, 0.3); /* Dezenter Hintergrund */
    border-radius: 8px;
    margin: 20px;
}

.themes-empty-notice p {
    font-size: 1.2rem;
    font-style: italic;
    margin: 0;
}

.themes-empty-notice .sub-text {
    font-size: 0.9rem;
    font-style: normal;
    margin-top: 10px;
    color: #888;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    width: 100%;
}

.themes-body.grid-layout {
    /* Erzeugt zwei Spalten mit einem Abstand von 40px */
    column-count: 2;
    column-gap: 40px;
    
    /* Optionale Trennlinie zwischen den Spalten */
    column-rule: 1px solid #ddd;
    
    /* Blocksatz für Zeitungs-Look */
    text-align: justify;
    hyphens: auto;
}

.themes-body.single-layout {
    display: block !important;
    width: 100%;
}

.themes-body img, 
.themes-body h2 {
    break-inside: avoid;
}



/* ========================== THEMES CONTENT – BILDER ========================== */
.themes-content img.themes-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.2rem 0;
  border: 1px solid rgba(0,0,0,0.35);
  border-radius: 4px;
  box-sizing: border-box;
}

/* Container für das Bild und die Bildunterschrift */
.themes-figure.float-left {
    float: left;          /* Lässt Text rechts vorbeifließen */
    width: 100%;           /* Breite des Bildes im Verhältnis zum Text (nach Wunsch anpassen) */
    margin-top: 0rem;  /* Abstand zum Text darunter */
    margin-right: 1.5rem; /* Abstand zum rechts fließenden Text */
    margin-bottom: 0.8rem;  /* Abstand zum Text darunter */
}

/* Sicherstellen, dass das Bild innerhalb des Figure-Containers bleibt */
.themes-figure.float-left img {
    width: 100%;
    height: auto;
    display: block;
}

/* WICHTIG: Verhindert, dass nachfolgende Überschriften oder Abschnitte 
   ungewollt in den Umfluss geraten */
.themes-body::after {
    content: "";
    display: table;
    clear: both;
}

.themes-figure.full-width {
    float: none;    /* Deaktiviert das Umfließen */
    width: 100%;    /* Nutzt die volle Breite */
    margin: 1.5rem 0; 
    display: block; /* Stellt sicher, dass es ein Block-Element ist */
}

.themes-content figure {
  margin: 1.2rem 0;
}

.themes-content figcaption {
  font-size: 1.0rem;
  line-height: 1.5;
  font-style: italic;
  color: #333;
  margin-top: 0.4rem;
}

.half-width-figure {
  width: 50%;
  height: auto;
  display: block;
  margin: 0 auto; /* Optional: Zentriert das Bild */
}

.half-width-figure img {
    width: 100% !important;
    height: auto !important;
}

/* ========================== SLIDER CONTAINER ========================== */
.slider-outer-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;           /* Nutzt die volle Breite */
    max-width: none;        /* Hebt die Begrenzung auf */
    height: auto;      
    position: relative;
    box-shadow: 0px 0px 10px rgba(255, 255, 245, 0.99); 
    border-radius: 0px;
    padding: 20px; /* Mehr Padding für mobile Ansicht */
    background: rgba(255, 255, 245, 0.7);       
    backdrop-filter: blur(1px);
    z-index: 10;
    margin-top: 0px
}

.slider-container {
    width: 100%;
    aspect-ratio: 15.8 / 9;
    position: relative;
    margin: 0 auto; /* Zentriert den Slider horizontal im Wrapper */
    border-radius: 8px;
    background-color: rgba(255, 255, 245, 0.7);
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column; /* Stapelt Bild oben, Text unten */
    justify-content: flex-start; 
    align-items: stretch;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 85%;
    flex: 0.85;          /* Nimmt den verfügbaren Platz oberhalb des Textes ein */
    object-fit: contain;
    display: block;
}

/* ========================== SLIDER TEXT (Lato-Optimiert) ========================== */
.slide-content {
    position: absolute;
    /* Fixiert den Streifen exakt am unteren Rand */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15%; /* Behält deine proportionale Höhe bei */
    
    /* NEU: Flexbox für perfekte Zentrierung */
    display: flex;
    align-items: center;     /* Zentriert den Text vertikal im 15%-Streifen */
    justify-content: flex-start; /* Text bleibt linksbündig */
    
    /* Deine gewünschte Typografie (auf Lato umgestellt) */

    font-size: clamp(1rem, 1.2vw, 2.2rem); 
    font-weight: 400;        /* Regular für optimale Lesbarkeit auf hellem Grund */
    color: #1a1a1a;          /* Anthrazit für besseren Kontrast als tiefschwarz */
    
    /* Optik des Streifens: Modernisierter Glassmorphism */
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(8px); /* Erzeugt edle Unschärfe des Hintergrundbildes */
    -webkit-backdrop-filter: blur(8px); /* Support für Safari */
    
    line-height: 1.2;
    padding: 0 0 0 25px;     /* Padding links für Abstand zum Rand */
    
    /* Schatten für eine leichte Trennung zum Bild */
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
    
    z-index: 10;
    pointer-events: none;

    /* Abrundung unten passend zum Slider-Container */
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* ========================== COMPARISON SLIDER ========================== */

/* Grundgerüst für den Slider */
.image-comparison-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 400px; /* Oder dynamisch */
}

.image-comparison-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Das obere Bild wird später durch JS in der Breite manipuliert */
.image-comparison-slider img:first-child {
    z-index: 2;
    width: 50%; 
    border-right: 2px solid white;
}

/* ========================== FLIP CARDS ========================== */

.flip-container {
    display: flex;
    flex-wrap: wrap; /* WICHTIG: Erlaubt Umbruch auf Handys */
    justify-content: center;
    gap: clamp(5px, 1vw, 20px);
    padding: 20px;
    perspective: 1500px;
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 1200px; /* Maximale Gesamtbreite */
    margin: 0 auto;
}

.flip-card {
    background-color: transparent;
    /* Flexible Breite: 28% des Sichtfeldes, aber max/min Grenzen */
    width: 280px; 
    height: 280px; 
    max-width: 90vw; /* Verhindert Überlaufen auf extrem schmalen Geräten */
    max-height: 90vw;
    
    text-decoration: none;
    display: block;
    position: relative;
    opacity: 0;

    animation-delay: var(--delay);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    /* Sanfte Drehung NUR auf diesem Element */
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    transform: rotateY(0deg); 
}

/* Hover: Nur das Innere dreht sich */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

.flip-card-front {
    position: relative;
    background: #222;
    /* --- ZWINGEND ERFORDERLICH --- */
    border-radius: 5px !important; 
    overflow: hidden !important;    
    /* ----------------------------- */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Dieser Fix hilft Browsern beim Rendern der Rundung */
    transform: translateZ(0); 
}

.flip-card-front img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.flip-card-front img.active {
    opacity: 1;
    z-index: 2;
}

.flip-card-back {
    /* FIX: Muss absolute sein, um genau über der Vorderseite zu liegen */
    position: absolute; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Die Rückseite ist bereits um 180 Grad gedreht */
    transform: rotateY(180deg);
    
    /* WICHTIG: Verhindert das Durchscheinen */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px; /* Damit auch die Rückseite runde Ecken hat */
    padding: 20px;
    color: #333;
    box-sizing: border-box; /* Padding wird in die 100% Breite eingerechnet */
}

/* Die Lade-Animation: Verwendet kein rotateY mehr, damit Hover stabil bleibt */
@keyframes entranceFade {
    0% { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Das Label-Container auf der Vorderseite */
.card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: clamp(40px, 6vw, 80px);
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    
    /* FIX: Nebeneinander anordnen */
    display: flex;
    flex-direction: row; 
    justify-content: center;
    align-items: center;
    gap: 1.5vw; /* Auch der Abstand zwischen Icon und Text skaliert nun */
    
    padding-bottom: clamp(15px, 2vw, 30px);
    z-index: 10;
    color: white;
    pointer-events: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    backface-visibility: hidden;
}

/* Das Icon (Emoji oder Bild) */
.card-label-icon {
    font-size: 4vw; 
    /* clamp verhindert, dass es am Desktop zu riesig oder am Handy zu winzig wird */
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 2px;
    display: inline-block; /* Wichtig für transform */
    transform: scaleX(-1); /* FIX: Spiegelt den Einkaufswagen horizontal */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Der Text (z.B. "Shop") */
.card-label span {
    font-size: 3vw;
    /* clamp(Minimum, Wunschgröße, Maximum) */
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    font-family: 'Playfair Display', serif; /* Falls du eine Serif-Schrift nutzt */
}

/* ========================== ZOOM CARDS (MIT ÄUSSEREM SCHATTEN) ========================== */

.zoom-card {
    background-color: transparent;
    width: 280px; 
    height: 280px; 
    max-width: 90vw;
    max-height: 90vw;
    text-decoration: none;
    display: block;
    position: relative;
    
    /* Animation & Timing */
    opacity: 0;

    animation-delay: var(--delay);

    /* DER ÄUSSERE SCHATTEN: Exakt wie bei .flip-card-front / .flip-card-back */
    /* Wir legen ihn hier auf das äußere Element, damit er trotz overflow:hidden sichtbar bleibt */
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    border-radius: 5px;
    
    /* WICHTIG: Verhindert, dass das Bild beim Zoomen über den Schatten/Rand hinausragt */
    overflow: hidden; 
}

.zoom-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    /* overflow hier dient der Sicherheit für das Bild-Scaling */
    overflow: hidden; 
    border-radius: 5px;
    /* Browser-Fix für saubere Ecken während der Animation */
    transform: translateZ(0);
}

/* Der Zoom-Effekt auf das Bild innerhalb der Karte */
.zoom-card .flip-card-front img {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1; /* Sicherstellen, dass das Bild sichtbar ist */
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zoom-card:hover .flip-card-front img {
    transform: scale(1.15);
}

/* Label-Anpassung für die Zoom-Card */
.zoom-card .card-label {
    /* Nutzt die globalen Stile von .card-label */
    transition: background 0.3s ease;
}

.zoom-card:hover .card-label {
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
}

/* 1. Grundzustand: Karten sind unsichtbar und leicht versetzt */
.flip-card, .zoom-card {
    opacity: 0;
    transform: translateY(40px); /* Startposition tiefer */
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Entferne hier das direkte 'animation:' Attribut, falls vorhanden */
}

/* 2. Diese Klasse wird per JS hinzugefügt, wenn gescrollt wird */
.reveal-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Behalte deine Delays bei, damit Karten nacheinander einfahren */
.flip-card.reveal-active, .zoom-card.reveal-active {
    transition-delay: var(--delay);
}

/* ========================== MISSION EXCLUSIVE ANIMATION ========================== */

.mission-wrapper {
    background: rgba(255, 255, 255, 0.95) !important; 
    padding: 60px 40px !important; /* Etwas mehr vertikaler Abstand für edle Optik */
    margin-top: 40px;
    margin-bottom: 40px;
    
    /* INITIALER ZUSTAND FÜR DEN SLIDE-IN (Wird via JS getriggert) */
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* KLASSE DIE PER JAVASCRIPT GEGEBEN WIRD */
.mission-wrapper.mission-visible {
    opacity: 1 !important;
    transform: translateY(0);
}

.mission-content-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px; /* Größerer Gap für mehr "Luft" zwischen Bild und Text */
    width: 100%;
}

.mission-image-box {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15); /* Etwas tieferer Schatten */
}

.mission-image-box img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Kleiner Bonus: Bild zoomt minimal beim Hover */
.mission-image-box:hover img {
    transform: scale(1.03);
}

.mission-text-box {
    flex: 1;
    font-family: 'Inter', sans-serif !important; /* Konsistenz zu Rest der Seite */
}

.mission-subtitle {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: #2f6f4e;
    margin-bottom: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif !important;
}

.mission-text-box h2 {
    font-family: 'Inter', sans-serif !important;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.mission-text-box p {
    font-family: 'Inter', sans-serif !important;
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: #444;
}

.mission-btn {
    display: inline-block;
    padding: 14px 30px;
    background-color: #2f6f4e;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mission-btn:hover {
    background-color: #3fa77a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(47, 111, 78, 0.3);
}

/* Der Startzustand für beide Sektionen */
#mission-section, #cards-section {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Der Zustand, den das JS auslöst */
#mission-section.reveal-active, 
#cards-section.reveal-active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}


/* ========================== HERO-SECTION IM CONTENTBEREICH ========================== */

/* Hero-Bereich Styles */
.hero-section {
    width: 100%;
    min-height: 95vh;
    height: calc(100vh - 200px);
    min-height: 95dvh;
    height: calc(100dvh - 200px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    position: relative;
    /* Ein sanfter radialer Verlauf dunkelt das Bild zur Mitte hin leicht ab, 
       um den Fokus auf die Schrift zu legen */
    background: radial-gradient(circle, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 90%);
    margin-top: 0vh;
    margin-bottom: 5vh;
    margin-bottom: 5dvh;
}

.hero-content {
    max-width: 1100px;
    z-index: 2; /* Über dem Hintergrund-Overlay */
}

/* Der Container (H1) behält die Struktur */
.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1.1;
    /* Mehrschichtiger Schatten für maximale Sichtbarkeit – wie im roten Kreis markiert */
    text-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.9),  /* Tieferer, weicherer Schleier */
        0 0 10px rgba(0, 0, 0, 0.5),   /* Etwas Unschärfe direkt hinter dem Text */
        2px 2px 2px rgba(0, 0, 0, 0.8);  /* Harte Kante für die Kontur */
}

/* Initialzustand: Die gesamte Überschrift ist unsichtbar */
#hero h1 {
    opacity: 0;
    transition: opacity 0.5s ease; /* Optional: Sanftes Einblenden des Containers */
}

/* Sobald das JavaScript bereit ist, machen wir den Container sichtbar */
#hero h1.js-loaded {
    opacity: 1;
}

/* Die einzelnen Buchstaben erben den massiven Schatten und Style */
.hero-letter {
    display: inline-block; /* Wichtig, damit transform funktioniert */
    opacity: 0;
    transform: translateX(-15px); /* Startet leicht links */
    filter: blur(5px); /* Startet unscharf */
    
    /* Der Schatten muss hier explizit auf die Buchstaben angewendet werden,
       damit er während der Animation sichtbar ist.
       Der Wert muss exakt dem von h1 entsprechen.
    */
    text-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.9), 
        0 0 10px rgba(0, 0, 0, 0.5),
        2px 2px 2px rgba(0, 0, 0, 0.8);
    
    /* WICHTIG: Die Dauer (0.8s) muss mit letterAnimationDuration im JS übereinstimmen */
    transition: 
        opacity 0.8s ease-out, 
        transform 0.8s ease-out, 
        filter 0.8s ease-out;
}

/* Wenn die Animation zündet */
.hero-content.animate-titles .hero-letter {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

/* --- SUBTITLE STYLE (Der Rest der Schrift) --- */

.hero-content p {
    font-size: clamp(1.1rem, 1.8vw, 1.6rem);
    /* WICHTIG: Wieder strahlend reines Weiß statt gedimmtes Weiß */
    color: #ffffff; 
    font-weight: 300;
    line-height: 1.6;
    
    /* KORREKTUR: Wir entfernen den Schatten vom GESAMTEN Absatz.
       Der Standardtext soll sauber und clean sein.
    */
    text-shadow: none; 
}

.hero-content p strong {
    font-weight: 600;
    color: #ffffff; /* Auch hier strahlend weiß */
    letter-spacing: 1px;
    
    /* DER EFFEKT: Dies erzeugt diesen weichen, dunklen "Halo-Effekt"
       um die Fettgedruckte Schrift herum, ohne sie dunkler zu machen.
       Wir nutzen einen dunkleren, weicheren Schatten als in der Headline,
       der eher wie ein Glow wirkt.
    */
    text-shadow: 
        0 0 15px rgba(0, 0, 0, 0.9),  /* Tiefer, weicher Glow */
        2px 2px 2px rgba(0, 0, 0, 0.8);  /* Harte Kante für Definition */
}

/* Subtitle erscheint komplett */
.hero-content.animate-titles p {
    opacity: 1;
}

/* Grundzustand des Subtitels: Unsichtbar */
#animated-subtitle {
    opacity: 0;
    /* Sanftes Fading für den gesamten Block, gesteuert über .animate-subtitle-start */
    transition: opacity 1.5s ease-in-out;
}

/* --- BUCHSTABEN-ANIMATION ("GRAZIANO IULIO") --- */

/* Grundzustand des H1: Leer, aber sichtbar */
#animated-title {
    opacity: 1;
}

/* NEUE LOGIK: Wenn .animate-letters-start am H1 aktiv ist, 
   faden die Buchstaben ein (ihr Delay steuert das JS)
*/
#animated-title.animate-letters-start .hero-letter {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

/* --- SUBTITEL-ANIMATION (Der Rest der Schrift) --- */

/* NEUE LOGIK: Wenn .animate-subtitle-start am P aktiv ist, 
   fadet der gesamte Block ein.
*/
#animated-subtitle.animate-subtitle-start {
    opacity: 1;
}

/* ========================== SCROLL-INDIKATOR ========================== */

.scroll-indicator {
    position: absolute;
    bottom: 3vh; /* Etwas höher ansetzen für den Text */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    text-align: center;
    
    /* Flexbox, um Text und Pfeil sauber untereinanderzustapeln */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* Abstand zwischen Text und Pfeil */
    
    /* Sanfter Übergang für den Hover-Effekt */
    transition: transform 0.3s ease-in-out;
}

/* Der Text oberhalb des Pfeils */
.scroll-text {
    /* Skaliert zwischen 0.6rem (ca. 9.6px) auf Mobile und 0.9rem auf Desktop */
    font-size: clamp(0.6rem, 2vw, 0.9rem); 
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    
    /* Animation: Text fadet erst ein */
    opacity: 0;
    animation: fadeInText 1s ease-out 3.5s forwards;
    
    /* Sicherstellen, dass der Text bei sehr schmalen Screens nicht umbricht */
    white-space: nowrap; 
}

/* Das neue Pfeil-Symbol (als Hintergrund-SVG) */
.arrow-icon {
    width: 30px;  /* Breite des Pfeils */
    height: 18px; /* Höhe des Pfeils */
    
    /* Wir nutzen ein sauberes SVG-Icon als Hintergrundbild.
       Vorteil: Es ist knackescharf auf jedem Display. */
    background-image: url('../svg/chevron-double-down.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    
    /* Schatten für den Pfeil selbst */
    filter: drop-shadow(0px 2px 3px rgba(0,0,0,0.5));
    
    /* Startzustand für Animationen */
    opacity: 0;
}

/* --- ANIMATIONEN --- */

/* 1. Einblenden des Textes */
@keyframes fadeInText {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 2. Pulsieren des Pfeils */
@keyframes pulseArrow {
    0% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(10px); opacity: 1; } /* Bewegt sich 10px nach unten */
    100% { transform: translateY(0); opacity: 0.5; }
}

/* Zustand, wenn die Animation zündet (per JS oder durch die .hero-content Klasse) */
/* Wir nutzen hier die Klasse '.animate-titles', die du bereits im Hero-Content verwendest */
.hero-content.animate-titles .arrow-icon {
    /* Die Pulse-Animation für den Pfeil startet, sobald der Titel fertig ist */
    animation: pulseArrow 2s ease-in-out 1.5s infinite; /* Startet nach 1.5s */
}

/* Hover-Effekt für den gesamten Container */
.scroll-indicator:hover {
    transform: translateX(-50%) translateY(3px);
}

.scroll-indicator:hover .scroll-text {
    color: #ffffff; /* Text wird bei Hover ganz weiß */
}

/* ========================== NAVIGATION (Pfeile & Punkte) ========================== */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    user-select: none;
    z-index: 20;
    transition: background 0.3s;
}

.arrow:hover { background: rgba(0,0,0,0.6); }
.arrow.left { left: 20px; }
.arrow.right { right: 20px; }

.dots {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active { background: white; }

/* ========================== ABWEICHENDER STYLE LITERATURVERWEISE ========================== */

/* Selektor für den gesamten Quellen-Container */
.source-text {
    font-size: 0.85rem !important;   /* Verkleinert die Schrift (z.B. 13px statt 16px) */
    line-height: 1.4;    /* Kompakterer Zeilenabstand */
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

/* Falls du die Überschrift "Literatur" ebenfalls kleiner willst */
.source-text h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* ========================== SIDEBAR TOGGLE-BUTTON ========================== */

/* Grundzustand des Buttons (Standardmäßig versteckt) */
.sidebar-toggle-btn {
    display: none; /* Standardmäßig aus */
    width: 100%;
    height: 25px; /* Extrem schmale Höhe */
    background: #fdfdfd; /* Fast weiß */
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: background 0.2s ease;
}

/* Der "Handle" (die schmale Linie in der Mitte) */
.sidebar-toggle-btn::after {
    content: "";
    width: 40px;      /* Breite der Linie */
    height: 4px;      /* Dicke der Linie */
    background-color: #ccd0cc; /* Dezentes Grau-Grün */
    border-radius: 10px;
    transition: background-color 0.2s ease, width 0.2s ease;
}

.sidebar-toggle-btn:hover::after {
    background-color: #4A4A4A; /* Deine Akzentfarbe */
    width: 50px; /* Wird dezent breiter beim Drüberfahren */
}

.arrow-icon-down::before {
    content: none !important; 
}

/* ========================== RESPONSIVE: max-width 900px ========================== */
@media (max-width: 900px) {

    .allgemein_01 {
        grid-template-columns: 1fr !important;
        height: auto; 
        max-height: none; 
    }

    .header-top {
        flex-direction: column;
        align-items: center;
        padding: 0.5rem;
        position: relative;
    }

    /* --- ANIMIERTES HAMBURGER-ICON (RECHTS) --- */
.header-nav .nav-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        position: absolute;
        
        /* JETZT LINKS POSITIONIERT */
        left: 1.5rem; 
        
        top: 1.5rem;
        z-index: 1100;
        transition: transform 0.3s ease;
    }

    /* Hover-Effekt: Etwas hervorheben */
    .header-nav .nav-toggle:hover {
        transform: scale(1.15);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
    }

    /* Die drei Linien */
    .header-nav .nav-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 3px;
        transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
        transform-origin: center;
    }

    /* ANIMATION ZUM X (wenn aktiv) */
    .header-nav .nav-toggle.open span:nth-child(1) {
        transform: translateY(9.5px) rotate(45deg);
    }

    .header-nav .nav-toggle.open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .header-nav .nav-toggle.open span:nth-child(3) {
        transform: translateY(-9.5px) rotate(-45deg);
    }

    /* --- MENÜ-LISTE --- */
    header .header-nav .nav-list {
        display: none !important; 
        flex-direction: column !important;
        position: absolute;
        width: 50%;
        left: 0;
        top: 100%; 
        background: rgba(35, 35, 35, 0.98) !important;
        padding: 5px 0 !important;
        margin: 0;
        z-index: 1000;
        max-height: 85vh; 
        overflow-y: auto;
        list-style: none;
        box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
        transition: none !important;
    }

    header .header-nav .nav-list.active {
        display: flex !important;
    }

    .header-nav .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .header-nav .nav-item:hover {
        background: transparent !important;
    }

    .header-nav .nav-item > a {
        display: block;
        font-size: 0.9rem !important; 
        line-height: 1.2 !important; 
        padding: 12px 20px !important; 
        color: white;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* --- MEGA PANEL LOGIK --- */
    .header-nav .nav-item .mega-panel {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: relative !important; 
        width: 100% !important;
        background: rgba(45, 45, 45, 1) !important;
        padding: 0 !important;
        border: none !important;
        transition: none !important;
    }

    .header-nav .nav-item .mega-panel.is-open {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .footer {
        height: 40px; /* Erzwingt die feste Höhe */
        padding: 0.5rem 1rem; /* Weniger Padding oben/unten */
        justify-content: center; /* Zentriert den Inhalt vertikal */
    }

    .footer-nav ul {
        flex-wrap: nowrap; /* VERHINDERT das Stapeln der Menüpunkte */
        gap: 2px; /* Minimaler Abstand zwischen den Items */
        justify-content: space-between;
        width: 100%;
    }

    .footer-nav ul li:not(:last-child)::after {
        content: "|"; /* Bringt den Trenner zurück, aber dezent */
        margin: 0 4px;
        font-size: 0.6rem;
    }

    .footer-nav a {
        /* Verkleinert die Schrift auf Mobile deutlich (ca. 10px bis 12px) */
        font-size: clamp(0.6rem, 2.5vw, 0.85rem) !important; 
        padding: 4px 2px;
    }

    .footer p {
        margin-top: 2px;
        font-size: 0.3rem; /* Copyright-Text ebenfalls verkleinern */
    }

/* Highlight für den aktuell gewählten Menüpunkt */
.header-nav .nav-item > a.is-active-link {
    color: #9ad3b3 !important; /* Die grüne Akzentfarbe deines Lexikons */
    font-weight: bold;
    background: rgba(255, 255, 255, 0.05); /* Dezenter Hintergrund-Schimmer */
}

    /* Untermenü-Details */
    .mega-panel-wrapper {
        display: block !important; 
        padding: 0 !important;
    }

    .mega-column h3 {
        margin: 0 !important;
        padding: 10px 0px 5px 25px !important;
        font-size: 0.8rem;
        color: #9ad3b3;
        text-align: left !important;
        justify-content: flex-start !important; /* Falls Flexbox genutzt wird */
        align-items: flex-start !important;
    }

    .mega-column a {
        padding: 8px 25px !important;
        display: block;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 0.7rem !important;
        background: transparent !important;
        line-height: 1.1;
        text-align: left !important;
        justify-content: flex-start !important; /* Falls Flexbox genutzt wird */
        align-items: flex-start !important;
    }

    /* Content & Sonstiges */
   .slide-content {
        /* Hier überschreiben wir den fixen 1.2rem Wert durch 
           eine prozentuale Skalierung passend zum Bild */
       
        font-size: 1.5vw !important; 
        width: 100% !important;
        padding: 5px !important;
        
        /* Sorgt dafür, dass der Text immer zentriert bleibt, 
           auch wenn das Fenster schmaler wird */
        left: 0%; 
        transform: translateY(-10%);
    }

    .themes-figure.float-left { float: none; width: 100%; margin-right: 0; }
    .themes-body { column-count: 1; }

#themes-content p.source-text {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: 5px;
    display: block;
}


.sidebar-initial {
    height: auto; /* Nur so groß wie der Hinweistext */
}

.sidebar-active {
    height: 50vh; /* Oder ein anderer gewünschter Wert nach der Auswahl */
}

.themes-container {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: 100vh;
    }

  #themes-content { /* Dein Content-Bereich */
    width: 100% !important;
    padding: 0px;
    padding-right: 15px;
    padding-bottom: 10px;
  }

  /* Verhindert, dass die Weltkarte oder Bilder mobil den Rahmen sprengen */
  canvas, img, .themes-grid {
    max-width: 100%;
    height: auto;
  }

/* Die Buchstaben-Boxen im Alphabet-Modus massiv verkleinern */
    .themes-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr)) !important;
        gap: 8px !important;
        margin-top: 10px !important;
    }

/* Die einzelnen Buchstaben-Buttons (A, B, C...) */
    .themes-grid div[style*="display: flex"] {
        padding: 8px 2px !important; /* Deutlich flacher */
        font-size: 0.9rem !important; /* Kleinere Schrift */
        margin-top: 5px !important;  /* Weniger Abstand nach oben */
    }

/* --- Optimierte Sidebar & Navigation für Mobile --- */

#themes-sidebar {
    width: 90vw !important; /* Volle Breite auf Mobile */
    max-width: 90vw !important;
    position: relative; /* Nicht sticky, damit sie natürlich schiebt */
    display: flex !important;
    flex-direction: column !important;
    height: auto !important; 
    max-height: 90vh !important; /* Absolute Obergrenze: 90% des Bildschirms */
    overflow: hidden; /* Wichtig: Verhindert, dass der äußere Container ausbricht */
    background: #fff;
    border-bottom: 3px solid #7a9e7a;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#themes-sidebar.is-collapsed {
        max-height: 25px !important; /* Exakt die Höhe des Buttons */
        border-bottom: 1px solid #7a9e7a; /* Behält die farbige Kante unten */
    }

#themes-sidebar.is-collapsed .sidebar-scroll-area,
#themes-sidebar.is-collapsed #search-container,
#themes-sidebar.is-collapsed .themes-nav-controls,
#themes-sidebar.is-collapsed #themes-title {
    display: none !important; /* Versteckt den Inhalt beim Einklappen */
}

/* Button nur mobil anzeigen */
    .sidebar-toggle-btn {
        display: flex;
    }

/* Pfeil drehen, wenn offen */
    #themes-sidebar:not(.is-collapsed) .arrow-icon-down::before {
        content: "▲";
    }

/* Hover-Effekt wie gewünscht */
    .sidebar-toggle-btn:hover {
        background: #eee;
    }

#themes-sidebar.is-active {
    flex: 0 0 auto !important; 
    height: auto !important;
    max-height: 80vh !important;
}

#themes-sidebar.is-active .sidebar-scroll-area {
    flex: 1 1 auto;
    overflow-y: auto;
}

/* Titel über der Liste (z.B. "Wähle eine Region") */
#themes-title {
    font-size: 0.8rem !important;
    margin-bottom: 10px !important;
}

/* Damit die Liste innerhalb der 80vh scrollbar bleibt */
#themes-list {
    flex: 0 1 auto !important;

    height: auto; 
    min-height: 0; 
    display: block; 
    max-height: 80vh; 
    overflow-y: auto;

    overflow-y: auto !important;     /* Macht die Liste innerhalb der Sidebar scrollbar */
    margin-top: 5px !important;
    padding-right: 5px;              /* Platz für den Scrollbalken */
    font-size: 0.8rem !important;
    -webkit-overflow-scrolling: touch;
}

/* WICHTIG: Der Container, der die Liste hält, muss wachsen dürfen */
#themes-list-container {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;       /* Erlaubt das Wachsen (Grow) */
    min-height: 0;                   /* Fix für Flex-Scrolling */
    overflow: hidden;                /* Verhindert doppelte Scrollbars */
}

/* Standard-Padding für alle Listenelemente */
    #themes-list li {
        font-size: 0.85rem !important;
        padding: 8px 10px !important; /* Normales Padding für inaktive */
        line-height: 1.3;
        border-bottom: 1px solid #eee;
    }

    /* WICHTIG: Das Padding für aktive Elemente muss das allgemeine Padding überschreiben */
    #themes-list li.active-plant {
        padding-left: 30px !important; /* Schafft Platz für den Punkt */
        background-color: rgba(47, 111, 78, 0.05); /* Optional: Leichter Hintergrund zur Markierung */
    }

    #themes-list li.active-plant::before {
        left: 8px; /* Punkt etwas weiter vom Rand weg */
        font-size: 0.9rem;
    }

#themes-list li small {
    font-size: 0.7rem !important; /* Lateinischer Name noch dezenter */
    color: #666;
}

/* Das Suchfeld kompakter machen */
#search-container input {
    font-size: 14px !important; /* 14px reicht oft aus, 16px nur wenn iOS zoomt */
    padding: 6px 10px !important;
    margin-bottom: 8px !important;
}

/* Navigations-Pfeile (Zurück/Up/Vor) massiv verkleinern */
.themes-nav-controls {
padding-top: 0px;
    flex-shrink: 0 !important;      /* Buttons bleiben immer oben fixiert */
}



.themes-nav-btn {
    flex: 1;
    display: flex;           /* Erlaubt Zentrierung des Inhalts */
    align-items: center;     /* Zentriert Pfeil vertikal */
    justify-content: center; /* Zentriert Pfeil horizontal */
    height: 35px !important; /* Absolute Höhe für alle drei Buttons erzwingen */
    padding: 0 !important;   /* Padding entfernen, da Höhe fix ist */
    font-size: 0.9rem !important;
    background: #f8f8f8 !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    overflow: hidden;        /* Verhindert Ausbrechen des rotierten Inhalts */
}

/* Content-Bereich ebenfalls etwas straffen */
#themes-content h1 {
    font-size: 1.2rem !important; /* Kleinerer Titel im Inhalt */
    margin-top: 10px;
}

#themes-content p {
    font-size: 0.9rem !important; /* Fließtext etwas kleiner */
    line-height: 1.5;
}






    .mission-text {
        padding: 40px 20px;
        order: 2; /* Text unter das Bild auf Mobile */
    }
    .mission-image {
        height: 250px;
        order: 1;
    }
    .mission-text h2 {
        font-size: 1.7rem;
    }

    .mission-content-layout {
        flex-direction: column; /* Bild oben, Text unten */
        gap: 30px;
    }
    
    .mission-wrapper {
        padding: 40px 20px !important;
    }

    .mission-text-box h2 {
        font-size: 1.8rem;
    }

    .scroll-indicator {
        bottom: 2dvh; /* Etwas näher am unteren Rand */
        gap: 4px;     /* Halbiert den Abstand zwischen Text und Icon */
    }

    .arrow-icon {
        width: 24px;  /* Pfeil ebenfalls minimal kleiner */
        height: 14px;
    }


}



