/*
==============================================================================
LUVEX THEME v3.3 - CORE STYLES (MAIN.CSS INTEGRIERT)
==============================================================================
Description: Enthält alle globalen Basis-Stile, das Layout-System (Container,
             Grid, Sections) und wiederverwendbare Utility-Klassen.
             + WORDPRESS ADMIN BAR & ASTRA HEADER FIXES
             + MAIN.CSS INHALTE INTEGRIERT
Dependencies: _variables.css
Last Update: 2025-09-01 (main.css Styles integriert + Priority System)
==============================================================================
*/

/* ========================================================================== 
   WORDPRESS SCREEN READER & ACCESSIBILITY (VON MAIN.CSS INTEGRIERT)
   ========================================================================== */

/* Screen Reader Text - WordPress Standard */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 8px 16px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ========================================================================== 
   WORDPRESS ADMIN BAR & ASTRA HEADER FIXES (HÖCHSTE PRIORITÄT)
   ========================================================================== */

/* 1. Admin Bar Margin-Top Problem lösen */
html {
    margin-top: 0 !important;
}

/* Admin bar compatibility (VON MAIN.CSS) */
.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* 2. Astra Navigation System komplett ausblenden */
.main-header-bar-navigation.ast-flex,
.ast-main-header-bar-alignment,
.main-navigation.ast-flex-grow-1,
.ast-builder-menu-1,
.ast-hfb-header .ast-builder-menu-1,
.ast-header-break-point .ast-builder-menu-1 {
    display: none !important;
}

/* 3. Fixed Header ohne Admin Bar Konflikte */
.site-header.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    /* Die Hintergrundfarbe wird jetzt in _header.css gesteuert */
}

/* 4. Body Content richtig positionieren */
.site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/*
==============================================================================
1. GLOBAL & BASE STYLES
==============================================================================
*/

* {
    box-sizing: border-box;
}

html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-x: hidden;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--luvex-gray-900);
    margin: 0;
    /* ENTFERNT: padding-top: 80px; - Dies erzeugte den weißen Balken. Der Abstand wird jetzt im Hero-Container selbst gehandhabt. */
    background: var(--luvex-white); /* Behalten wir als Standard-Seitenhintergrund bei. */
}

/* Sicherstellen dass Admin Bar über Header ist */
#wpadminbar {
    z-index: 99999 !important;
}

.site-header.fixed-header {
    position: fixed;
    top: 0;
    z-index: 9999;
}

/* Admin Bar angepasst für fixierten Header */
body.admin-bar .site-header.fixed-header {
    top: 32px !important; /* Admin Bar Höhe */
}

/* Astra Scroll-To-Top Button ausblenden */
#ast-scroll-top {
    display: none !important;
}

/*
==============================================================================
2. TYPOGRAPHY HIERARCHY (ERWEITERT UM BLOCKSATZ-STANDARDS)
==============================================================================
*/

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; line-height: 1.1; margin: 0 0 var(--space-md) 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 600; line-height: 1.2; margin: 0 0 var(--space-md) 0; letter-spacing: -0.01em; }
h3 { font-size: var(--text-2xl); font-weight: 600; margin: 0 0 var(--space-sm) 0; }
h4 { font-size: var(--text-xl); font-weight: 600; margin: 0 0 var(--space-sm) 0; }

/* STANDARD: Beschreibungen im Blocksatz */
p, 
.description,
.section-description,
[class*="description"]:not(.luvex-hero__description) {
    font-size: var(--text-lg); 
    color: var(--luvex-white); 
    margin: 0 0 var(--space-md) 0;
    text-align: justify;
    hyphens: auto;
    line-height: 1.7;
}

/* AUSNAHMEN: Keine Blocksatz */
.luvex-hero p,
.luvex-hero .description,
.card p,
.card .description,
button p,
.btn p {
    text-align: left;
    hyphens: none;
}

a { color: var(--luvex-vibrant-blue); text-decoration: none; transition: var(--transition-normal); }
a:hover { color: var(--luvex-bright-cyan); }

/*
==============================================================================
3. LAYOUT SYSTEM (VEREINFACHT)
==============================================================================
*/

/* --- 3.1 Container System --- */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.container--narrow { max-width: 1200px; }
.container--medium { max-width: 1400px; }
.container--wide { max-width: 1800px; }

/* --- 3.2 Section Defaults --- */
.section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.section--small { padding: 4rem 0; }
.section--large { padding: 8rem 0; }

/* --- 3.3 Section Backgrounds --- */
.section--turquoise-light {
    background: linear-gradient(180deg, rgba(109, 213, 237, 0.08) 0%, rgba(248, 250, 252, 0) 100%);
}

/*
==============================================================================
3.4 FIXED HEADER LAYOUT SYSTEM - BEREINIGT & ASTRA-FIX
==============================================================================
*/

/* Alle Container haben KEINE zusätzlichen Margins/Paddings */
#content,
.site-content,
.content-area,
#primary,
.site-main {
    margin: 0 !important;
    padding: 0 !important;
    border-top: none !important;
}

/* Erste Elemente sollen direkt beginnen */
.site-main > *:first-child,
.content-area > *:first-child,
.luvex-hero {
    margin-top: 0 !important;
}

/* Astra Theme Overrides - ERWEITERT */
.ast-container,
.ast-separate-container .ast-container,
.ast-page-builder-template .ast-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Astra Body-Klassen Override - ERWEITERT */
body.custom-background .site-content,
body.ast-header-break-point .site-content,
body[class*="ast-"] .site-content,
body.ast-page-builder-template .site-content,
body.ast-separate-container .site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Astra Header Builder spezifische Fixes */
.ast-hfb-header {
    position: relative !important;
}

.ast-hfb-header .site-header {
    position: fixed !important;
}

/*
==============================================================================
4. GRID & FLEXBOX SYSTEMS
==============================================================================
*/

.grid { display: grid; gap: var(--gap-default); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

@media (min-width: 768px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/*
==============================================================================
5. SECTION DIVIDERS & TRANSITIONS
==============================================================================
*/

.section-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 5;
}

.section-divider--bottom { bottom: -1px; }
.section-divider--top { top: -1px; transform: rotate(180deg); }

.section-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 90px;
}

.section-divider .shape-fill {
    fill: var(--luvex-white);
}

/*
==============================================================================
6. UTILITY CLASSES
==============================================================================
*/

.text-center { text-align: center; }
.text-highlight { color: var(--luvex-bright-cyan); }
.hidden { display: none; }
.no-break {
    white-space: nowrap;
    display: inline-block;
}

.no-hyphen {
    hyphens: none;
    word-break: keep-all;
}

.keep-together {
    white-space: nowrap;
    display: inline;
}

/*
==============================================================================
7. RESPONSIVE LAYOUT FIXES
==============================================================================
*/

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section--small {
        padding: 3rem 0;
    }
    
    .section--large {
        padding: 6rem 0;
    }
    
    /* Mobile Admin Bar Fix */
    body.admin-bar .site-header.fixed-header {
        top: 46px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}

/*
==============================================================================
8. BUTTON CONTAINER STANDARDS (NEU)
==============================================================================
*/

/* STANDARD: Button-Container zentriert */
.cta-actions,
[class*="actions"],
[class*="cta-container"] {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 2rem 0;
}