:root {
    --primary: #087d9a;
    --primary-dark: #065a6e;
    --primary-light: #e6f7fc;
    --secondary: #FEAF39;
    --secondary-dark: #f59f1a;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #087d9a 0%, #0a5c7a 100%);
    --gradient-accent: linear-gradient(135deg, #FEAF39 0%, #ff8a00 100%);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 60px rgba(8, 125, 154, 0.15);
    --shadow-accent: 0 10px 30px rgba(254, 175, 57, 0.3);
    --radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    background: var(--white);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(8, 125, 154, 0.4);
}

.nav-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-login {
    padding: 0.65rem 1.5rem;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    background: transparent;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(8, 125, 154, 0.3);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(160deg, #f0f9ff 0%, #ffffff 40%, #fff8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(254, 175, 57, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(8, 125, 154, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    color: var(--dark);
    letter-spacing: -0.5px;
}

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

.hero-content p {
    font-size: 1.15rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 500px;
}

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

.btn-primary {
    padding: 1rem 2.2rem;
    background: var(--gradient);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(8, 125, 154, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(8, 125, 154, 0.5);
}

.btn-secondary {
    padding: 1rem 2.2rem;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(8, 125, 154, 0.3);
}

/* ===== Hero Image ===== */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--gradient);
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.1; }
    50% { transform: scale(1.1); opacity: 0.15; }
}

.hero-image svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 20px 40px rgba(8, 125, 154, 0.2));
}

/* ===== Features ===== */
.features {
    padding: 6rem 2rem;
    background: var(--white);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.15rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.feature-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 75px;
    height: 75px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(254, 175, 57, 0.15), rgba(8, 125, 154, 0.15));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
    background: linear-gradient(135deg, rgba(254, 175, 57, 0.25), rgba(8, 125, 154, 0.25));
}

.feature-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== CTA ===== */
.cta {
    background: var(--gradient);
    padding: 6rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(254, 175, 57, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.cta h2 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.btn-cta {
    display: inline-block;
    padding: 1.1rem 2.8rem;
    background: var(--secondary);
    color: var(--dark);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-accent);
    position: relative;
    z-index: 1;
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(254, 175, 57, 0.5);
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ===== RTL Support ===== */
[dir="rtl"] .navbar-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-content {
    text-align: right;
}

[dir="rtl"] .hero-buttons {
    justify-content: flex-start;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 7rem;
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image svg {
        max-width: 280px;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta h2 {
        font-size: 2rem;
    }

    .navbar-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .nav-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    .hero-buttons {
        flex-direction: column;
    }

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