:root {
    /* Brand Colors from Design Guide */
    --navy: #1D3557;
    --navy-dark: #0d1b2a;
    /* Derived darker shade for bg */
    --sand: #D4A373;
    --azure: #457B9D;
    --white: #F1FAEE;
    --brick: #BC4749;

    /* Theme Mapping */
    --primary: var(--sand);
    /* Buttons/Accents */
    --primary-dark: #b08968;
    /* Hover state for sand */
    --secondary: var(--azure);
    --dark: var(--navy-dark);
    --light: var(--white);
    --gray: #94a3b8;

    --surface: rgba(29, 53, 87, 0.7);
    /* Navy with opacity */
    --glass: rgba(241, 250, 238, 0.05);
    /* White glass */
    --glass-border: rgba(241, 250, 238, 0.1);

    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;

    --text-primary: var(--white);
    --text-secondary: rgba(241, 250, 238, 0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

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

ul {
    list-style: none;
}

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

.section {
    padding: 6rem 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

/* Language Switcher */
.lang-switch {
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.lang-switch:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 8rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

[dir="rtl"] .hero::before {
    right: auto;
    left: -10%;
}

[dir="rtl"] .hero::after {
    left: auto;
    right: -10%;
}


.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(40, 50, 70, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Page Headers (About, Terms, etc.) */
.page-header {
    padding: 10rem 0 4rem;
    text-align: center;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.page-content {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 4rem;
}

.page-content h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1.5rem;
    color: var(--primary);
}

.page-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.page-content ul {
    list-style: disc;
    padding-inline-start: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-item {
    margin-bottom: 2rem;
}

.contact-info-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-info-item p {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: rgba(10, 14, 23, 0.8);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
}

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    color: var(--gray);
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        /* Default LTR */
        left: auto;
        height: 100vh;
        width: 70%;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        border-left: 1px solid var(--glass-border);
    }

    [dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
        /* RTL Hidden */
        border-left: none;
        border-right: 1px solid var(--glass-border);
    }

    .nav-links.active {
        right: 0;
        /* LTR Active */
    }

    [dir="rtl"] .nav-links.active {
        right: auto;
        left: 0;
        /* RTL Active */
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}