/* ===== CSS Variables ===== */
:root {
    --primary: #0d47a1;
    --primary-light: #1976d2;
    --secondary: #00838f;
    --accent: #ff6f00;
    --success: #00897b;
    --dark: #1a1a2e;
    --light: #f5f7fa;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #0d47a1 0%, #1976d2 100%);
    --gradient-secondary: linear-gradient(135deg, #00838f 0%, #26c6da 100%);
    --gradient-accent: linear-gradient(135deg, #ff6f00 0%, #ffa726 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans Arabic', 'Tajawal', -apple-system, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ===== Navigation ===== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5em;
    font-weight: 900;
    color: var(--primary);
    font-family: 'Tajawal', sans-serif;
}

.logo-icon {
    font-size: 1.4em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.95em;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0a2342 0%, #0d47a1 50%, #1976d2 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 40%, rgba(25, 118, 210, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 60%, rgba(255, 111, 0, 0.15) 0%, transparent 50%);
    animation: pulseHero 20s ease-in-out infinite;
}

@keyframes pulseHero {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-size: clamp(2em, 5vw, 3.5em);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 24px;
    font-family: 'Tajawal', sans-serif;
}

.gradient-text {
    background: linear-gradient(135deg, #ffa726 0%, #ff6f00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1em, 2.5vw, 1.25em);
    margin-bottom: 36px;
    opacity: 0.95;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1em;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    font-family: 'Tajawal', sans-serif;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 8px 24px rgba(255, 111, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255, 111, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(2.5em, 5vw, 3.5em);
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-top: 8px;
}

/* ===== Trust Badges ===== */
.trust-badge-section {
    padding: 30px 0;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--dark);
}

.badge-icon {
    font-size: 1.5em;
    color: var(--success);
}

/* ===== Platform Cards ===== */
.featured-platforms {
    padding: 80px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(1.8em, 4vw, 2.5em);
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--dark);
    font-family: 'Tajawal', sans-serif;
}

.section-subtitle {
    font-size: 1.1em;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.platform-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
}

.platform-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(13, 71, 161, 0.2);
}

.platform-card.featured {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.04) 0%, rgba(25, 118, 210, 0.04) 100%);
    border-color: rgba(13, 71, 161, 0.3);
}

.platform-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--gradient-accent);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85em;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3);
}

.platform-badge.recommended {
    background: var(--gradient-secondary);
}

.license-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 137, 123, 0.1);
    color: var(--success);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    border: 2px solid var(--success);
    display: flex;
    align-items: center;
    gap: 6px;
}

.license-icon {
    font-size: 1.1em;
}

.platform-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
    margin-top: 30px;
}

.platform-logo {
    font-size: 3.5em;
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border-radius: 16px;
    flex-shrink: 0;
}

.platform-info h3 {
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--dark);
}

.rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stars {
    font-size: 1.1em;
    letter-spacing: 2px;
}

.rating-score {
    background: var(--gradient-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
}

.review-count {
    font-size: 0.85em;
    color: #999;
}

.platform-desc {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
}

.platform-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.feature-tag {
    background: rgba(13, 71, 161, 0.08);
    color: var(--primary);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.platform-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.85em;
    color: #999;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.3em;
    font-weight: 800;
    color: var(--primary);
}

.btn-platform {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-weight: 700;
}

.btn-platform:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(13, 71, 161, 0.3);
}

.view-all {
    text-align: center;
    margin-top: 40px;
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ===== Education Preview ===== */
.education-preview {
    padding: 80px 0;
    background: var(--light);
}

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

.education-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.education-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.education-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.education-card h3 {
    font-size: 1.3em;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--dark);
}

.education-card p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.education-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.education-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* ===== Why Choose Us ===== */
.why-choose-us {
    padding: 80px 0;
    background: white;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 50px;
}

.feature-item {
    text-align: center;
    padding: 24px;
}

.feature-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    display: block;
}

.feature-item h3 {
    font-size: 1.2em;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--dark);
}

.feature-item p {
    color: #666;
    line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 80px 0;
    background: var(--gradient-primary);
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(2em, 4vw, 2.5em);
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 36px;
}

.btn-cta {
    background: white;
    color: var(--primary);
    padding: 18px 48px;
    font-size: 1.15em;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.btn-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ===== Footer ===== */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5em;
    font-weight: 900;
    margin-bottom: 16px;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    font-size: 1.5em;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    transform: scale(1.2);
}

.footer-section h4 {
    font-size: 1.15em;
    font-weight: 800;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-right: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-notice {
    background: rgba(255, 111, 0, 0.15);
    border: 1px solid rgba(255, 111, 0, 0.3);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    color: #ffa726;
    line-height: 1.6;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2em;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light);
    color: var(--dark);
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-header h3 {
    font-size: 1.8em;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 10px;
}

.modal-header p {
    color: #666;
    font-size: 1em;
}

.modal-note {
    background: rgba(13, 71, 161, 0.08);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-size: 0.9em;
    color: var(--primary);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-size: 1em;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 71, 161, 0.1);
}

.form-disclaimer {
    background: rgba(255, 152, 0, 0.08);
    border: 1px solid rgba(255, 152, 0, 0.3);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 0.9em;
    color: #e65100;
    line-height: 1.6;
}

.btn-submit {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 1.1em;
    font-weight: 700;
}

.btn-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(13, 71, 161, 0.3);
}

.success-message,
.error-message {
    display: none;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
}

.success-message {
    background: #c8e6c9;
    border: 2px solid #4caf50;
    color: #1b5e20;
}

.error-message {
    background: #ffcdd2;
    border: 2px solid #f44336;
    color: #b71c1c;
}

.success-message.active,
.error-message.active {
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .nav-menu {
        position: absolute;
        top: 70px;
        right: 20px;
        left: 20px;
        background: white;
        flex-direction: column;
        padding: 20px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platforms-grid,
    .education-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
    }

    .modal-content {
        padding: 32px 24px;
    }
}

@media (max-width: 640px) {
    .trust-badges {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }
}
