/* =========================================
   1. GRUNDEINSTELLUNGEN & VARIABLEN
========================================= */
:root {
    --primary: #1e3a8a;
    --accent: #0ea5e9;
    --dark: #0f172a;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --bg-outside: #cbd5e1;
    --border-light: #e2e8f0;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* Verhindert seitliches Scrollen / Wackeln */
html, body { 
    scroll-behavior: smooth; 
    overflow-x: clip; 
    width: 100%;
}

body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background: var(--bg-outside); 
    color: var(--dark); 
    line-height: 1.6; 
}

/* =========================================
   2. LAYOUT-GERÜST
========================================= */
.site-wrapper {
    max-width: 1600px; 
    margin: 0 auto;    
    background: var(--bg-light); 
    min-height: 100vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.15); 
    display: flex;
    flex-direction: column;
    overflow-x: clip; 
}

/* Container gibt auf JEDEM Gerät sauberen Randabstand (25px) */
.container { 
    width: 100%;
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 25px !important; 
}

/* Blendet die nicht benötigte Sprache aus */
.lang-de .t-en, .lang-en .t-de { display: none !important; }

/* =========================================
   3. HEADER & NAVIGATION (inkl. Scroll-Effekt)
========================================= */
.header { 
    height: 90px; 
    display: flex; 
    align-items: center; 
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid var(--border-light); 
    transition: all 0.4s ease; /* Animation für das Scrollen */
}

/* WIRD AKTIV BEIM SCOLLEN (Gesteuert durch script.js) */
.header.scrolled {
    height: 70px; 
    background: rgba(255, 255, 255, 0.7); /* Deutlich transparenter */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-wrapper { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
}

.main-logo { 
    max-height: 55px; 
    display: block; 
    transition: max-height 0.4s ease; 
}
.header.scrolled .main-logo {
    max-height: 40px; /* Logo wird kleiner beim Scrollen */
}

.nav-right { display: flex; align-items: center; gap: 20px; }

/* Desktop Navigation */
.main-nav { display: flex; gap: 25px; }
.main-nav a { 
    text-decoration: none; color: var(--dark); font-weight: 600; 
    font-size: 0.95rem; transition: color 0.3s; padding: 5px 0;
}
.main-nav a:hover, .main-nav a.active { color: var(--accent); }

/* iOS Sprach-Pille */
.language-picker {
    background: rgba(0, 0, 0, 0.05); border-radius: 50px; padding: 3px; 
    display: flex; position: relative; width: 90px; height: 36px; 
    cursor: pointer; border: 1px solid rgba(0,0,0,0.03);
}
.pill-selector {
    position: absolute; width: 42px; height: 30px; background: var(--white); 
    border-radius: 50px; top: 2px; left: 2px; transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 1;
}
.lang-btn { 
    flex: 1; border: none; background: none; font-weight: 700; font-size: 0.75rem; 
    z-index: 2; cursor: pointer; color: #64748b; transition: color 0.3s; 
}
.lang-btn.active { color: var(--primary); }

/* Burger Menü Icon (wird auf Desktop ausgeblendet) */
.burger-menu {
    display: none; 
    flex-direction: column; justify-content: space-between;
    width: 28px; height: 20px; cursor: pointer; border: none; 
    background: transparent; z-index: 1002;
}
.burger-menu span { 
    width: 100%; height: 3px; background: var(--dark); border-radius: 5px; 
    transition: all 0.3s ease; transform-origin: left; 
}
.burger-menu.toggle span:nth-child(1) { transform: rotate(45deg); }
.burger-menu.toggle span:nth-child(2) { opacity: 0; }
.burger-menu.toggle span:nth-child(3) { transform: rotate(-45deg) translateY(-1px); }

/* =========================================
   4. HERO BEREICHE
========================================= */
.hero, .sub-hero { 
    position: relative; overflow: hidden; display: flex; align-items: center; color: white;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero { height: 80vh; }
.sub-hero { height: 40vh; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(15,23,42,0.85), rgba(15,23,42,0.3)); }
.hero-content { position: relative; z-index: 10; max-width: 800px; }
.hero-content h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; font-weight: 800; margin-bottom: 20px; }

/* =========================================
   5. INHALTS-SEKTIONEN
========================================= */
.section { padding: 80px 0; flex: 1; }
.section-title { text-align: center; margin-bottom: 60px; font-size: 2.5rem; color: var(--primary); font-weight: 800; }

.flex-split { display: flex; gap: 50px; align-items: center; flex-wrap: wrap; }
.text-side { flex: 1.2; min-width: 300px; }
.text-side h2 { font-size: 2.2rem; margin-bottom: 20px; color: var(--primary); font-weight: 800; line-height: 1.2;}
.text-side p { margin-bottom: 20px; font-size: 1.1rem; color: #475569; }

.img-side { 
    flex: 1; min-width: 300px; height: 400px; 
    border-radius: 20px; background-size: cover; background-position: center; 
    box-shadow: var(--shadow); 
}

/* =========================================
   6. KARTEN & FORMLARE
========================================= */
.card-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-bottom: 40px; 
}
.card { 
    background: white; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); 
    border: 1px solid var(--border-light); /* Einheitliche Rahmen */
    display: flex; flex-direction: column; 
    transition: transform 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.15); }
.card-img { height: 230px; background-size: cover; background-position: center; width: 100%; }
.card-body { padding: 30px; flex: 1; }
.card-body h3 { font-size: 1.4rem; color: var(--primary); margin-bottom: 15px; }

.info-box { background: white; padding: 30px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border-light); margin-top: 30px; }
.info-box ul { list-style: none; padding-top: 15px; }
.info-box ul li { padding: 10px 0; border-bottom: 1px solid var(--border-light); position: relative; padding-left: 30px; }
.info-box ul li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.info-box ul li:last-child { border-bottom: none; }

.contact-form { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 16px; border: 1px solid var(--border-light); border-radius: 10px; font-family: inherit; font-size: 1rem; background: #fcfdfe; transition: border-color 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }

.btn { display: inline-block; padding: 16px 35px; border-radius: 50px; font-weight: 700; text-decoration: none; cursor: pointer; border: none; font-size: 1rem; transition: all 0.3s ease; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--primary); transform: translateY(-2px); }

/* =========================================
   7. FOOTER
========================================= */
.footer { background: var(--dark); color: #94a3b8; padding: 60px 0 30px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { max-height: 50px; filter: brightness(0) invert(1); margin-bottom: 20px; display: block; }
.footer h4 { color: white; margin-bottom: 15px; font-size: 1.2rem; font-weight: 700; }
.footer a { color: inherit; text-decoration: none; display: block; margin-bottom: 10px; transition: color 0.3s;}
.footer a:hover { color: white; }
.credit { text-align: center; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.8rem; }
.credit a { color: var(--accent); font-weight: bold; }

/* =========================================
   8. ÖFFNUNGSZEITEN (zeiten.js Script)
========================================= */
.zeiten-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.zeit-box { background: white; padding: 35px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border-light); }
.zeit-box h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 25px; }
.zeit-row { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); }
.zeit-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.zeit-row strong { display: block; color: var(--dark); font-size: 1.1rem; margin-bottom: 5px; }
.zeit-row span { display: block; color: var(--dark); font-weight: 600; font-size: 1rem; }
.zeit-row .hinweis { color: var(--accent); font-weight: 600; font-size: 0.85rem; margin-top: 5px; }

/* =========================================
   9. MOBILE OPTIMIERUNG (Media Queries)
========================================= */

/* Ansicht für kleine Laptops / Tablets */
@media (max-width: 900px) {
    /* Burger Menü einschalten */
    .burger-menu { display: flex; }
    
    /* Navigation zur Sidebar umbauen */
    .main-nav { 
        position: fixed; 
        top: 0; 
        right: -100%; /* Außerhalb des Sichtfelds verstecken */
        width: 80%; 
        max-width: 350px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98); 
        backdrop-filter: blur(10px);
        flex-direction: column; 
        padding: 100px 30px 40px; 
        box-shadow: -5px 0 30px rgba(0,0,0,0.15);
        z-index: 1001;
        transition: right 0.4s ease-in-out;
    }
    
    /* Wird durch JavaScript hinzugefügt: Schiebt Menü ins Bild */
    .main-nav.nav-active { right: 0; }
    
    .main-nav a { font-size: 1.2rem; margin-bottom: 15px; border-bottom: 1px solid var(--border-light); padding-bottom: 15px; }
}

/* Ansicht für Smartphones */
@media (max-width: 768px) {
    /* Boxed Layout für Hero-Bilder auf Handys */
    .hero, .sub-hero { 
        margin: 20px auto; 
        width: calc(100% - 50px); /* 25px Abstand pro Seite berechnet sich hier */
        border-radius: 20px; 
        height: 60vh; 
        min-height: 420px; 
    }
    
    .hero-content { padding: 0 15px; }
    .hero-content h1 { font-size: 2.2rem; }
    
    /* Etwas kleinere Abstände auf dem Handy */
    .section { padding: 50px 0; }
    .section-title { font-size: 2rem; margin-bottom: 40px; }
    
    /* Layout für Unterseiten sauber stapeln */
    .flex-split { flex-direction: column; gap: 40px; }
    .text-side { width: 100%; }
    .text-side h2 { font-size: 1.8rem; }
    .img-side { width: 100%; height: 280px; }
}
