/* 
 * infra-struktur - Shared CSS
 * Gemeinsame Styles für alle Seiten
 * ================================================
 */

/* ========================================
   RESET & BASE
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --accent: #06b6d4;
    --success: #059669;
    --danger: #dc2626;
    --warning: #f59e0b;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   STICKY HEADER
   ======================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid rgba(2, 6, 23, 0.08);
    transition: box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Header Grid: Logo | Nav | Telefon */
.header-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 70px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.site-header nav {
    padding: 0;
    border: 0;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand img {
    display: block;
    height: auto;
}

/* ========================================
   NAVIGATION
   ======================================== */

.primary-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    border: 0;
    background: transparent;
    padding: 6px;
    cursor: pointer;
}

.nav-toggle .bar {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.nav-items {
    list-style: none;
    margin: 0;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 8px;
    position: absolute;
    top: 100%;
    right: 16px;
    min-width: 230px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(2, 6, 23, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.nav-items.mobile-open {
    display: flex;
}

.nav-items a {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}

.nav-items a:hover,
.nav-items a:focus-visible {
    background: rgba(30, 64, 175, 0.08);
}

/* Phone CTA */
.phone-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--primary);
    color: #fff;
    background: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 0 rgba(30, 64, 175, 0.4) inset;
}

.phone-cta:hover,
.phone-cta:focus-visible {
    filter: brightness(1.05);
}

.phone-cta .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Desktop Navigation */
@media (min-width: 900px) {
    .nav-toggle {
        display: none;
    }
    .nav-items {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
        min-width: 0;
    }
}

/* Mobile Header */
@media (max-width: 899.98px) {
    .header-grid {
        position: relative;
    }
}

@media (max-width: 768px) {
    .header-grid {
        gap: 16px;
    }
    
    .phone-cta {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header-grid {
        gap: 12px;
    }
    
    .phone-cta {
        padding: 8px;
        min-width: 40px;
        justify-content: center;
    }
    
    .phone-cta .phone-number-text {
        display: none;
    }
}

/* ========================================
   DROPDOWN NAVIGATION
   ======================================== */

.nav-item-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--text);
    font-weight: 500;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle:focus-visible {
    background: rgba(30, 64, 175, 0.08);
    outline: none;
}

.dropdown-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-dropdown-toggle[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(2, 6, 23, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    min-width: 220px;
}

.nav-dropdown-menu.show {
    display: flex;
}

.nav-dropdown-menu li {
    margin: 0;
    padding: 0;
}

.nav-dropdown-menu li::before {
    display: none !important;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary);
}

.nav-dropdown-menu a[aria-current="page"] {
    background: rgba(30, 64, 175, 0.12);
    color: var(--primary);
    font-weight: 600;
}

/* Mobile Dropdown */
@media (max-width: 899.98px) {
    .nav-dropdown-menu {
        position: static;
        margin-top: 8px;
        margin-left: 12px;
        box-shadow: none;
        border: none;
        background: rgba(30, 64, 175, 0.04);
        border-left: 2px solid var(--primary);
        border-radius: 4px;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
}

/* Desktop Dropdown */
@media (min-width: 900px) {
    .nav-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1001;
        padding: 16px 8px 8px 8px;
        margin-top: 0;
    }
    
    .nav-dropdown-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 8px;
        background: transparent;
    }
    
    .nav-item-dropdown:hover .nav-dropdown-menu,
    .nav-item-dropdown:focus-within .nav-dropdown-menu {
        display: flex;
    }
    
    .nav-item-dropdown:hover .nav-dropdown-toggle[aria-expanded="false"],
    .nav-item-dropdown:focus-within .nav-dropdown-toggle[aria-expanded="false"] {
        background: rgba(30, 64, 175, 0.08);
    }
    
    .nav-item-dropdown:hover .nav-dropdown-toggle[aria-expanded="false"] .dropdown-icon,
    .nav-item-dropdown:focus-within .nav-dropdown-toggle[aria-expanded="false"] .dropdown-icon {
        transform: rotate(180deg);
    }
}

.nav-dropdown-menu ul {
    padding-left: 0;
}

.nav-dropdown-menu ul li {
    padding-left: 0;
}

/* ========================================
   BUTTONS (Generic)
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: stretch;
}

.cta-buttons .cta,
.cta-buttons .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-buttons .cta,
    .cta-buttons .btn {
        width: 100%;
    }
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: #1a202c;
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.legal-links {
    margin-bottom: 2rem;
}

.legal-links a {
    color: #CDCED1;
    text-decoration: none;
    font-size: 14px;
    margin: 0 15px;
    transition: color 0.2s;
}

.legal-links a:hover {
    color: #748398;
}

.footer p {
    opacity: 0.8;
    font-size: 0.9em;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .legal-links {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .legal-links a {
        margin: 0;
    }
}

/* ========================================
   FLOATING CTA
   ======================================== */

.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: white;
    padding: 1rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.3);
    cursor: pointer;
    z-index: 1000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.floating-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(6, 182, 212, 0.4);
}

@media (max-width: 768px) {
    .floating-cta {
        bottom: 1rem;
        right: 1rem;
    }
}

/* ========================================
   ICONS
   ======================================== */

.icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-white {
    fill: white;
}

/* ========================================
   READING PROGRESS BAR
   ======================================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out;
}


