/* =========================================
   BASIS-SETUP & FARBEN
   ========================================= */
:root {
    --color-marine: #16336A;
    --color-orange: #F49C0B;
    --color-lightgrey: #EEECE9;
    --color-text-dark: #333333;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lora', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-lightgrey);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .nav-links a, .btn {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
}

/* =========================================
   BILDSCHIRMGRÖSSENBEGRENZUNG (Container)
   ========================================= */
.site-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

/* =========================================
   HEADER (Navigation - Sticky gemacht)
   ========================================= */
.main-header {
    background-color: #ffffff;
    padding: 1rem 4rem; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-lightgrey);
    position: sticky;
    top: 0;
    z-index: 1000; /* Sorgt dafür, dass der Header immer im Vordergrund bleibt */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03); /* Dezent schattierter Rand beim Scrollen */
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 85px; 
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-marine);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-orange);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-orange);
    color: #ffffff;
    border: 2px solid var(--color-orange);
}

.btn-primary:hover {
    background-color: var(--color-marine);
    border-color: var(--color-marine);
    color: #ffffff;
}

.btn-group {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    background-color: var(--color-marine);
    color: #ffffff;
    border: 2px solid var(--color-marine);
}

.btn-secondary:hover {
    background-color: var(--color-orange);
    border-color: var(--color-orange);
    color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-marine);
    border: 2px solid var(--color-marine);
}

.btn-outline:hover {
    background-color: var(--color-orange);
    border-color: var(--color-orange);
    color: #ffffff;
}

/* =========================================
   TOOLTIPS (Sprechblasen bei Hover)
   ========================================= */
.tooltip-wrapper {
    position: relative; 
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    left: calc(100% + 15px); 
    top: 50%;
    transform: translateY(-50%); 
    background-color: #ffffff;
    color: var(--color-text-dark);
    border: 2px solid var(--color-orange);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap; 
    z-index: 100; 
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    font-family: var(--font-body);
}

.tooltip-text::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border-width: 7px;
    border-style: solid;
    border-color: transparent var(--color-orange) transparent transparent;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    margin-right: -2px; 
    border-width: 6px;
    border-style: solid;
    border-color: transparent #ffffff transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* =========================================
   HERO BEREICH (Startseite oben)
   ========================================= */
.hero {
    display: flex;
    min-height: 600px; 
}

.hero-content {
    flex: 1;
    padding: 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: 3.2rem;
    color: var(--color-marine);
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--color-text-dark);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 90%;
}

.hero-image {
    flex: 1;
    background-image: url('http://www.simbolon.net/wa/img/hero/sim_h_s_1.webp');
    background-size: cover;
    background-position: center;
}

/* =========================================
   TRUST-BAR (Vertrauensmerkmale)
   ========================================= */
.trust-bar {
    background-color: var(--color-lightgrey);
    padding: 4rem 5rem;
    border-bottom: 1px solid #e0dedc;
}

.trust-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.trust-item {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    cursor: default;
}

.trust-icon-wrapper {
    width: 70px;
    height: 70px;
    margin-bottom: 1.5rem;
}

.trust-icon-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.icon-orange {
    display: none !important;
}

.trust-item:hover .icon-blue {
    display: none !important;
}

.trust-item:hover .icon-orange {
    display: block !important;
}

.trust-item h3 {
    font-size: 1.2rem;
    color: var(--color-marine);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.trust-item p {
    font-size: 0.95rem;
    color: var(--color-text-dark);
    line-height: 1.5;
    margin: 0;
}

/* =========================================
   FEATURE SECTION (Funktionsweise)
   ========================================= */
.feature-section {
    background-color: #ffffff;
    padding: 6rem 5rem;
    border-bottom: 1px solid var(--color-lightgrey);
}

.feature-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.feature-image-wrapper {
    flex: 1.2;
}

.feature-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.feature-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-text-content h2 {
    font-size: 2.5rem;
    color: var(--color-marine);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.feature-text-content p {
    font-size: 1.1rem;
    color: var(--color-text-dark);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* =========================================
   5. ZIELGRUPPEN-WEICHE (Cards B2C / B2B)
   ========================================= */
.gateway-section {
    background-color: var(--color-lightgrey);
    padding: 6rem 5rem;
}

.gateway-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
}

.gateway-card {
    flex: 1;
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gateway-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.gateway-card-image {
    width: 100%;
    background-color: #f7f6f5;
    overflow: hidden;
}

.gateway-card-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.gateway-card:hover .gateway-card-image img {
    transform: scale(1.03);
}

.gateway-card-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.gateway-card-content h3 {
    font-size: 1.8rem;
    color: var(--color-marine);
    margin-bottom: 1rem;
    font-weight: 700;
}

.gateway-card-content p {
    font-size: 1.05rem;
    color: var(--color-text-dark);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.gateway-link {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-marine);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.gateway-link:hover {
    color: var(--color-orange);
}

/* =========================================
   6. DER SCHUTZBRIEF
   ========================================= */
.schutzbrief-section {
    background-color: #ffffff;
    padding: 6rem 5rem;
    border-bottom: 1px solid var(--color-lightgrey);
}

.schutzbrief-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 5rem;
}

.schutzbrief-badge-wrapper {
    flex: 0 0 220px;
    text-align: center;
}

.schutzbrief-badge {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.schutzbrief-badge:hover {
    transform: scale(1.03);
}

.schutzbrief-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.schutzbrief-section h2 {
    font-size: 2.3rem;
    color: var(--color-marine);
    margin-bottom: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
}

.schutzbrief-section p {
    font-size: 1.1rem;
    color: var(--color-text-dark);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* =========================================
   7. FOOTER (Abschluss)
   ========================================= */
.site-footer {
    background-color: var(--color-marine);
    color: #ffffff;
    padding: 4rem 5rem 3rem 5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    height: 65px;
    width: auto;
    margin-bottom: 1rem;
    display: block;
}

.footer-col p {
    font-family: var(--font-body);
    color: var(--color-lightgrey);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col h4 {
    font-family: var(--font-heading);
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    font-family: var(--font-body);
    color: var(--color-lightgrey);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-orange);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-lightgrey);
    flex-wrap: wrap;
    gap: 1rem;
}
/* ==========================================================================
   MOBILE OPTIMIERUNG (Final: Anti-Void & Solid Sticky Header)
   ========================================================================== */
@media (max-width: 900px) {
    
    /* 1. Global: Zwingt alle Boxen nach innen und bricht zu lange Links um */
    *, *::before, *::after {
        box-sizing: border-box !important;
        overflow-wrap: break-word !important; 
    }

    /* 2. Der Gamechanger: 'clip' schneidet den rechten Raum ab, erlaubt aber Sticky! */
    html, body {
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: clip !important; 
    }

    .site-wrapper {
        width: 100% !important;
        overflow-x: clip !important;
    }

    /* 3. Globale Abstände */
    section {
        width: 100% !important;
        padding: 3rem 1.5rem !important;
    }

    /* 4. Stapeln aller Spalten-Elemente */
    .hero, .feature-container, .trust-container, .gateway-container, 
    .schutzbrief-container, .contact-container, .value-container, 
    .industry-container, .onboarding-container, .pillars-grid, 
    .pricing-container, .story-container, .network-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important;
        width: 100% !important;
    }

    /* 5. Startseite: Bild ÜBER Text */
    .feature-image-wrapper {
        order: -1 !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
    }

    /* 6. Strenge Breitenbegrenzung für alle Boxen und Medien */
    img, iframe, video {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .trust-item, .gateway-card, .feature-card, .pillar-card, 
    .pricing-card, .network-card, .highlight-box, 
    .contact-info, .contact-form-wrapper, .story-image, .story-content {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 7. Header (Menü): Fixiert, massiv weiß und mit Schatten */
    .main-header {
        display: flex !important;
        flex-direction: column !important;
        padding: 1rem !important;
        position: -webkit-sticky !important; 
        position: sticky !important;
        top: -1px !important; /* Verhindert winzige Lücken oben */
        width: 100% !important;
        z-index: 99999 !important;
        background-color: #ffffff !important; /* Macht das Menü absolut undurchsichtig */
        box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important; /* Hebt das Menü optisch hervor */
    }
    
    .nav-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
        margin-top: 1rem !important;
    }

    /* 8. Footer anpassen */
    .footer-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important;
        text-align: center !important;
    }

    /* 9. Schriftgrößen mobil-freundlich machen */
    h1 { font-size: 2.2rem !important; }
    h2 { font-size: 1.8rem !important; 
    }

    /* 10. Footer Logo exakt zentrieren */
    .footer-col img, .footer-logo {
        display: block !important;
        margin: 0 auto 1.5rem auto !important;
        max-width: 200px !important; /* Verhindert, dass das Logo mobil zu wuchtig wirkt */
    }

    /* 11. Finaler Fix exakt für die familien.php HTML-Struktur (Gestapelt, kein Überschneiden) */

    /* Die Kachel selbst darf nicht mehr absolut gesteuert werden */
    .flip-card, .static-card {
        height: auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important; /* Icon oben, Text unten */
        align-items: center !important;
        text-align: center !important;
        padding: 2.5rem 1.5rem !important;
    }

    /* Der Textbereich, in dem die beiden Texte liegen */
    .text-col {
        position: relative !important;
        width: 100% !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important; /* Zwingt die beiden Textboxen untereinander */
        gap: 2rem !important; /* 30px Luft zwischen der blauen und orangenen Box */
    }

    /* Die beiden Textblöcke (Safety & Comfort) aus der Überlagerung befreien */
    .content-safety, .content-comfort {
        position: relative !important; /* Hebt das absolute Übereinanderliegen auf */
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        transform: none !important; /* Verhindert das seitliche Einschieben */
        opacity: 1 !important; /* Macht BEIDE dauerhaft sichtbar */
        visibility: visible !important;
        pointer-events: auto !important;
        
        /* Optische Abgrenzung der gestapelten Boxen (Karten-Look in der Kachel) */
        background-color: #fcfcfc !important;
        padding: 1.5rem !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
    }

    /* Rahmenfarben zur besseren Unterscheidung */
    .content-safety { border-left: 4px solid var(--color-marine) !important; }
    .content-comfort { border-left: 4px solid var(--color-orange) !important; }

    /* Icons sichtbar halten */
    .icon-col {
        width: 70px !important;
        height: 70px !important;
        margin-bottom: 1.5rem !important;
    }
    .icon-col img {
        position: relative !important;
        opacity: 1 !important;
    }
    
    /* Das orangene Hover-Icon verstecken wir auf dem Handy, da es sonst doppelt auftaucht */
    .flip-icon-orange {
        display: none !important;
    }

    /* Textumbruch-Garantie für alle Überschriften */
    .content-safety h3, .content-comfort h3, .static-card h3 {
        font-size: 1.25rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }

    .content-safety h4, .content-comfort h4, .static-card h4 {
        font-size: 1rem !important;
        white-space: normal !important;
    }

    /* Fix für Branchen-Kacheln auf pflegedienste.php (Block: Ein System. Viele Synergien.) */
    .industry-box {
        flex-direction: column !important; /* Stapelt Icon und Text untereinander */
        text-align: center !important;     /* Zentriert den Inhalt */
        gap: 1rem !important;              /* Reduziert den Abstand zwischen Bild und Text */
    }
    
    .industry-box img {
        height: 55px !important;           /* Begrenzt das Icon auf eine vernünftige Größe */
        width: auto !important;            /* Verhindert das Aufblähen in die Breite */
        margin-bottom: 0.5rem !important;
    }
    
    .industry-box div {
        width: 100% !important;            /* Gibt dem Text wieder den vollen Platz zurück */
    }
}