@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;500;600;700;800&display=swap');
:root { font-family: 'Nunito Sans', sans-serif; }

/* --- DESIGN-SYSTEM --- */
:root {
    /* Primär: Deep Estate Blue */
    --accent-main: #2B4C7E;       
    --accent-main-darker: #1e365c; 
    --accent-focus-ring: rgba(43, 76, 126, 0.2);
    
    /* Akzent: Soft Taupe */
    --accent-secondary: #DBC2C0;  
    --accent-secondary-darker: #c4a8a6; 
    
    /* Interaktiv: Steel Blue */
    --accent-interactive: #5A7BA0; 

    /* Hintergründe */
    --bg-light: #F9F5F5;          
    --bg-medium: #F5F0F0;         

    --color-success: #10B981; 
    --color-warning: #F59E0B; 
    --color-danger: #EF4444; 
}

/* --- HINTERGRÜNDE & HERO SECTION --- */

body {
    background-image: linear-gradient(to bottom right, var(--bg-light), var(--bg-medium));
    color: #334155;
}

/* Die neue Hero-Klasse mit deinem Bild */
.hero-bg {
    /* Pfad: Bild liegt im gleichen Ordner wie diese CSS-Datei */
    background: linear-gradient(135deg, rgba(245, 247, 250, 0.85) 0%, rgba(195, 207, 226, 0.85) 100%), 
                url('background_start.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* 'fixed' für Parallax-Effekt möglich _ scroll damit das Bild mitläuft*/
    position: relative;
    overflow: hidden;
}

/* Fokus-Stil für Eingabefelder */
input:focus, select:focus {
    outline: none;
    border-color: var(--accent-main); 
    box-shadow: 0 0 0 3px var(--accent-focus-ring); 
}

/* Einheitlicher Stil für alle Input/Select-Elemente */
.input-field {
    width: 100%; 
    padding: 0.75rem; 
    border: 1px solid #d1d5db; 
    border-radius: 0.5rem; 
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field.border-red-500 { border-color: var(--color-danger); }

.input-field[readonly] {
    background-color: #f3f4f6; 
    color: #4b5563; 
    cursor: default;
    font-weight: 600; 
}

label {
    display: flex; 
    align-items: center; 
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #374151;
    position: relative; 
}

/* Tooltips */
.tooltip-icon {
    margin-left: 0.5rem;
    font-size: 0.9rem; 
    font-style: italic; 
    font-weight: 600; 
    color: #9ca3af; 
    cursor: pointer; 
    transition: color 0.15s, background-color 0.15s;
    border: 1px solid #9ca3af;
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    flex-shrink: 0; 
}
.tooltip-icon:hover, .tooltip-icon.active {
    color: var(--accent-main); 
    border-color: var(--accent-main); 
    background-color: var(--bg-light); 
}

.tooltip-box {
    position: absolute;
    z-index: 10;
    bottom: 100%; 
    left: 0;
    right: 0;
    background-color: var(--accent-main); 
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}
.tooltip-box.active { display: block; }

/* SLIDER STYLES */
.slider-field {
    width: 100%;
    height: 1rem;
    margin-top: 0.5rem;
    -webkit-appearance: none;
    appearance: none;
    background-color: #e5e7eb; 
    border-radius: 9999px;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.slider-field:hover { opacity: 1; }

/* Thumb (Knopf) in CI Farbe */
.slider-field::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--accent-interactive);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.slider-field::-moz-range-thumb {
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--accent-interactive);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Header & Überschriften Überschreibungen */
header h1, .bg-white h2, .bg-white h3, #cookie-banner h3 {
    color: var(--accent-main);
}

/* Buttons */
#calculate-button, #cookie-accept-btn {
    background-color: var(--accent-main);
}
#calculate-button:hover, #cookie-accept-btn:hover {
    background-color: var(--accent-main-darker);
}
#example-button, #cookie-decline-btn {
    background-color: var(--accent-secondary);
    color: #334155; 
    font-weight: 600;
}
#example-button:hover, #cookie-decline-btn:hover {
    background-color: var(--accent-secondary-darker);
}

/* Links */
footer a, #cookie-banner a {
    color: var(--accent-main);
    text-decoration: none; 
}
footer a:hover, #cookie-banner a:hover {
    color: var(--accent-main-darker);
    text-decoration: underline;
}

/* HEADER SCROLL & MENU */
#main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    transition: top 0.3s ease-in-out;
}
#main-header.header-hidden { top: -200px; }

.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1000; 
}
.menu-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--accent-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%; 
    right: 0;
    background-color: white; 
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    padding: 0.5rem 0;
    display: none; 
    z-index: 999;
}
.dropdown-menu.active { display: block; }
.dropdown-menu a {
    display: block;
    padding: 0.4rem 1.5rem; 
    color: var(--accent-main); 
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}
.dropdown-menu a:hover {
    background-color: var(--bg-light); 
}


/* --- SMART STICKY BUTTON LOGIK --- */

/* 1. Der Wrapper im Normalzustand (Endposition im Formular) */
#smart-button-wrapper {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    padding: 0;
    background: transparent;
    z-index: 50;
}

/* 2. Der Wrapper im Sticky-Zustand (Wenn er unten klebt) */
#smart-button-wrapper.is-sticky {
    position: fixed;         /* Das macht ihn sticky */
    bottom: 0;
    left: 0;
    right: 0;
    
    /* Design für den schwebenden Balken */
    background: rgba(255, 255, 255, 0.9); /* Leicht transparentes Weiß */
    backdrop-filter: blur(8px);           /* Milchglas-Effekt */
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
    
    /* Innenabstand und Korrekturen */
    padding: 1rem 0;
    margin-top: 0 !important; /* Überschreibt Tailwind mt-8 */
    z-index: 999;             /* Muss über allem anderen liegen */
    
    /* Animation beim Einfliegen (optional) */
    animation: slideUp 0.3s ease-out forwards;
}

/* Animation Definition */
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* 3. Platzhalter im Footer (damit nichts verdeckt wird) */
body.has-sticky-button footer {
    padding-bottom: 100px !important;
}