/* =========================================
   1. GRUNDLAGEN & RESET
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Manrope', sans-serif;
    color: white;
    background-color: #000;
    overflow-x: hidden;
}

/* =========================================
   2. NAVIGATION & HEADER
   ========================================= */
.fixed-header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    padding: 30px 50px;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
}

.logo {
    font-weight: 700;
    font-size: 2.5rem;
    text-transform: lowercase;
    color: #fff;
    letter-spacing: 0.5px;
}

/* =========================================
   HEADER FARBWECHSEL LOGIK
   ========================================= */

/* 1. Transition für weichen Wechsel hinzufügen */
.logo, .logo a {
    transition: color 0.3s ease-in-out;
}

/* 2. Wenn der Header die Klasse "nav-dark" hat, wird das Logo dunkel */
.fixed-header.nav-dark .logo {
    color: #1a1a1a !important;
}

/* Falls du Links im Logo direkt ansprichst, sicherheitshalber auch hier: */
.fixed-header.nav-dark .logo a {
    color: #1a1a1a !important;
}



/* =========================================
   3. HAUPT-SEKTIONEN (100% LAYOUT)
   ========================================= */
.fullscreen-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
}

#section-natur { background-image: url('img/CLD5400.webp'); }
#section-glacier { background-image: url('img/CLD0438.webp'); }

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

/* Light Mode Wrapper für Sections */
.light-section {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #1a1a1a;
}

/* Typografie */
h1 {
    font-size: 3.8rem;
    line-height: 1.1;
    font-weight: 600;
    margin-bottom: 25px;
    color: #fff;
}

h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 25px;
}

.hero-text, p {
    font-size: 1.4rem;
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 40px;
    color: #e0e0e0;
    font-weight: 400;
}

/* Button Style */
.pill-button {
    display: inline-block;
    background-color: white;
    color: black;
    border: none;
    padding: 18px 45px;
    border-radius: 50px;
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
    width: fit-content;
}
.pill-button:hover { transform: scale(1.05); }

/* =========================================
   4. INHALT WRAPPER (STANDARD)
   ========================================= */
.content-wrapper {
    position: relative;
    z-index: 2;
    /* BREITE HIER EBENFALLS AUF 94% ERHÖHT */
    width: 94%; 
    max-width: 1800px; 
    margin: 0 auto;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* =========================================
   5. KARTEN DESIGN (LIGHT & GREEN)
   ========================================= */

/* Gemeinsame Eigenschaften für beide Karten */
.light-card, .green-card {
    /* BREITE: 94% für minimalen Rand */
    width: 94%;
    max-width: 1800px;
    margin: 0 auto;
    
    min-height: 80vh;
    border-radius: 40px;
    padding: 60px 80px; /* Grosszügiger Innenabstand */
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
    
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* --- A. LIGHT CARD (Rechner) --- */
.light-card {
    background-color: #F0F0F0; /* Das gewünschte Hellgrau */
    color: #1a1a1a;
}
.light-card h2 { color: #1a1a1a; }
.light-card p { color: #555; }

/* Textbereich Rechner */
.calc-text {
    flex: 1;
    max-width: 600px;
    text-align: left;
}

/* Rechner Tool Box (Weiss auf Grau) */
.calc-tool {
    flex: 0 0 auto;
    width: 550px;
    background: #ffffff;
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
    text-align: left;
}
.calc-tool label {
    display: block; color: #1a1a1a; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 25px; font-weight: 700;
}
#revenueDisplay {
    display: block; margin-top: 20px; font-size: 2.5rem; font-weight: 800; text-align: right; color: #1a1a1a;
}
.calc-results { margin-top: 40px; border-top: 1px solid #eee; padding-top: 30px; }
.result-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; font-size: 1.2rem; color: #333; }
.big-result { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.red-text { color: #ff4757; font-weight: 700; }
#lossYear { font-size: 1.3rem; }
#lossFiveYears { font-size: 2.2rem; font-weight: 800; }

/* Range Slider Styling */
.range-slider { margin-bottom: 40px; }
input[type=range] { width: 100%; -webkit-appearance: none; background: transparent; cursor: pointer; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 6px; background: #e0e0e0; border-radius: 5px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 35px; width: 35px; border-radius: 50%; background: #3b82f6; margin-top: -14px; box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); transition: transform 0.1s; }


/* --- B. GREEN CARD (Benefits) --- */
.green-card {
    background-color: #112d20; /* Dunkles Grün */
    color: white;
}
.green-card h2 { color: white !important; font-size: 3.2rem; margin-bottom: 30px; }
.highlight-green { color: #4ade80; }

.benefits-text {
    flex: 1;
    max-width: 600px;
    text-align: left;
}
.benefits-list {
    flex: 0 0 auto;
    width: 450px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.benefit-item {
    display: flex; align-items: center; background-color: #3e8e5e; color: white; border: none; padding: 15px 30px; border-radius: 50px; width: 100%; transition: transform 0.2s; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.benefit-item:hover { transform: translateX(10px); background-color: #4CAF50; }
.icon-box { 
    width: 40px; height: 40px; background: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 20px; font-size: 1.2rem; flex-shrink: 0; color: #333; 
}
.benefit-item span { font-weight: 500; color: white !important; font-size: 1.1rem; }


/* =========================================
   6. FOOTER & IMPRESSUM
   ========================================= */
.bottom-imprint {
    position: absolute; bottom: 30px; width: 100%; text-align: center; color: rgba(255,255,255,0.5); font-size: 0.8rem; z-index: 10;
}

.bottom-imprint a {
    text-decoration: none; /* Entfernt die Unterstreichung */
    color: inherit;        /* Behält die Textfarbe des Divs bei */
    cursor: pointer;
}

.bottom-imprint a:hover {
    text-decoration: underline; /* Optional: Unterstreichung beim Drüberfahren */
}

/* =========================================
   7. RESPONSIVE (MOBIL ANPASSUNGEN)
   ========================================= */
@media (max-width: 1200px) {

    /* --- 1. HEADER & LOGO (Klein & im Eck) --- */
    .fixed-header {
        /* Abstand zum Rand verringert -> Logo rutscht ins Eck */
        padding: 20px 25px; 
    }

    .logo {
        /* Schriftgrösse verkleinert (Desktop ist 2.5rem) */
        font-size: 1.8rem; 
    }

    /* --- 2. SEKTIONEN (Layout Fix) --- */
    .fullscreen-section {
        /* WICHTIG: Damit Boxen nicht überlappen */
        height: auto;
        min-height: 100vh;
        padding: 80px 0; /* Vertikaler Abstand zwischen den Sections */
        display: block;
    }
    
    .content-wrapper {
        padding-bottom: 30px;
    }

    /* --- 3. KARTEN (Kompakter gemacht) --- */
    .light-card, 
    .green-card { 
        flex-direction: column; 
        align-items: center; 
        justify-content: center;
        text-align: center;
        
        height: auto;
        min-height: auto;
        
        width: 92%; /* Fast volle Breite, sieht am Handy besser aus */
        max-width: 500px;
        margin: 0 auto;
        
        /* WICHTIG: Innenabstand halbiert für kompakten Look */
        padding: 40px 20px; 
        gap: 30px;
    }

    /* Texte zentrieren */
    .calc-text, .benefits-text, .calc-tool, .benefits-list { 
        width: 100%; 
        max-width: 100%; 
        text-align: center; 
    }
    
    /* --- 4. RECHNER TOOL (Kleiner) --- */
    .calc-tool { 
        margin-top: 10px; 
        /* Padding im weissen Kasten verringert */
        padding: 25px 20px;
    }
    
    .range-slider { margin-bottom: 25px; }

    /* Die grossen Zahlen verkleinern */
    #revenueDisplay { font-size: 2rem; margin-top: 10px; }
    #lossFiveYears { font-size: 1.8rem; }
    .result-item { font-size: 1rem; margin-bottom: 10px; }
    .calc-tool label { margin-bottom: 15px; font-size: 0.75rem; }

    /* --- 5. BENEFITS LISTE (Kompakter) --- */
    .benefits-list { 
        width: 100%; 
        max-width: 100%; 
        gap: 15px; /* Abstand zwischen Buttons kleiner */
    }

    .benefit-item {
        padding: 12px 20px; /* Buttons flacher */
        font-size: 1rem;
    }
    
    .icon-box {
        width: 32px; height: 32px; font-size: 1rem; margin-right: 15px;
    }

    /* --- 6. TYPOGRAFIE ALLGEMEIN --- */
    h1 { 
        font-size: 2.2rem; 
        margin-top: 0; 
        padding: 0 15px;
    }
    
    h2 { font-size: 1.8rem; margin-bottom: 15px; }
    
    .hero-text, p {
        font-size: 1.1rem;
        padding: 0 10px;
        margin-bottom: 25px;
    }
}

/* =========================================
   8. MODAL / IFRAME OVERLAY
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.modal-content {
    /* BREITER GEMACHT */
    width: 95%;
    max-width: 1200px; /* Vorher 1000px */
    
    height: 85vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    position: relative; /* Wichtig für Loader-Positionierung */
    transform: scale(0.95);
    animation: scaleIn 0.3s forwards;
}

/* Der Iframe selbst */
#calendlyFrame {
    transition: opacity 0.5s ease-in-out;
    opacity: 0; /* Startet unsichtbar */
}

/* LADE-ANIMATION CONTAINER */
.modal-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.5s ease-out;
}

/* Das Logo im Loader */
.loader-logo {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #000;
    margin-bottom: 20px;
    animation: pulseLogo 2s infinite ease-in-out;
}

/* Kleiner Ladekreis unter dem Logo */
.loader-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animationen */
@keyframes fadeIn { to { opacity: 1; } }
@keyframes scaleIn { to { transform: scale(1); } }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseLogo {
    0% { opacity: 0.6; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.6; transform: scale(0.98); }
}

/* Responsive Anpassung */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 80vh;
    }
}