/**
 * Jamiat ur Rasheed - Arabic Department Management System (LMS + ERP)
 * Master Design System: Royal Blue Sapphire Gradient, Islamic Gilding & Ultra-Modern Glassmorphism
 */

:root {
    /* Royal Blue / Sapphire Primary Palette */
    --primary-950: #040d1a;
    --primary-900: #07162c;
    --primary-850: #0b2042;
    --primary-800: #0f2b5c;
    --primary-750: #153875;
    --primary-700: #1a4ca1;
    --primary-600: #1e58b8;
    --primary-500: #2563eb;
    --primary-400: #3b82f6;
    --primary-300: #60a5fa;
    --primary-200: #93c5fd;
    --primary-100: #dbeafe;
    --primary-50:  #eff6ff;

    /* Classical Islamic Gilding & Gold Accents */
    --gold-700: #a16207;
    --gold-600: #b45309;
    --gold-500: #d4af37;
    --gold-400: #eab308;
    --gold-300: #facc15;
    --gold-200: #fde047;
    --gold-100: #fef08a;
    --gold-50:  #fefce8;

    /* Semantic Feedback Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #047857;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #b45309;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #b91c1c;
    --info: #06b6d4;
    --info-light: #cffafe;
    --info-dark: #0e7490;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;

    /* Surfaces & Glassmorphism Tokens */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-bg-subtle: rgba(255, 255, 255, 0.72);
    --glass-bg-dark: rgba(7, 22, 44, 0.85);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-border-subtle: rgba(226, 232, 240, 0.8);
    --glass-border-dark: rgba(96, 165, 250, 0.25);
    --glass-border-gold: rgba(212, 175, 55, 0.4);
    --glass-blur: blur(20px);
    --glass-blur-sm: blur(10px);

    /* Typography */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-arabic: 'Cairo', 'Amiri', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-traditional: 'Amiri', serif;

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Modern Multi-Layered Shadows */
    --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 8px -1px rgba(15, 23, 42, 0.06), 0 1px 3px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 35px -5px rgba(15, 23, 42, 0.12), 0 10px 15px -5px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.35);
    --shadow-gold-glow: 0 0 25px rgba(212, 175, 55, 0.3);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-secondary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[dir="rtl"] body {
    font-family: var(--font-arabic);
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button, input, select, textarea {
    font: inherit;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
    font-family: var(--font-arabic);
    letter-spacing: 0;
}

/* ==========================================================================
   Centered Floating Pill Navigation Bar (Header)
   ========================================================================== */
.floating-header-wrapper {
    position: sticky;
    top: 14px;
    z-index: 1000;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    box-sizing: border-box;
    pointer-events: none;
    margin-bottom: -74px;
}

.site-header.pill-header {
    pointer-events: auto;
    max-width: 1240px;
    width: 100%;
    background: rgba(6, 18, 38, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    border-radius: 9999px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5), 0 0 25px rgba(37, 99, 235, 0.2);
    padding: 0.35rem 0.85rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-sizing: border-box;
}

.site-header.pill-header:hover {
    border-color: rgba(212, 175, 55, 0.65);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.25);
}

.nav-pill-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
}

/* Navigation Wings */
.nav-wing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1;
}

/* Individual Pill Links */
.nav-pill-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.38rem 0.62rem;
    border-radius: 9999px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-pill-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(-1px);
}

.nav-pill-link.active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.28);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.4);
}

.nav-pill-special {
    color: var(--gold-300);
}

.nav-pill-special:hover {
    color: var(--gold-200);
    background: rgba(212, 175, 55, 0.15);
}

/* Colorful Icon Badges */
.nav-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 0.86rem;
    line-height: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.nav-pill-link:hover .nav-icon-badge {
    transform: scale(1.18);
}

.icon-badge-cyan {
    background: rgba(56, 189, 248, 0.18);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.icon-badge-gold {
    background: rgba(251, 191, 36, 0.18);
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}

.icon-badge-indigo {
    background: rgba(129, 140, 248, 0.18);
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.25);
}

.icon-badge-amber {
    background: rgba(245, 158, 11, 0.18);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

.icon-badge-purple {
    background: rgba(192, 132, 252, 0.18);
    box-shadow: 0 0 8px rgba(192, 132, 252, 0.25);
}

.icon-badge-emerald {
    background: rgba(52, 211, 153, 0.18);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.25);
}

.icon-badge-rose {
    background: rgba(251, 113, 133, 0.18);
    box-shadow: 0 0 8px rgba(251, 113, 133, 0.25);
}

/* Center Circular Logo Crest */
.nav-center-crest {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    flex-shrink: 0;
    z-index: 5;
}

.brand-crest-circle {
    display: block;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-crest-ring {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #d4af37;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 16px rgba(212, 175, 55, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.brand-logo-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.brand-crest-circle:hover {
    transform: scale(1.12);
}

.brand-crest-circle:hover .brand-crest-ring {
    border-color: #facc15;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55), 0 0 25px rgba(250, 204, 21, 0.7);
}

/* Nav Auth Action Slot */
.nav-auth-slot {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-inline-start: 0.35rem;
}

.nav-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.38rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.nav-btn-primary {
    background: linear-gradient(135deg, #1e58b8 0%, #2563eb 100%);
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.nav-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border-color: #facc15;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5), 0 0 15px rgba(250, 204, 21, 0.35);
    transform: translateY(-1px);
    color: #ffffff;
}

.nav-btn-logout {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.38rem 0.55rem;
}

.nav-btn-logout:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

/* Mobile Toggle & Shortcuts */
.mobile-auth-shortcut {
    display: none;
}

.mobile-auth-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e58b8, #2563eb);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--gold-300);
}

/* Mobile Dropdown Card */
.mobile-nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(7, 22, 44, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(37, 99, 235, 0.25);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
}

.mobile-nav-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.mobile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.mobile-dropdown-link:hover, .mobile-dropdown-link.active {
    background: rgba(37, 99, 235, 0.25);
    border-color: rgba(96, 165, 250, 0.4);
    color: #ffffff;
}

.mobile-dropdown-auth {
    padding-top: 0.75rem;
    margin-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.6rem;
}

/* Responsive Header Breakpoint */
@media (max-width: 1180px) {
    .nav-wing {
        display: none !important;
    }
    .mobile-menu-btn {
        display: inline-flex !important;
    }
    .mobile-auth-shortcut {
        display: block !important;
    }
    .mobile-nav-dropdown {
        display: block !important;
    }
    .site-header.pill-header {
        border-radius: 9999px;
        padding: 0.4rem 0.85rem;
    }
    .nav-pill-container {
        justify-content: space-between;
    }
    .brand-crest-ring {
        width: 52px;
        height: 52px;
    }
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.72rem 1.45rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-normal);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #1e58b8 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a4ca1 0%, #1d4ed8 100%);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: var(--glass-blur-sm);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-gold {
    background: linear-gradient(135deg, #c59b27 0%, #eab308 100%);
    color: #07162c;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #a16207 0%, #ca8a04 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.55);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 1.5px solid var(--primary-600);
}

.btn-outline:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857, #059669);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-sm {
    padding: 0.42rem 0.9rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.95rem 2rem;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

/* ==========================================================================
   Cards & Glassmorphic Surfaces
   ========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    overflow: hidden;
}

.glass-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.25);
    transform: translateY(-4px);
}

.card-solid {
    background: var(--bg-surface);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.card-solid:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    background: radial-gradient(ellipse at top, #0f2b5c 0%, #07162c 60%, #040d1a 100%);
    color: #ffffff;
    padding: 6.5rem 2rem 5.5rem;
    overflow: hidden;
}

.hero-glow-1 {
    position: absolute;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    top: -120px;
    right: -100px;
    pointer-events: none;
}

.hero-glow-2 {
    position: absolute;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -100px;
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: radial-gradient(#ffffff 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(254, 240, 138, 0.35);
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gold-200);
    margin-bottom: 1.6rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.3rem;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 60%, #bfdbfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: #cbd5e1;
    margin-bottom: 2.2rem;
    line-height: 1.8;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-callout-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    position: relative;
}

.hero-callout-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #3b82f6, #60a5fa);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
}

/* Stats Ribbon Counter */
.stats-ribbon {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.2rem 2.5rem;
    margin-top: -3.5rem;
    position: relative;
    z-index: 10;
    max-width: 1150px;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.8rem;
    border: 1px solid #e2e8f0;
}

.stat-item {
    text-align: center;
    border-inline-end: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
}

.stat-item:last-child {
    border-inline-end: none;
}

.stat-number {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--primary-750);
    line-height: 1;
    margin-bottom: 0.4rem;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================================
   Sections Layout & Headers
   ========================================================================== */
.section {
    padding: 5.5rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.section-header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 3.8rem;
}

.section-subtitle {
    color: var(--primary-600);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.6rem;
}

.section-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary-900);
    line-height: 1.25;
    margin-bottom: 0.9rem;
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 2.5rem;
}

/* ==========================================================================
   Public Footer
   ========================================================================== */
.site-footer {
    background: radial-gradient(circle at bottom, #0b2042 0%, #07162c 60%, #040d1a 100%);
    color: #94a3b8;
    padding: 5rem 2rem 2rem;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.25fr;
    gap: 3.5rem;
    margin-bottom: 3.5rem;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.4rem;
    position: relative;
    padding-bottom: 0.6rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--gold-400);
    border-radius: var(--radius-full);
}

[dir="rtl"] .footer-col h3::after {
    left: auto;
    right: 0;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.93rem;
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-300);
    transform: translateX(3px);
}

[dir="rtl"] .footer-links a:hover {
    transform: translateX(-3px);
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.alert {
    padding: 1.1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error, .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
    margin-bottom: 1.35rem;
}

.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1.5px solid #cbd5e1;
    font-size: 0.95rem;
    background: #ffffff;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-warning { background: var(--warning-light); color: var(--warning-dark); }
.badge-danger  { background: var(--danger-light);  color: var(--danger-dark); }
.badge-info    { background: var(--info-light);    color: var(--info-dark); }
.badge-purple  { background: var(--purple-light);  color: #6d28d9; }
.badge-gold    { background: var(--gold-100);      color: var(--gold-700); }

/* Responsive */
@media (max-width: 1024px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-content h1 { font-size: 2.4rem; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .stats-ribbon { grid-template-columns: repeat(2, 1fr); margin-top: 1.5rem; }
    .stat-item:nth-child(2) { border-inline-end: none; }
    .footer-container { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 640px) {
    .hero-section { padding: 4.5rem 1.5rem 3.5rem; }
    .hero-content h1 { font-size: 2rem; }
    .stats-ribbon { grid-template-columns: 1fr; padding: 1.5rem; }
    .stat-item { border-inline-end: none; border-bottom: 1px solid #e2e8f0; }
    .stat-item:last-child { border-bottom: none; }
    .footer-container { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Floating Bottom-Right Language Switcher Popup
   ========================================================================== */
.floating-lang-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

[dir="rtl"] .floating-lang-container {
    right: 24px !important;
    left: auto !important;
}

.floating-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.15rem;
    background: linear-gradient(135deg, #07162c 0%, #0f2b5c 100%);
    color: #ffffff;
    border: 1.5px solid rgba(212, 175, 55, 0.45);
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 700;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    user-select: none;
}

.floating-lang-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45), 0 0 25px rgba(212, 175, 55, 0.45);
    border-color: var(--gold-300);
}

.floating-lang-btn:active {
    transform: scale(0.97);
}

.lang-btn-icon {
    font-size: 1.15rem;
    line-height: 1;
}

.lang-btn-label {
    letter-spacing: 0.3px;
}

.lang-btn-arrow {
    font-size: 0.7rem;
    color: var(--gold-300);
    transition: transform 0.25s ease;
}

.floating-lang-btn.active .lang-btn-arrow {
    transform: rotate(180deg);
}

/* Popup Card */
.lang-popup-card {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: rgba(7, 22, 44, 0.96);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(37, 99, 235, 0.25);
    padding: 1.15rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.lang-popup-card.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.lang-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-popup-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.lang-popup-close:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
}

.lang-popup-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lang-option-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.lang-option-item:hover {
    background: rgba(37, 99, 235, 0.25);
    border-color: rgba(96, 165, 250, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
}

.lang-option-item.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(30, 88, 184, 0.55));
    border-color: var(--gold-400);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.lang-option-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.lang-option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lang-option-text strong {
    font-size: 0.95rem;
    line-height: 1.2;
    color: #ffffff;
}

.lang-option-text span {
    font-size: 0.74rem;
    color: #94a3b8;
    margin-top: 2px;
}

.lang-option-item.active .lang-option-text span {
    color: var(--gold-200);
}

.lang-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold-400);
    color: #07162c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}
