/* ============================================
   PENSION PROVISION - APPLE-STYLE DESIGN
   Professional & Clean für den Bund
   ============================================ */

:root {
    /* Colors - Professional & Clean */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #161616;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent: #7C3AED;
    --accent-hover: #9061F9;
    --border-color: rgba(255, 255, 255, 0.1);
    --blur-bg: rgba(0, 0, 0, 0.72);

    /* Spacing */
    --header-height: 44px;
    --nav-padding: 22px 0;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    background: var(--bg-primary);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar - Apple Style */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 3px solid var(--bg-secondary);
    transition: var(--transition-smooth);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) var(--bg-secondary);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--blur-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--nav-padding);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
}

/* Brand */
.header-brand {
    position: absolute;
    left: max(24px, env(safe-area-inset-left));
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
}

.brand-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.brand-text {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition-smooth);
}

.brand-link:hover .brand-text {
    opacity: 0.8;
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--accent) 50%,
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-header:hover::after {
    opacity: 0.3;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    max-width: 980px;
    margin: 0 auto;
}

.nav-link {
    position: relative;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.01em;
    padding: 10px 16px;
    transition: var(--transition-smooth);
    opacity: 0.8;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    opacity: 1;
    color: var(--text-primary);
}

.nav-link:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
    opacity: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.nav-link.active::before {
    transform: translateX(-50%) scaleX(1);
    background: var(--accent);
}

/* Header Right - Language Switcher */
.header-right {
    position: absolute;
    right: max(24px, env(safe-area-inset-right));
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f5f5f7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.lang-select:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-select option {
    background: #2d2d2d;
    color: #ffffff;
}

.lang-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.hamburger:hover span {
    background: var(--accent);
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: saturate(180%) blur(40px);
    -webkit-backdrop-filter: saturate(180%) blur(40px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 100px 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.close-btn {
    position: absolute;
    top: 22px;
    right: max(24px, env(safe-area-inset-right));
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
    z-index: 10001;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.close-btn i {
    font-size: 24px;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px 0;
    flex-shrink: 0;
}

.mobile-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 16px 0;
    transition: var(--transition-smooth);
    opacity: 0.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    line-height: 1.2;
}

.mobile-nav a:hover {
    opacity: 1;
    transform: translateX(8px);
}

.mobile-nav a.active {
    opacity: 1;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-lang {
    margin-top: auto;
    padding-top: 32px;
    padding-bottom: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.mobile-lang .lang-select {
    width: 100%;
    font-size: 18px;
    padding: 16px;
    padding-right: 48px;
    background-position: right 16px center;
    background-size: 14px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    min-height: 100vh;
    padding-top: calc(var(--header-height) + 44px);
}

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

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 64px 0 32px;
    margin-top: 120px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1.8fr 1.5fr 1fr;
    gap: 120px;
    margin-bottom: 48px;
}

.footer-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.footer-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.footer-section h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-smooth);
    opacity: 0.8;
    display: inline-block;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
    transform: translateX(4px);
}

.footer-links li {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 32px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.8;
}

.footer-bottom a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-bottom a:hover {
    color: var(--accent);
}

@media (max-width: 640px) {
    .footer-bottom p {
        font-size: 15px;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .main-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .lang-select-desktop {
        display: none !important;
    }

    .header-right {
        position: static;
        transform: none;
        margin-left: auto;
        display: flex;
        gap: 12px;
        align-items: center;
    }

    .main-header {
        padding: 16px max(24px, env(safe-area-inset-right)) 16px max(24px, env(safe-area-inset-left));
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-brand {
        position: static;
        transform: none;
    }

    .brand-text {
        font-size: 17px;
    }

    .lang-select {
        font-size: 14px;
        padding: 8px 12px;
        padding-right: 32px;
        background-position: right 10px center;
    }

    .hamburger {
        order: 2;
    }
}

/* Desktop: Hide mobile contact, show desktop contact under subtitle */
.footer-contact-mobile {
    display: none;
}

.footer-contact-desktop {
    display: block;
    margin-top: 32px;
}

.footer-contact-desktop h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        display: flex;
        flex-direction: column;
    }

    /* Mobile: Hide desktop contact, show mobile contact */
    .footer-contact-desktop {
        display: none;
    }

    .footer-contact-mobile {
        display: block;
        margin-top: 32px; /* Deutlicher Abstand zwischen Text und Email */
    }

    .footer-contact-mobile h4 {
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text-secondary);
        margin-bottom: 16px; /* Abstand zwischen KONTAKT und Email */
    }

    /* Reorder footer sections on mobile */
    .footer-section:nth-child(1) { order: 1; } /* Retirement Provision + Kontakt mobile */
    .footer-section:nth-child(2) { order: 3; } /* Navigation - put "Studie" at bottom */
    .footer-section:nth-child(3) { order: 2; } /* Rechtliches */

    .main-content {
        padding-top: 76px;
    }

    .footer-section h3 {
        font-size: 22px;
    }

    .footer-section h4 {
        font-size: 14px;
    }

    .footer-links a,
    .footer-links li {
        font-size: 16px;
    }

    .footer-subtitle {
        font-size: 15px;
        margin-bottom: 0;
    }

    /* Kleinere Schrift im mobilen Menü für kleinere Handys */
    .mobile-nav a {
        font-size: 26px;
        padding: 14px 0;
    }

    .mobile-menu-overlay {
        padding: 90px 24px 32px;
    }

    .mobile-lang .lang-select {
        font-size: 16px;
        padding: 14px;
        padding-right: 44px;
    }
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
