/* ===== CSS Variables ===== */
:root {
    --primary: #4A9FD8;
    --primary-dark: #3580B5;
    --primary-light: #6BB8E8;
    --primary-lighter: #A8D8F0;
    --primary-bg: #E8F4FC;
    --accent: #2C7AB8;

    --bg-primary: #ffffff;
    --bg-secondary: #f0f7fc;
    --bg-card: #ffffff;
    --bg-navbar: rgba(255, 255, 255, 0.92);

    --text-primary: #1a2b3c;
    --text-secondary: #4a6178;
    --text-muted: #7a8fa3;

    --border-color: #d8e8f3;
    --shadow-sm: 0 2px 8px rgba(74, 159, 216, 0.08);
    --shadow-md: 0 4px 20px rgba(74, 159, 216, 0.12);
    --shadow-lg: 0 8px 40px rgba(74, 159, 216, 0.16);
    --shadow-xl: 0 20px 60px rgba(74, 159, 216, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: 0.3s ease;
}

[data-theme="dark"] {
    --primary: #5AADE8;
    --primary-dark: #4A9FD8;
    --primary-light: #7BC4F0;
    --primary-lighter: #2a4a60;
    --primary-bg: #0d1f2d;
    --accent: #6BB8E8;

    --bg-primary: #0a1520;
    --bg-secondary: #0f1e2c;
    --bg-card: #132636;
    --bg-navbar: rgba(10, 21, 32, 0.95);

    --text-primary: #e8f0f8;
    --text-secondary: #a0b8cc;
    --text-muted: #6a8299;

    --border-color: #1e3448;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition), border-color var(--transition);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle,
.lang-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
}

.theme-toggle:hover,
.lang-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--bg-primary) 50%, var(--primary-bg) 100%);
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--primary-light);
    bottom: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    top: 40%;
    left: 50%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
    padding: 60px 0;
}

.hero-text {
    flex: 1;
}

.hero-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== Store Buttons ===== */
.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    min-width: 180px;
}

[data-theme="dark"] .store-btn {
    background: #e8f0f8;
    color: #0a1520;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.store-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.store-btn-text {
    display: flex;
    flex-direction: column;
}

.store-btn-small {
    font-size: 0.7rem;
    opacity: 0.8;
    line-height: 1.2;
}

.store-btn-big {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
}

/* ===== Phone Mockup ===== */
.hero-phone {
    flex-shrink: 0;
}

.phone-mockup {
    position: relative;
    width: 280px;
    height: 580px;
    background: #1a1a2e;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-xl), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    animation: phoneFloat 6s ease-in-out infinite;
}

@keyframes phoneFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #1a1a2e;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* ===== Section Titles ===== */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 50px;
    color: var(--text-primary);
}

/* ===== Features Section ===== */
.features {
    padding: 100px 0;
    background: var(--bg-secondary);
    transition: background var(--transition);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-lighter);
}

.feature-card-wide {
    grid-column: 1 / -1;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.feature-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: var(--radius-md);
    margin: 0 auto 20px;
    transition: all var(--transition);
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== App Features Section ===== */
.app-features {
    padding: 100px 0;
    background: var(--bg-primary);
    transition: background var(--transition);
}

.app-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.app-feature-card {
    text-align: center;
    padding: 48px 32px;
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.app-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.app-feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 50%;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(74, 159, 216, 0.3);
}

.app-feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.app-feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Disclaimer Section ===== */
.disclaimer {
    padding: 60px 0;
    background: var(--bg-secondary);
    transition: background var(--transition);
}

.disclaimer-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 32px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-right: 4px solid var(--primary);
}

[dir="ltr"] .disclaimer-box {
    border-right: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
}

.disclaimer-icon {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 4px;
}

.disclaimer-box h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.disclaimer-box p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
    padding: 48px 0 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    transition: all var(--transition);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.footer-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact a {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Policy Pages ===== */
.policy-page {
    padding-top: 100px;
    padding-bottom: 80px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.policy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.policy-header {
    text-align: center;
    margin-bottom: 48px;
}

.policy-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.policy-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.policy-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    transition: all var(--transition);
}

.policy-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 36px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-bg);
}

.policy-content h2:first-child {
    margin-top: 0;
}

.policy-content p,
.policy-content li {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 12px;
}

.policy-content ul {
    padding-right: 24px;
    margin-bottom: 16px;
}

[dir="ltr"] .policy-content ul {
    padding-right: 0;
    padding-left: 24px;
}

.policy-content li {
    margin-bottom: 8px;
}

.policy-divider {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 48px 0;
}

.policy-section-label {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 32px;
    padding: 12px 24px;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    display: inline-block;
    width: 100%;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        padding: 40px 0;
        gap: 40px;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .phone-mockup {
        width: 240px;
        height: 500px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .store-btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }

    .phone-mockup {
        width: 220px;
        height: 460px;
        border-radius: 32px;
    }

    .phone-screen {
        border-radius: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .app-features-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 36px;
    }

    .policy-content {
        padding: 28px 20px;
    }

    .policy-header h1 {
        font-size: 1.8rem;
    }

    .disclaimer-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
    .feature-card,
    .app-feature-card {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .feature-card:nth-child(1) { animation-delay: 0.1s; }
    .feature-card:nth-child(2) { animation-delay: 0.2s; }
    .feature-card:nth-child(3) { animation-delay: 0.3s; }
    .feature-card:nth-child(4) { animation-delay: 0.4s; }
    .feature-card:nth-child(5) { animation-delay: 0.5s; }
    .feature-card:nth-child(6) { animation-delay: 0.6s; }
    .feature-card:nth-child(7) { animation-delay: 0.7s; }

    .app-feature-card:nth-child(1) { animation-delay: 0.1s; }
    .app-feature-card:nth-child(2) { animation-delay: 0.2s; }
    .app-feature-card:nth-child(3) { animation-delay: 0.3s; }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-lighter);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
