/* --- SELF-HOSTED FONT DEFINITION --- */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
}

/* Optional: Light versions */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-200.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
}

:root {
    /* --- VARIABLES (Updated to match snippet) --- */
    --accent: #635bff;
    --accent-gold: #d4af37;
    --accent-gold-light: #f2d06b;
    --accent-light: #007a60;
    --bg-light: #f6f9fc;
    --border: #e6ebf1;
    --hero-bg-dark: #111111;
    --primary: #0a2540;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --text-dark: #1a1f36;
    --text-light: #666666;
    --text-main: #425466;
    --transition: all 0.25s ease;
    --white: #ffffff;
}

/* --- HEADER CONTAINER --- */
#main-header {
    /* --- BOX MODEL PROPERTIES (Applied) --- */
    box-sizing: border-box;
    display: flex;
    float: none;
    line-height: 23px;
    position: fixed;
    z-index: 1000;
    
    /* --- LAYOUT & POSITIONING --- */
    top: 0;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    
    /* --- BACKGROUND & APPEARANCE --- */
    background-color: var(--white) !important;
    background-image: none;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    
    /* --- SPACING --- */
    padding: 12px 5%; /* Vertical 12px, Horizontal responsive */
    
    /* --- TRANSITIONS --- */
    transition: padding 0.3s, background 0.3s, box-shadow 0.3s;
    
    /* --- TYPOGRAPHY --- */
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: var(--text-main);
}

#main-header.scrolled {
    padding: 0.5rem 5%; /* Keeps scrolled state compact */
    box-shadow: var(--shadow-md);
}

/* --- LOGO --- */
.logo h1,
.logo div {
    /* --- APPLIED STYLES FROM SNIPPET --- */
    box-sizing: border-box;
    color: var(--text-main); /* Matches rgb(66, 84, 102) */
    font-family: "Inter", -apple-system, sans-serif;
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 28.8px !important;
    
    /* Margins */
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
    
    /* Padding */
    padding-top: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-left: 0;
}

.logo p {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: -4px;
    color: var(--accent); /* Updated to new purple */
}

/* --- MAIN NAVIGATION --- */
/* FIX: Added '>' to prevent dropdowns from inheriting flex display */
#mainNav > ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

#mainNav a {
    position: relative;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14.4px;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

#mainNav a:hover {
    color: var(--accent);
}

#mainNav a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent); /* Purple underline */
    transition: width 0.3s;
}

#mainNav a:hover::after {
    width: 100%;
}

/* --- DROPDOWNS --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 4px 0;
    border: 1px solid var(--border);
    z-index: 9999;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
}

.dropdown:hover .dropdown-menu {
    display: flex;
    animation: fadeInSmall 0.2s ease-out;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    display: block;
    padding: 0.4rem 1.5rem !important;
    font-size: 13.6px;
    line-height: 1.2 !important;
    color: var(--text-main);
}

.dropdown-menu li a:hover {
    background-color: var(--bg-light);
    color: var(--accent);
}

.dropdown-trigger {
    cursor: pointer;
    font-size: 0.7rem;
    margin-left: 4px;
    color: var(--accent);
}

/* --- HEADER RIGHT --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}

#langSelect {
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
    background: transparent;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    height: 36px;
    transition: 0.3s;
}

#langSelect:focus, #langSelect:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.15); /* Updated to match purple accent */
}

/* --- MOBILE MENU TOGGLE --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2000;
}

.mobile-menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    margin: 3px 0;
    transition: 0.3s ease;
}

/* --- MOBILE STYLES --- */
@media (max-width: 900px) {
    #main-header {
        height: 85px;
        padding: 12px 5%; /* Using new vertical padding */
    }

    .header-right {
        margin-left: 0;
        gap: 10px;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    #mainNav {
        display: none;
    }

    #mainNav.active {
        display: block;
        position: fixed;
        top: 85px;
        left: 0;
        width: 100%;
        height: calc(100vh - 85px);
        background: var(--white);
        z-index: 1500;
        padding: 20px;
        overflow-y: auto;
    }

    /* FIX: Added '>' for mobile styles */
    #mainNav.active > ul {
        flex-direction: column;
        gap: 15px;
    }

    #mainNav.active > ul li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    #mainNav.active > ul li a {
        font-size: 1.2rem;
        color: var(--text-main);
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .dropdown-menu.show {
        display: block;
        position: static;
        width: 100%;
        background: #fdfdfd;
        box-shadow: none;
        border-left: 2px solid var(--accent);
        margin-top: 10px;
        padding-left: 20px;
    }

    .dropdown-trigger {
        display: inline-block;
        padding: 10px;
    }

    .mobile-menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* --- ANIMATIONS --- */
@keyframes fadeInSmall {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}