/* ═══ Custom Premium Styling ═══ */

:root {
    /* --- Colors: Backgrounds --- */
    --color-bg-primary: #F7F7F7;    /* Main Background (Requested) */
    --color-bg-secondary: #FFFFFF;  /* Pure white for sections to stand out */
    --color-bg-card: #FFFFFF;       /* Card/Surface color */
    --color-bg-elevated: #FFFFFF;   /* Floating elements (requires CSS box-shadow) */
    --color-bg-input: #EEEEEE;      /* Form fields (subtle contrast against white cards) */
    --color-bg-overlay: rgba(0,0,0,0.5); /* Dark overlay for modals to pop */

    /* --- Colors: Accents & Branding (Preserved) --- */
    --color-accent: #C41E3A;        /* Primary Crimson Red */
    --color-accent-hover: #E02050;
    --color-accent-soft: rgba(196,30,58,0.1); /* Lighter opacity for light BG */
    --color-accent-glow: rgba(196,30,58,0.3);
    
    --color-gold: #D4A853;          /* Secondary Gold */
    --color-gold-dark: #B8860B;     /* Added: Darker gold for text readability if needed */
    --color-gold-soft: rgba(212,168,83,0.1);
    --color-gold-glow: rgba(212,168,83,0.3);

    /* --- Colors: Text (Inverted for Light Mode) --- */
    --color-text-primary: #1A1A1A;   /* Main readable text (Deep Charcoal) */
    --color-text-secondary: #666666; /* Subtitles/Descriptions */
    --color-text-muted: #999999;     /* Hints/Placeholders */
    --color-text-inverse: #FFFFFF;   /* Text on dark/accent buttons (White on Red) */

    /* --- Colors: System States (Slightly darkened for white BG) --- */
    --color-success: #27AE60;
    --color-warning: #D68910;
    --color-danger: #E74C3C;
    --color-info: #2980B9;

    /* --- Borders (Switched from White to Black rgba) --- */
    --color-border: rgba(0,0,0,0.08);
    --color-border-hover: rgba(0,0,0,0.15);
    --color-border-active: rgba(196,30,58,0.5); /* Accent border */

    /* --- Typography --- */
    --font-primary: 'Inter', -apple-system, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif; /* For Headings */
    
    --fs-base: 0.875rem; /* 14px default */
    --fs-lg: 1.125rem;   /* H3 */
    --fs-xl: 1.375rem;   /* H2 */
    --fs-2xl: 1.75rem;   /* H1 */

    /* --- Glassmorphism Effects (Light Version) --- */
    --glass-bg: rgba(255,255,255,0.75); /* Frosty white glass */
    --glass-border: rgba(0,0,0,0.05);   /* Very subtle dark border */
    --glass-blur: 16px;

    /* --- Radii & Spacing --- */
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --space-md: 16px;
    --space-lg: 24px;

    /* --- Layout --- */
    --max-width: 480px;      /* Designed for mobile first */
    --header-height: 56px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-up {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Navigation & Header */
header {
    background: transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    color: var(--color-text-primary);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.nav-link:hover, .nav-link.active {
    opacity: 1;
    color: #d52b83; /* Brand Pink */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d52b83;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Optimization */
#mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: #FFFFFF;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 100px 32px 40px;
    transform: translateX(100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav-link {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }

.mobile-nav-link.active {
    color: #d52b83; /* Brand Pink */
}

.mobile-menu-btn {
    position: relative;
    z-index: 110;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.03);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:active {
    transform: scale(0.9);
}

.mobile-menu-btn[aria-expanded="true"] {
    background: var(--color-gold-soft);
    border: 1px solid var(--color-gold);
}

/* Language Switcher Styling */
.lang-option {
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: rgba(0,0,0,0.04);
}

.lang-option.active {
    background: var(--color-accent-soft);
    color: #d52b83;
}

.lang-option span:first-child {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.5;
    width: 20px;
}

.lang-option span:last-child {
    font-family: var(--font-display);
    font-weight: 500;
}

#lang-switcher:hover #lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

#lang-switcher.open #lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

#lang-switcher:hover #lang-chevron {
    transform: rotate(180deg);
}

#lang-switcher.open #lang-chevron {
    transform: rotate(180deg);
}

#lang-dropdown {
    pointer-events: none;
}

/* Mobile Language Grid */
.mobile-lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.mobile-lang-btn.active {
    border-color: var(--color-accent);
    background: var(--color-accent-soft);
}

.mobile-lang-btn span:first-child {
    font-size: 10px;
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: 2px;
}

.mobile-lang-btn span:last-child {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
}

/* KB Tabs Styling */
.kb-tab {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--color-text-secondary);
}

.kb-tab.active {
    background: var(--color-bg-secondary);
    color: #d52b83; /* Brand Pink */
    box-shadow: 0 4px 12px rgba(213, 43, 131, 0.15);
}

.kb-panel {
    display: none;
    background: var(--color-bg-secondary);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.02);
}

.kb-panel.active {
    display: block;
}

.kb-sidebar-link {
    color: var(--color-text-secondary);
}

.kb-sidebar-link:hover {
    background: rgba(213, 43, 131, 0.06);
    color: var(--color-text-primary);
}

.kb-sidebar-link.active {
    background: #d52b83;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(213, 43, 131, 0.18);
}

.kb-sidebar-link.active i {
    color: #ffffff;
}

/* FAQ Toggle Styling */
.faq-toggle {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--color-text-secondary);
}

.faq-toggle.active {
    background: #d52b83 !important; /* Brand Pink */
    color: white !important;
    box-shadow: 0 10px 20px rgba(213, 43, 131, 0.2);
}

.faq-toggle:not(.active):hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text-primary);
}

/* FAQ Accordion Styling */
.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-trigger {
    width: 100%;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: left;
    transition: all 0.3s ease;
}

.faq-trigger:hover {
    color: var(--color-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
    color: var(--color-text-secondary);
}

.faq-answer.active {
    max-height: 1000px;
    transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
    padding-bottom: 1.5rem;
}

.faq-icon {
    flex: 0 0 auto;
    transition: transform 0.4s ease;
    opacity: 0.3;
}

.active .faq-icon {
    transform: rotate(45deg);
    opacity: 1;
    color: var(--color-accent);
}

/* Financial Guide Enhancements */
.step-num {
    font-size: 8rem;
    line-height: 1;
    font-weight: 900;
    opacity: 0.05;
    position: absolute;
    top: -2rem;
    left: -1rem;
    pointer-events: none;
}

/* Background waves */
.wave-bg-1 {
    width: 600px;
    height: 600px;
    background: var(--color-accent);
    top: -200px;
    right: -100px;
}

.wave-bg-2 {
    width: 600px;
    height: 600px;
    background: var(--color-gold);
    bottom: -200px;
    left: -100px;
}

/* Text Selection */
::selection {
    background: var(--color-accent);
    color: var(--color-text-inverse);
}

body {
    font-size: var(--fs-base);
    line-height: var(--line-height-base, 1.5);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
}

h1, .font-outfit {
    font-family: var(--font-display);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* CTA button glow */
.cta-button {
    box-shadow: 0 10px 30px var(--color-accent-soft);
}

.cta-button:hover {
    box-shadow: 0 15px 40px var(--color-gold-glow);
}

.nav-link:focus-visible,
.cta-button:focus-visible,
.mobile-menu-btn:focus-visible,
.faq-trigger:focus-visible,
.faq-toggle:focus-visible,
.kb-sidebar-link:focus-visible,
.lang-option:focus-visible,
.mobile-lang-btn:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 4px;
}

@media (max-width: 640px) {
    .mobile-nav-link {
        font-size: 2.25rem;
    }

    .faq-toggle {
        padding: 0.875rem 1rem !important;
        font-size: 0.7rem !important;
        letter-spacing: 0.12em !important;
    }

    .kb-panel {
        padding: 1.5rem;
        border-radius: 18px;
    }
}

/* Simple Animation */
.animate-in {
    animation: fadeIn 0.5s ease-out forwards;
}
