/* =========================================================================
   CORE BRAND SYSTEM & ARCHITECTURE VARIABLES (Modernized Root Extensions)
   ========================================================================= */
:root {
    /* Color Palette Archetype */
    --brand-primary: hsl(50, 100%, 50%);      /* Vivid Crimson (Accents & Dynamic Actions) */
    --brand-secondary: hsl(10, 100%, 10%);   /* Sleek Deep Slate (Structure, Headers, Text Elements) */
    --brand-accent: #ffa502;       /* Warm Gold (Alerts, Badges, Highlights) */
    
    /* Background & Structural Layers */
    --bg-base: #f1f2f6;            /* Refined Paper White Canvas */
    --bg-surface: #ffffff;         /* Pure Card Surface Layer */
    --bg-dark-matrix: #1e222b;     /* High-End Industrial Dark Charcoal (Footer Base) */
    
    /* Typography Inks */
    --ink-primary: #422f2f;        /* Hard Contrast Text */
    --ink-secondary: #8c8874;      /* Balanced Soft Body Contrast */
    --ink-muted: hsl(60, 17%, 69%);          /* Inactive State Visual Details */

    /* Typography Matrix */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    /* Structural Constants */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 28px;
    --radius-full: 9999px;
    
    /* Elevation Depth Levels */
    --shadow-flat: 0 2px 8px rgba(47, 53, 66, 0.04);
    --shadow-raised: 0 12px 32px rgba(47, 53, 66, 0.08);
    --shadow-overlay: 0 24px 64px rgba(47, 53, 66, 0.16);

    /* Smooth Micro-Animations */
    --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-snappy: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Document Sanitization Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-base);
    color: var(--ink-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Scale Implementation */
h1, h2, h3, h4 {
    color: var(--brand-secondary);
    font-weight: 800;
    line-height: 1.2;
}

p {
    color: var(--ink-secondary);
    font-size: clamp(0.95rem, 1vw, 1.05rem);
}

/* Core Structural Layout Token */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* =========================================================================
   COMPONENTS MODULE: MOBILE DRAWER NAVIGATION STRUCTURES
   ========================================================================= */

/* Backdrop Overlay Blur Layer */
.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 34, 43, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nav-backdrop.is-open {
    opacity: 1;
}

/* Sliding Mobile Navigation Drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 380px; /* Clean standard layout size context */
    background-color: var(--bg-surface);
    z-index: 1200;
    box-shadow: var(--shadow-overlay);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    
    /* Elegant slide out physics transition curves */
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.mobile-nav.is-open {
    transform: translateX(0);
}

/* Internal Layout Headers */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(47, 53, 66, 0.06);
    padding-bottom: 1.25rem;
}

.close-nav {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--brand-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
    transition: var(--transition-snappy);
    
    &:hover {
        background: rgba(255, 71, 87, 0.08);
        color: var(--brand-primary);
    }
}

/* Links List Content Layout Block */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    
    a {
        text-decoration: none;
        color: var(--brand-secondary);
        font-weight: 700;
        font-size: 1.15rem;
        padding-block: 8px;
        border-bottom: 1px solid rgba(47, 53, 66, 0.02);
        transition: var(--transition-snappy);
        
        &:hover, &.active {
            color: var(--brand-primary);
            padding-left: 6px;
        }
    }
    
    /* Make the CTA link card button layout match our standard primary button framework */
    .btn-primary {
        margin-top: 1rem;
        text-align: center;
    }
}

/* Prevent document back-scroll while overlay interactions are live */
body.nav-open {
    overflow: hidden;
}



/* ---------- Custom Language Dropdown ---------- */
.custom-lang-dropdown {
    position: relative;
    display: inline-block;
    font-family: var(--font-sans, system-ui, sans-serif);
}

/* Main Pill Button (Matches Image Visuals) */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-base); /* Dark background matching image */
    border: 1.5px solid var(--ink-muted); /* Subtle dark border */
    border-radius: 14px; /* Curved corners */
    padding: 8px 18px;
    color: #000;
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
}

.lang-btn:hover {
    border-color: var(--brand-primary);
    background-color: var(--brand-primary);
}

/* Flag Icon Styling */
.lang-btn img.lang-flag,
.lang-option img {
    width: 32px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Language Label Styling */
.lang-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-secondary);
    letter-spacing: 0.3px;
}

.lang-arrow {
    font-size: 0.75rem;
    color: var(--text-muted, --brand-secondary);
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.custom-lang-dropdown.open .lang-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--bg-base);
    border: 1.5px solid var(--bg-surface);
    border-radius: 14px;
    min-width: 170px;
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0,0,0,0.5));
    z-index: 1000;
    overflow: hidden;
}

.custom-lang-dropdown.open .lang-menu {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--brand-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lang-option:hover {
    background-color: var(--ink-secondary);
}

.lang-option.active {
    background-color: var(--ink-muted);
}