/* --- Base Variables & Resets --- */
:root {
    /* Colors - Matching App Theme */
    --primary: #38BDF8;
    /* Sky Blue */
    --primary-hover: #0ea5e9;
    --primary-light: #e0f2fe;

    --secondary: #818CF8;
    /* Lavender */
    --secondary-hover: #6366f1;

    --accent: #10B981;
    /* Emerald Green */

    /* Neutral / Text */
    --text-main: #1E293B;
    /* Slate Dark */
    --text-muted: #64748B;
    /* Slate Light adjusted */
    --bg-main: #F8FAFC;
    /* Light Background */
    --bg-light: #ffffff;
    --bg-dark: #0F172A;
    /* Dark Background */

    /* Semantic */
    --success: #10B981;
    /* Emerald Green */
    --error: #ef4444;
    --whatsapp: #25D366;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Layout */
    --container-width: 1200px;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;

    /* Typography */
    --font-family: 'Tajawal', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.py-large {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.mb-large {
    margin-bottom: var(--spacing-lg);
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: white;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Typography --- */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.bg-dark .section-title {
    color: white;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: var(--whatsapp);
    color: white;
}

.btn-whatsapp:hover {
    background-color: #1DA851;
    box-shadow: 0 10px 15px -3px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius);
}

.btn-block {
    width: 100%;
}

/* --- Glassmorphism --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.bg-dark .glass-card,
.audience-inner {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.footer-logo {
    height: 64px;
    width: auto;
    object-fit: contain;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 180px 0 100px;
    text-align: center;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite alternate;
}

.shape-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: var(--primary-light);
}

.shape-2 {
    bottom: 10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(6, 182, 212, 0.2);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    right: 20%;
    width: 300px;
    height: 300px;
    background: rgba(245, 158, 11, 0.1);
    animation-duration: 15s;
}

.hero-container {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-inline: auto;
    line-height: 1.8;
}

/* --- Problems Section --- */
.problems-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.problems-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.problems-list li:hover {
    transform: translateX(-10px);
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.icon-box.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.solution-card {
    background: linear-gradient(145deg, var(--primary), var(--primary-hover));
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    color: white;
    box-shadow: var(--shadow-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.1)" stroke-width="2" fill="none"/></svg>') no-repeat center center / cover;
    opacity: 0.5;
    z-index: 0;
}

.solution-card>* {
    position: relative;
    z-index: 1;
}

.solution-icon-wrapper {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1.5rem;
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.solution-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.solution-text {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.8;
}

/* --- How it Works Section --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    background: var(--bg-main);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    background: white;
}

.step-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.step-number {
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 6rem;
    font-weight: 900;
    color: rgba(79, 70, 229, 0.05);
    z-index: 0;
    line-height: 1;
}

.step-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.step-text {
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* --- Features Section --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Target Audience Section --- */
.audience-section {
    background: linear-gradient(135deg, var(--bg-dark), #1e293b);
    position: relative;
    color: white;
}

.audience-inner {
    padding: 4rem;
    border-radius: var(--border-radius-lg);
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.audience-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.audience-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.audience-badge i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    display: block;
}

.audience-badge span {
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- Ecosystem Section --- */
.ecosystem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.ecosystem-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.ecosystem-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.ecosystem-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-main);
}

.ecosystem-list li i {
    font-size: 1.4rem;
    color: var(--accent);
    flex-shrink: 0;
}

/* Phone Mockup */
.ecosystem-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.device-mockup {
    width: 280px;
    background: var(--bg-dark);
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.device-header {
    display: flex;
    justify-content: center;
    padding: 8px 0 12px;
}

.device-cam {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #334155;
}

.device-screen {
    background: var(--bg-main);
    border-radius: 28px;
    overflow: hidden;
}

.app-preview {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.app-topbar {
    display: flex;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.app-course-card {
    background: white;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.app-course-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 10px;
    flex-shrink: 0;
}

.app-course-info {
    flex: 1;
    min-width: 0;
}

.app-course-name {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-course-progress {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 100px;
}

.app-course-progress span {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.app-exam-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Store Badges */
.store-badges {
    display: flex;
    gap: 1rem;
}

.store-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-dark);
    color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.store-badge i {
    font-size: 1.75rem;
    color: white;
}

.store-badge.coming-soon {
    opacity: 0.7;
    cursor: default;
    position: relative;
}

.store-badge.coming-soon::after {
    content: 'قريباً';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
}

.store-sub {
    font-size: 0.7rem;
    opacity: 0.7;
}

.store-name {
    font-size: 0.95rem;
    font-weight: 700;
}

@media (max-width: 992px) {
    .ecosystem-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .ecosystem-list {
        text-align: right;
    }

    .ecosystem-visual {
        order: -1;
    }
}

/* --- CTA Section (Simplified) --- */
.cta-simple {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.cta-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-benefits-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.cta-main-btn {
    font-size: 1.25rem;
    padding: 1.1rem 3rem;
    border-radius: var(--border-radius-lg);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cta-note {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1rem;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.benefit i {
    color: var(--success);
    font-size: 1.25rem;
}

.cta-form-wrapper {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    position: relative;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-main);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: white;
}

.form-divider {
    text-align: center;
    position: relative;
    margin: 2rem 0;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.form-divider span {
    position: relative;
    z-index: 2;
    background: white;
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-success {
    text-align: center;
    padding: 2rem 0;
}

.success-icon-large {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 1rem;
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hidden {
    display: none !important;
}

/* --- Footer --- */
.footer {
    background: white;
    padding-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .footer-logo {
    margin-bottom: 1rem;
}

.footer-desc {
    color: var(--text-muted);
    margin-top: 1rem;
    max-width: 300px;
}

.footer h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-contact a {
    color: var(--text-muted);
}

.footer-contact a:hover {
    color: var(--primary);
}

.footer-bottom {
    background: var(--bg-main);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.fw-bold {
    font-weight: 700;
}

/* --- Animations --- */
@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

/* Scroll Revel Effects */
.reveal,
.reveal-right,
.fade-in-up {
    opacity: 0;
}

.reveal.active,
.reveal-right.active,
.fade-in-up.active {
    opacity: 1;
}

.fade-in-up {
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.active {
    transform: translateY(0);
}

.reveal {
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    transform: translateY(0);
}

.reveal-right {
    transform: translateX(-50px);
    /* RTL: translating from right visually */
    transition: all 0.8s ease;
}

.reveal-right.active {
    transform: translateX(0);
}

/* --- Responsive Layout --- */
@media (max-width: 992px) {

    .problems-grid,
    .cta-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .steps-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-section {
        padding: 140px 0 80px;
    }

    .section-title {
        font-size: 2rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }
}