/* --- style.css - V6 (Added Team Grid Styles) --- */


/* =========================================
   MOBILE FIX: Universal Block (.uni-container)
   ========================================= */

@media only screen and (max-width: 900px) {

    /* 1. Den Container zwingen, untereinander zu stapeln */
    .uni-container {
        display: flex !important;
        flex-direction: column !important; /* WICHTIG: Stapeln statt Nebeneinander */
        flex-wrap: wrap !important;
    }

    /* 2. Die Spalten auf 100% Breite ziehen */
    .uni-col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        
        /* Abstand zwischen den gestapelten Elementen */
        margin-bottom: 40px !important; 
        
        /* Falls Padding stört, hier zurücksetzen oder anpassen */
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 3. Button im Universal Block auch mobil schön machen */
    .uni-btn-wrapper {
        text-align: center !important; /* Button zentrieren */
        margin-top: 20px !important;
    }
    
    /* 4. Schriftgröße der Haupt-Überschrift etwas kleiner */
    .uni-section h2 {
        font-size: 1.8rem !important;
        margin-bottom: 30px !important;
    }
}



/* =========================================
   MOBILE FIX: Header & Navigation
   ========================================= */

@media only screen and (max-width: 900px) {
    
    /* Header Container stapeln */
    .header-inner {
        flex-direction: column !important;
        align-items: center !important;
        padding: 15px !important;
    }

    /* Logo zentrieren und Abstand nach unten */
    .logo {
        margin-bottom: 20px !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* Navigation: Links untereinander und zentriert */
    nav ul {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }

    nav ul li {
        margin: 10px 0 !important;
        display: block !important;
    }
    
    nav ul li a {
        display: block !important;
        padding: 10px !important;
        background: rgba(0,0,0,0.05); /* Leichter Hintergrund für Klickbarkeit */
        border-radius: 5px;
    }
}




/* 2. VARIABLES */
:root {
    --bg-dark: #162035; 
    --text-dark: #111; 
    --text-light: #555; 
    --accent-color: #3b5c91; 
    --font-main: 'Inter', sans-serif;
}

/* 3. RESET & BASE */
html { margin: 0 !important; padding: 0 !important; width: 100%; overflow-x: hidden; }
body { 
    margin: 0 !important; 
    padding: 0 !important; 
    width: 100%; 
    max-width: 100%; 
    overflow-x: hidden; 
    font-family: var(--font-main); 
    color: var(--text-dark); 
    line-height: 1.6; 
}
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }

/* 4. HEADER */
.site-header { padding: 20px 40px; border-bottom: 1px solid #eee; background: #fff; width: 100%; }
.header-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { font-weight: 800; font-size: 1.5rem; color: var(--bg-dark); }
nav a { text-decoration: none; color: #666; margin-left: 20px; font-size: 0.9rem; text-transform: uppercase; font-weight: 500; }

/* 5. FOOTER (Zentriertes Layout) */
.site-footer { background-color: var(--bg-dark); color: #fff; padding: 60px 5% 40px; width: 100%; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 40px; grid-template-columns: repeat(4, 1fr); }
.footer-col-item { text-align: center; }
.footer-col-item h3 {
    color: #fff; font-size: 1.2rem; margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color); display: inline-block; padding-bottom: 5px;
}
.footer-col-item p, .footer-col-item li, .footer-col-item a {
    color: #ccc; font-size: 0.95rem; line-height: 1.6; text-decoration: none;
    display: block; margin-bottom: 5px;
}
.footer-col-item a:hover { color: #fff; }
.footer-img { max-width: 150px; margin: 0 auto 15px auto; display: block; border-radius: 4px; }
.footer-icon { font-size: 2rem; color: var(--accent-color); margin-bottom: 15px; display: block; }
.footer-btn {
    display: inline-block; margin-top: 15px; padding: 8px 15px;
    background: var(--accent-color); color: #fff !important;
    border-radius: 4px; font-weight: bold; font-size: 0.9rem; transition: 0.2s;
}
.footer-btn:hover { background: #fff; color: var(--bg-dark) !important; }
.footer-copyright { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 60px; padding-top: 20px; text-align: center; font-size: 0.8rem; color: #777; }

/* 6. STANDARD BLOCKS */

/* Hero (Static) */
.hero-section { 
    height: 600px; color: white; display: flex; align-items: center; justify-content: center; 
    background-size: cover; background-position: center; position: relative; width: 100%;
}
.hero-overlay { background: rgba(0,0,0,0.3); position: absolute; inset:0; }
.hero-content { position: relative; z-index: 2; max-width: 800px; text-align: center; padding: 0 20px; }
.hero-content h1 { font-size: 3rem; margin-bottom: 10px; }

/* Text Split */
.text-split-section { padding: 100px 5%; max-width: 1200px; margin: 0 auto; }
.split-container { display: flex; gap: 50px; }
.split-left { flex: 1; }
.split-right { flex: 2; }
.sub-label { font-weight: 700; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 20px; }
.btn-dark { background: var(--bg-dark); color: #fff; padding: 12px 25px; text-decoration: none; display: inline-block; }
.split-right h3 { font-size: 1.8rem; margin-top: 0; line-height: 1.3; }

/* Stats */
.stats-section { background-color: var(--bg-dark); color: #fff; padding: 80px 5%; width: 100%; overflow: hidden; }
.stats-header { text-align: center; margin-bottom: 60px; }
.stats-grid { display: flex; max-width: 1000px; margin: 0 auto; align-items: center; gap: 40px; }
.stats-map { flex: 1; max-width: 50%; } 
.stats-map img { max-height: 500px; object-fit: contain; }
.stats-list { flex: 1; }
.stat-item { display: flex; align-items: flex-start; margin-bottom: 30px; }
.stat-icon { width: 40px; font-size: 1.5rem; margin-right: 15px; color: var(--accent-color); }

/* Universal */
.uni-section { padding: 60px 10%; width: 100%; }
.uni-container { display: grid; gap: 40px; max-width: 1200px; margin: 0 auto; }
.layout-1-col { grid-template-columns: 1fr; }
.layout-2-cols { grid-template-columns: 1fr 1fr; }
.layout-3-cols { grid-template-columns: 1fr 1fr 1fr; }
.layout-text-img, .layout-img-text { grid-template-columns: 1fr 1fr; align-items: center; }
.uni-col img { width: 100%; height: auto; border-radius: 4px; }
.uni-btn-wrapper { margin-top: 30px; text-align: center; }

/* 7. CMS EDITOR ELEMENTS (Buttons & Textmarker) */

/* Buttons */
a.btn-cms {
    display: inline-block; padding: 10px 20px; background-color: var(--accent-color); color: #fff;
    text-decoration: none; border-radius: 4px; font-weight: bold; transition: transform 0.2s; border: none; margin: 5px 0;
}
a.btn-cms:hover { transform: translateY(-2px); opacity: 0.9; color: #fff; }

a.btn-cms-outline {
    display: inline-block; padding: 8px 23px; border: 2px solid var(--accent-color); color: var(--accent-color);
    text-decoration: none; border-radius: 4px; font-weight: bold; margin: 5px 0;
}
a.btn-cms-outline:hover { background: var(--accent-color); color: #fff; }

/* Text Highlights (Inline-Style / Textmarker) */
.box-primary, .box-secondary, .box-light, .box-info, .box-warning, .box-success {
    padding: 4px 20px !important; border-radius: 4px; margin: 5px 0; display: inline-block; line-height: 1.4; box-sizing: border-box;
}
.box-primary { background-color: var(--accent-color); color: #fff; }
.box-primary * { color: #fff !important; }
.box-secondary { background-color: var(--bg-dark); color: #fff; }
.box-secondary * { color: #fff !important; }
.box-light { background-color: #f8f9fa; color: #333; border: 1px solid #ddd; }
.box-info { background-color: #d1ecf1; color: #0c5460; border-left: 5px solid #17a2b8; }
.box-warning { background-color: #fff3cd; color: #856404; border-left: 5px solid #ffc107; }
.box-success { background-color: #d4edda; color: #155724; border-left: 5px solid #28a745; }

/* Breite Steuerung */
.width-full { display: block !important; width: 100% !important; }
.width-75 { display: block !important; width: 75% !important; margin: 0 auto; }
.width-50 { display: block !important; width: 50% !important; margin: 0 auto; }

/* Schriftgrößen */
.text-huge { font-size: 3rem; line-height: 1.2; }
.text-large { font-size: 1.5rem; line-height: 1.4; }
.text-small { font-size: 0.85rem; color: #666; }

/* --- 8. TEXT ANIMATIONEN --- */
.anim-text-fade { display: inline-block; animation: textFadeIn 1.5s ease forwards; opacity: 0; }
@keyframes textFadeIn { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
.anim-text-zoom { display: inline-block; animation: textZoomIn 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; opacity: 0; }
@keyframes textZoomIn { 0% { opacity: 0; transform: scale(0.5); } 100% { opacity: 1; transform: scale(1); } }

/* --- 9. SLIDER STYLES --- */
.custom-slider { position: relative; width: 100%; overflow: hidden; background: #000; }
.slider-item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.5s ease-in-out; z-index: 1; background-size: cover; background-position: center; }
.slider-item.active { opacity: 1; z-index: 2; }
.slide-content { position: absolute; transform: translate(-50%, -50%); width: 80%; max-width: 1000px; text-align: center; color: white; opacity: 0; transition: all 1s ease-out 0.5s; }
.anim-fade-up .slide-content { transform: translate(-50%, -30%); opacity: 0; }
.slider-item.active.anim-fade-up .slide-content { transform: translate(-50%, -50%); opacity: 1; }
.anim-zoom .slide-content { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
.slider-item.active.anim-zoom .slide-content { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.style-framed-white { border: 3px solid rgba(255,255,255,0.9); padding: 30px 50px; background: rgba(0,0,0,0.2); backdrop-filter: blur(4px); }
.style-framed-dark { background: #fff; color: #333 !important; padding: 30px 50px; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.style-framed-dark * { color: #333 !important; }

/* --- 10. NEU: TEAM GRID SECTION --- */
.team-section {
    padding: 80px 5%;
}
.team-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.team-headline {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 300;
}
.team-grid {
    display: grid;
    /* Automatisch füllen, mindestens 250px breit */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    justify-content: center;
}
.team-card {
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.team-card:hover {
    transform: translateY(-5px);
}
.team-img-wrapper {
    width: 100%;
    /* Hochkant Format 2:3 */
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 20px;
}
.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.team-card:hover .team-img-wrapper img {
    transform: scale(1.05);
}
.team-info h3 {
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    color: var(--text-dark);
}
.team-contact {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.team-contact i {
    margin-right: 8px;
    color: var(--accent-color);
}
.team-contact:hover {
    color: var(--accent-color);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .footer-inner { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 768px) { 
    .split-container, .stats-grid, .uni-container { flex-direction: column; } 
    .stats-map { max-width: 100%; padding-bottom: 40px; }
    .header-inner { flex-direction: column; gap: 15px; }
    .footer-inner { grid-template-columns: 1fr !important; }
}


/* --- NEU: Team Beschreibung --- */
.team-description {
    text-align: center;
    max-width: 800px;
    margin: -30px auto 50px auto; /* Zieht es näher an die Headline */
    font-size: 1.1rem;
    line-height: 1.6;
}


/* --- OFFLINE BLOCK STYLING (Nur für Admin sichtbar) --- */
.block-offline {
    position: relative;
    opacity: 0.7; /* Leicht durchsichtig */
    border: 2px dashed #999 !important; /* Gestrichelter Rahmen */
    
    /* Das Streifen-Muster */
    background-image: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.03),
        rgba(0, 0, 0, 0.03) 10px,
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.1) 20px
    ) !important;
}

/* Optional: Ein kleines Label "OFFLINE" in der Mitte */
.block-offline::after {
    content: "VERBORGEN";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #333;
    color: #fff;
    padding: 5px 15px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none; /* Klicks gehen durch */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}


/* === CMS Boxen & Transparenz Logik (Neu) === */

/* Standard Box-Verhalten */
.box-custom { 
    padding: 30px; 
    border-radius: 8px; 
    margin-bottom: 20px;
    /* Hier ist der Trick: Hintergrund basiert auf Variablen */
    background-color: rgba(var(--bg-rgb, 255,255,255), var(--bg-alpha, 1));
    border: 1px solid rgba(0,0,0,0.05);
}

/* Farben definieren nur den RGB-Wert (ohne Alpha) */
.box-primary { --bg-rgb: 59, 92, 145; color: #fff; border:none; } /* Dein Blau */
.box-dark    { --bg-rgb: 22, 32, 53;  color: #fff; border:none; }
.box-white   { --bg-rgb: 255, 255, 255; color: #333; }
.box-light   { --bg-rgb: 248, 249, 250; color: #333; }

/* Transparenz steuert nur den Alpha-Wert (mit !important für Vorrang) */
.opacity-100 { --bg-alpha: 1 !important; }
.opacity-90  { --bg-alpha: 0.9 !important; }
.opacity-80  { --bg-alpha: 0.8 !important; }
.opacity-50  { --bg-alpha: 0.5 !important; }
.opacity-20  { --bg-alpha: 0.2 !important; }

/* Animationen (Frontend) */
.anim-text-fade { animation: fadeIn 1.5s ease forwards; }
.anim-text-zoom { animation: zoomIn 1.5s ease forwards; }

@keyframes fadeIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes zoomIn { from { opacity:0; transform:scale(0.9); } to { opacity:1; transform:scale(1); } }


/* =========================================
   MOBILE OPTIMIERUNG (Responsive Fixes)
   ========================================= */

/* 1. Bilder bändigen: Kein Bild darf breiter als der Bildschirm sein */
img, video, iframe, canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* 2. Schriftgrößen anpassen: Keine riesigen Überschriften auf dem Handy */
@media (max-width: 768px) {
    h1 { font-size: 2rem !important; line-height: 1.2; }
    h2 { font-size: 1.75rem !important; }
    h3 { font-size: 1.5rem !important; }
    p { font-size: 1rem !important; line-height: 1.6; }
    
    /* Container Padding reduzieren (mehr Platz für Inhalt) */
    .site-wrapper {
        width: 92% !important; /* Etwas mehr Rand auf Handys */
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* 3. DAS WICHTIGSTE: Flexbox-Spalten stapeln */
/* Sobald der Screen kleiner als 900px ist, wird aus "Row" eine "Column" */
@media (max-width: 900px) {
    
    /* Hier musst du schauen, wie deine Flex-Container heißen. 
       Ich habe mal typische Namen genommen: */
    .flex-container, 
    .row, 
    .grid-row,
    .universal-block-wrapper, /* Falls dein Block so heißt */
    .split-content { 
        flex-direction: column !important;
        display: flex !important;
    }

    /* Alle Spalten auf 100% Breite ziehen */
    .col, .column, .col-50, .col-33, .col-25, 
    div[class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-bottom: 30px; /* Abstand zwischen den gestapelten Boxen */
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Reihenfolge ändern: Bild zuerst, dann Text? */
    /* Optional: .reverse-mobile { flex-direction: column-reverse !important; } */
}

/* =============================================
   MOBILE FIX: 2-Spalter untereinander stapeln
   ============================================= */

@media only screen and (max-width: 900px) {

    /* 1. Den Container zwingen, vertikal zu stapeln */
    .flex-container, 
    .row, 
    .universal-block,      /* Falls dein Block so heißt */
    .grid-row,
    div[style*="display: flex"] { /* Fängt auch Inline-Styles ab! */
        flex-direction: column !important;
        flex-wrap: wrap !important;
        display: flex !important; /* Sicherstellen, dass es Flex bleibt */
    }

    /* 2. Die Spalten auf volle Breite ziehen */
    .col, 
    .column, 
    .col-50, 
    .col-33, 
    .col-25,
    div[style*="width: 50%"], /* Fängt Inline-Styles ab wie width: 50% */
    div[style*="width:50%"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        
        /* Abstand zwischen den gestapelten Boxen hinzufügen */
        margin-bottom: 30px !important; 
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 3. Padding des Haupt-Containers anpassen */
    .site-wrapper, .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Optional: Bilder responsive machen */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}


/* =========================================
   MOBILE NAVIGATION (Hamburger Menü)
   ========================================= */

/* 1. Button Design (3 Striche) */
.mobile-nav-toggle {
    display: none; /* Auf Desktop unsichtbar */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2000;
}

.mobile-nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333; /* Farbe der Striche */
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* 2. Logik für Mobile (unter 900px) */
@media only screen and (max-width: 900px) {
    
    /* Button sichtbar machen */
    .mobile-nav-toggle {
        display: block;
        margin-left: auto; /* Schiebt Button nach rechts, falls Logo links ist */
    }

    /* Das Menü selbst (Standard: VERSTECKT) */
    nav#frontend-nav ul {
        display: none; /* WICHTIG: Weg damit! */
        flex-direction: column;
        width: 100%;
        background-color: #ffffff; /* Weißer Hintergrund */
        position: absolute;
        top: 100%; /* Direkt unter dem Header */
        left: 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); /* Schatten */
        padding: 0;
        margin: 0;
        border-top: 1px solid #eee;
    }

    /* Das Menü (Zustand: OFFEN - wird per JS hinzugefügt) */
    nav#frontend-nav ul.menu-open {
        display: flex !important; /* Wieder da! */
    }

    /* Die Links schön groß machen für Finger */
    nav#frontend-nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f4f4f4;
        margin: 0 !important;
    }

    nav#frontend-nav ul li a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
        color: #333;
        text-decoration: none;
    }

    nav#frontend-nav ul li a:hover {
        background-color: #f9f9f9;
        color: #007bff; /* Deine Akzentfarbe */
    }
    
    /* Header Layout fixieren damit der Button Platz hat */
    .header-inner {
        position: relative; /* Wichtig für das absolute Menü */
        flex-wrap: wrap; /* Erlaubt Umbruch */
        justify-content: space-between; /* Logo links, Button rechts */
        align-items: center;
    }
    
    /* Falls das Logo zu breit ist */
    .logo { margin-bottom: 0 !important; width: auto !important; }
}


/* =========================================
   FIX: Menü über Slider (Z-Index)
   ========================================= */

@media only screen and (max-width: 900px) {
    /* Das Menü selbst muss höher liegen als jeder Slider */
    nav#frontend-nav ul {
        z-index: 100000 !important;
        position: absolute; /* Sicherstellen, dass es schwebt */
    }
    
    /* Auch der Button muss klickbar bleiben */
    .mobile-nav-toggle {
        z-index: 100001 !important;
        position: relative;
    }
}


/* =========================================
   MOBILE FIX: Hero Section (hero.php)
   ========================================= */

@media only screen and (max-width: 900px) {
    
    .hero-section {
        /* 1. Keine starre Höhe mehr, sondern Mindesthöhe */
        height: auto !important;
        min-height: 450px !important; 
        
        /* 2. Flexbox nutzen, um Inhalt immer zu zentrieren */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 40px 20px !important;
    }

    /* WICHTIG: Wir überschreiben die Inline-Styles aus der PHP-Datei! */
    .hero-content {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important; /* Text immer zentrieren auf Mobile */
    }
    
    /* Schriftgröße anpassen */
    .hero-content h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
        text-shadow: 0 2px 15px rgba(0,0,0,0.7) !important; /* Besserer Kontrast */
    }
    
    .hero-content p {
        font-size: 1.1rem !important;
        line-height: 1.5 !important;
    }
}

/* --- CMS PRO BOX STYLES (FRONTEND) --- */

/* Basis-Boxen (KEIN RAHMEN!) */
.box-primary { background-color: var(--primary, #3b5c91); color: #fff; padding: 4px 20px; display: inline-block; line-height:1.4; border:0 !important; outline:0 !important; box-shadow:none !important; }
.box-secondary { background-color: #162035; color: #fff; padding: 4px 20px; display: inline-block; line-height:1.4; border:0 !important; outline:0 !important; box-shadow:none !important; }
.box-light { background-color: #f8f9fa; color: #333; padding: 4px 20px; display: inline-block; line-height:1.4; border:0 !important; outline:0 !important; box-shadow:none !important; }

/* Marker & Größen */
.marker-flow { padding: 0px 6px; display: inline; -webkit-box-decoration-break: clone; box-decoration-break: clone; background-color: #f0f0f0; }
.box-tight { padding: 2px 10px; display: inline-block; line-height: 1.1; background-color: #f0f0f0; }
.box-wide { padding: 8px 20px; display: inline-block; line-height: 1.4; background-color: #f0f0f0; }

/* Transparenz */
.opacity-100 { opacity: 1 !important; }
.opacity-90 { opacity: 0.9 !important; }
.opacity-80 { opacity: 0.8 !important; }
.opacity-70 { opacity: 0.7 !important; }
.opacity-60 { opacity: 0.6 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-25 { opacity: 0.25 !important; }

/* Ecken-Rundungen */
.radius-0 { border-radius: 0px !important; }
.radius-sm { border-radius: 4px !important; }
.radius-md { border-radius: 8px !important; }
.radius-lg { border-radius: 12px !important; }
.radius-xl { border-radius: 20px !important; }
.radius-pill { border-radius: 999px !important; }


/* =========================================
   FINALE MOBILE OPTIMIERUNG (FULL-WIDTH & CENTER)
   ========================================= */

@media only screen and (max-width: 900px) {
    /* 1. Header: Logo links, Burger rechts auf einer Höhe */
    .site-header {
        padding: 10px 0 !important; /* Weniger vertikaler Platzverbrauch */
    }

    .header-inner {
        flex-direction: row !important; 
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 15px !important;
        max-width: 100% !important;
    }

    .logo {
        margin: 0 !important;
        text-align: left !important;
        width: auto !important;
    }

    /* 2. Burger Menü: Schrift zentrieren */
    nav#frontend-nav ul {
        display: none; /* Standardmäßig zu */
        flex-direction: column !important;
        align-items: center !important; /* Zentriert die LI-Elemente */
        text-align: center !important;
        width: 100% !important;
        left: 0 !important;
        padding: 20px 0 !important;
    }

    nav#frontend-nav ul.menu-open {
        display: flex !important; /* Geöffnet per JS */
    }

    nav#frontend-nav ul li {
        width: 100% !important;
        margin: 0 !important;
    }

    nav#frontend-nav ul li a {
        display: block !important;
        width: 100% !important;
        text-align: center !important; /* Zentriert den Text im Link */
        padding: 15px 0 !important;
        
 }

    /* 3. Full-Width Content: Alle Ränder entfernen */
    html, body {
        overflow-x: hidden !important;
    }

    /* Alle Sektions-Container auf 100% zwingen */
    .container, 
    .site-wrapper, 
    .uni-section, 
    .team-section, 
    .gt-section,
    .hero-section,
    section {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Karten/Grids fast auf volle Breite (nur 5px Sicherheitsabstand) */
    .gt-card, 
    .team-card, 
    .glass-card,
    .uni-col,
    .faq-item {
        margin-left: 5px !important;
        margin-right: 5px !important;
        width: calc(100% - 10px) !important;
    }

    /* Texte in Sektionen brauchen einen minimalen Rand zum Lesen */
    .con-intro, 
    .uni-col p, 
    .gt-text,
    .hero-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }




/* ============================================================
   BURGER MENÜ OVERLAY - DESKTOP & MOBILE STYLES
   ============================================================ */

/* 1. Hintergrund des gesamten Overlays */
.mobile-overlay-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease-in-out;
    /* Hintergrundfarbe wird über die Admin-Einstellungen gesteuert */
    /* background: var(--menu-overlay-bg) !important; */
}

/* 2. Zentrierung und Styling der Menü-Links */
.mobile-overlay-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
}

.mobile-overlay-menu ul li {
    width: 100%;
    margin: 10px 0;
}

.mobile-overlay-menu a {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 15px 0 !important;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    /* Größe und Farbe kommen dynamisch aus der header.php */
}

/* 3. Hover-Effekt für die Links */
.mobile-overlay-menu a:hover {
    opacity: 0.8;
}

/* 4. Schließen-Button (X) positionieren */
.menu-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
}

/* 5. Fix für Mobile: Verhindert seitliches Scrollen */
@media only screen and (max-width: 900px) {
    html, body {
        overflow-x: hidden !important;
    }
}
}



/* ============================================================
   OVERLAY MENÜ - GETRENNTE STEUERUNG (DESKTOP & MOBIL)
   ============================================================ */

/* 1. Gemeinsame Basis für das Overlay (Desktop & Mobil) */
.mobile-overlay-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s ease-in-out;
    /* Hintergrundfarbe wird zentral über settings_menu.php gesteuert */
}

.mobile-overlay-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
}

.mobile-overlay-menu a {
    display: block !important;
    width: 100% !important;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    margin: 10px 0;
}

/* 2. DESKTOP SPEZIFISCH (Ab 901px aufwärts) */
@media only screen and (min-width: 901px) {
    .mobile-overlay-menu a {
        /* Hier greift der Wert für das Desktop-Menü aus dem Backend */
        font-size: 32px; /* Beispielwert, wird durch PHP im Header überschrieben */
        padding: 20px 0;
    }
}

/* 3. MOBIL SPEZIFISCH (Bis 900px) */
@media only screen and (max-width: 900px) {
    .mobile-overlay-menu a {
        /* Hier greift der neue mobile Wert (mob_menu_size) aus dem Backend */
        font-size: 24px; /* Beispielwert, wird durch PHP im Header überschrieben */
        padding: 15px 0;
    }
    
    /* Verhindert seitliches Wackeln auf Smartphones */
    html, body {
        overflow-x: hidden !important;
    }
}

/* 4. Hover & Schließen-Button */
.mobile-overlay-menu a:hover {
    opacity: 0.8;
}

.menu-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
}

/* ============================================================
   KORREKTUR: ABSTAND DER MENÜPUNKTE IM OVERLAY
   ============================================================ */

/* Reduziert den Abstand zwischen den einzelnen Links */
.mobile-overlay-menu a {
    margin: 5px 0 !important;  /* Verringert den vertikalen Abstand von 25px auf 5px */
    padding: 8px 0 !important;  /* Feinjustierung des inneren Klickbereichs */
}

/* Stellt sicher, dass die Listen-Elemente keinen zusätzlichen Platz beanspruchen */
.mobile-overlay-menu ul li {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Anpassung für Desktop: Falls die Punkte dort enger zusammenstehen sollen */
@media only screen and (min-width: 901px) {
    .mobile-overlay-menu a {
        margin: 10px 0 !important; /* Etwas mehr Luft auf großen Bildschirmen */
    }
}



/* VISIBILITY UTILITIES */
@media (max-width: 900px) {
    .hide-on-mobile { display: none !important; }
}

@media (min-width: 901px) {
    .hide-on-desktop { display: none !important; }
}


/* =========================================
   BOXED LAYOUT LOGIC
   ========================================= */

/* Greift nur, wenn im Admin "Boxed" gewählt wurde */
body.boxed {
    background-color: #e0e0e0; /* Fallback Farbe */
    /* Hier könnte man auch eine CSS-Variable für die Admin-Farbe nutzen */
}

body.boxed .site-wrapper {
    max-width: 1200px; /* Oder die Breite aus den Settings via PHP */
    margin: 40px auto; /* Abstand oben/unten, zentriert */
    background: #fff;  /* Inhalt bleibt weiß */
    box-shadow: 0 0 30px rgba(0,0,0,0.1); /* Der 3D-Effekt */
    position: relative;
}
