:root {
    --primary: #0a192f;
    --secondary: #172a45;
    --accent: #64ffda;
    --gold: #d4af37;
    --text-main: #ccd6f6;
    --text-dim: #8892b0;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.645, 0.045, 0.355, 1);
    --font-en: 'Outfit', sans-serif;
    --font-ar: 'Tajawal', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #020c1b;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content {
    text-align: center;
}

.logo-animation {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.loader-logo {
    height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; filter: brightness(0) invert(1) drop-shadow(0 0 10px var(--gold)); }
}

.progress-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    margin: 1rem auto;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--gold);
    animation: fill 2.5s forwards;
}

@keyframes fill {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1); /* Makes logo white for dark theme */
    transition: var(--transition);
}

.navbar.scrolled .logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    transition: var(--transition);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 400;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--gold);
}

.lang-toggle {
    border: 1px solid var(--gold);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.menu-btn {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* Hero */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?auto=format&fit=crop&q=80&w=2000') no-repeat center center/cover;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.4));
}

[dir="rtl"] .hero-overlay {
    background: linear-gradient(to left, rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.4));
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--gold);
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn-outline {
    border: 1px solid var(--gold);
    color: var(--gold);
    margin-left: 1rem;
}

[dir="rtl"] .btn-outline {
    margin-left: 0;
    margin-right: 1rem;
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Sections */
.section-card {
    padding: 100px 0;
    background: var(--primary);
}

.section-card.alternate {
    background: var(--secondary);
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.section-card.alternate .split-layout {
    grid-template-columns: 1.2fr 1fr;
}

.tag {
    color: var(--gold);
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.content h2 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.content p {
    color: var(--text-dim);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-text {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-features {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--white);
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.feat i {
    color: var(--gold);
}

.image-box {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.image-box img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.image-box:hover img {
    transform: scale(1.1);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Footer */
.footer {
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Mobile */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 1000;
        transition: 0.5s ease;
    }

    [dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
    }

    .nav-links.active {
        right: 0;
    }

    [dir="rtl"] .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .split-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }
    
    .image-box {
        order: -1;
    }
    
    .section-card.alternate .image-box {
        order: -1;
    }

    .btn-text {
        justify-content: center;
    }

    .hero h1 {
        font-size: 3rem;
    }
}
