:root {
    --bg: #ffffff;
    --card: #ffffff;
    --text: #0b1220;
    --muted: #4b5563;
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --border: #e5e7eb;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    background: var(--bg);
    color: var(--text);
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header { position: sticky; top: 0; background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); z-index: 1000; }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: 0.2px; display: inline-flex; align-items: center; gap: 8px; }
.logo-img { display: block; height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 12px; }
.nav-link { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.nav-link:hover { background: #f8fafc; }
.language-select {
    background: #f8fafc;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 8px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.hero { position: relative; padding: 96px 0 64px; border-bottom: none; background: linear-gradient(180deg, #f8fbff, #ffffff); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto -10%; height: 420px; background: radial-gradient(600px 260px at 20% 20%, rgba(37,99,235,0.12), rgba(255,255,255,0)); pointer-events: none; }
.hero::after { content: ""; position: absolute; right: -120px; top: -80px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(37,99,235,0.1), rgba(255,255,255,0)); filter: blur(2px); pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero-visual { width: 100%; height: 360px; border-radius: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; background: #0f172a; }
.hero-video { width: 100%; height: 100%; display: block; object-fit: cover; background: #0f172a; }
.hero-video-trigger {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    border: 0;
    border-radius: 999px;
    min-width: 180px;
    min-height: 180px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    animation: hero-play-pulse 1.8s ease-in-out infinite;
}
.hero-video-trigger:hover { background: rgba(15, 23, 42, 0.9); }
.hero-video-trigger-icon {
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 32px solid #ffffff;
    margin-left: 8px;
}
.hero-video-trigger[hidden] { display: none; }
@keyframes hero-play-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.08); }
}
.hero h1 { font-size: 46px; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p { margin: 0 0 16px; color: var(--muted); }
.hero .btn { margin-top: 8px; }

.features { padding: 40px 0; }
.features[data-reveal], .apply-info[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.features.revealed, .apply-info.revealed { opacity: 1; transform: translateY(0); }
.features-title { margin: 0 0 14px; font-size: 26px; letter-spacing: -0.01em; }
.features-title .accent { position: relative; display: inline-block; }
.features-title .accent::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 0; height: 16px; background: linear-gradient(90deg, rgba(16,185,129,0.5), rgba(16,185,129,0.28)); border-radius: 8px; z-index: -1; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { background: #ffffff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-sm); }
.feature-card .emoji { font-size: 24px; margin-bottom: 8px; }
.feature-card h3 { margin: 0 0 8px; font-size: 18px; }
.feature-card p { margin: 0; color: var(--muted); }

.apply-info { padding: 48px 0 32px; border-top: 1px solid rgba(15,23,42,0.06); background: linear-gradient(180deg,#f8fbff, #f8fafc); text-align: left; }
.apply-info h2, .apply-language h3, .eligibility h3 { text-align: left; }
.apply-info h2 { margin: 0 0 10px; font-size: 30px; letter-spacing: -0.01em; position: relative; display: inline-block; }
.apply-info h2::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 0; height: 14px; background: linear-gradient(90deg, rgba(37,99,235,0.45), rgba(37,99,235,0.22)); border-radius: 8px; z-index: -1; }
.apply-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.apply-head .apply-meta { margin: 0; }
.apply-note { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: #475569; padding: 10px 0 0; border-radius: 0; box-shadow: none; max-width: 820px; text-align: left; font-size: 14px; }
.apply-note-icon { width: 18px; height: 18px; border-radius: 4px; background: #e2e8f0; color: #334155; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.apply-note-text { margin: 0; }
.apply-meta { margin-top: 8px; margin-bottom: 10px; display: inline-flex; align-items: center; gap: 6px; color: #475569; background: #f1f5f9; border: 1px solid var(--border); padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.apply-meta .icon { font-size: 16px; }
.eligibility { margin-top: 24px; }
.eligibility h3 { margin: 0 0 10px; font-size: 18px; }
.eligibility-list { list-style: none; padding: 0; margin: 0; max-width: 820px; display: grid; grid-template-columns: 1fr; gap: 6px; }
.eligibility-list li { background: transparent; border: none; border-radius: 0; padding: 4px 0; color: #334155; box-shadow: none; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.eligibility h3 { font-size: 16px; color: #0f172a; }
.eligibility-list li::before { content: "✔"; color: #16a34a; font-weight: 700; }

.apply { padding: 28px 0; border-top: 1px solid var(--border); }
.apply-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.select-language { padding: 0; border-top: none; background: transparent; }
.apply-language { padding: 32px 0 60px; }
.apply-language h3 { margin-top: 16px; }
.select-sub { color: #64748b; margin: 8px 0 12px; font-size: 14px; }
.language-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 16px; }
.language-card { background: #ffffff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.language-card:hover { border-color: #cbd5e1; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08); }
.language-card input { accent-color: var(--primary); width: 18px; height: 18px; margin-right: 10px; }
.language-card .row { display: flex; align-items: center; gap: 10px; }
.language-card .label { font-weight: 600; letter-spacing: 0.2px; }
.language-card .badge { position: absolute; right: 12px; top: 12px; background: #eef2ff; color: #3730a3; font-weight: 600; font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid #c7d2fe; }
.language-help { display: none; }
.language-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12); background: #f8fbff; }
.select-sub { color: #64748b; margin: 4px 0 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px; border-radius: 10px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .08s ease, box-shadow .2s ease; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-primary:disabled { background: #cbd5e1; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #f8fafc; }
.btn-small { height: 36px; padding: 0 12px; border-radius: 8px; }
.btn:active { transform: translateY(1px); }

/* RTL (Arabic) overrides for Apply section */
html[dir="rtl"] .apply-info { text-align: right; }
html[dir="rtl"] .apply-info h2, html[dir="rtl"] .apply-language h3, html[dir="rtl"] .eligibility h3 { text-align: right; }
html[dir="rtl"] .apply-note { justify-content: flex-end; }
html[dir="rtl"] .apply-meta { margin-left: auto; }
html[dir="rtl"] .eligibility-list li { flex-direction: row-reverse; }

.site-footer { border-top: none; padding: 14px 0 22px; color: #64748b; background: transparent; }
.footer-inner { display: flex; align-items: center; justify-content: center; }

.footer-cta { background: linear-gradient(180deg, #ffffff, #f8fbff); border-top: none; padding: 40px 0 0; }
.footer-cta h2 { margin: 0 0 4px; }
.footer-cta-sub { margin: 0 0 16px; color: #475569; }
.footer-cta-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 420px)); justify-content: start; gap: 16px; }
.footer-cta-card { background: #ffffff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease; }
.footer-cta-card:hover { transform: translateY(-2px) scale(1.01); background: #f8fbff; border-color: #cbd5e1; box-shadow: var(--shadow); }
.footer-cta-card .icon { font-size: 20px; }
.footer-cta-head { font-weight: 600; margin-bottom: 2px; }
.footer-cta-note { color: #64748b; font-size: 14px; }

@media (max-width: 900px) {
    .footer-cta-grid { grid-template-columns: 1fr; }
}

/* Forms - page spacing */
.page-main { padding: 32px 16px 60px; padding-left: 24px; }
.form-desc { color: #475569; font-size: 14px; margin: 6px 0 12px; }

@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { height: 220px; }
    .hero-video-trigger { min-width: 132px; min-height: 132px; padding: 18px; font-size: 14px; gap: 8px; }
    .hero-video-trigger-icon { border-top-width: 14px; border-bottom-width: 14px; border-left-width: 24px; margin-left: 6px; }
    .features-grid { grid-template-columns: 1fr; }
    .apply-inner { flex-direction: column; align-items: flex-start; }
    .language-options { grid-template-columns: 1fr; }
}

/* Mobile header improvements */
@media (max-width: 640px) {
    .header-inner { height: auto; padding: 8px 0; gap: 8px; }
    .logo-img { height: 32px; }
    .nav { width: auto; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; align-items: center; }
    .language-select { flex: 0 0 auto; min-width: 110px; max-width: 130px; padding: 6px 8px; font-size: 14px; }
    .nav-link { white-space: nowrap; padding: 6px 8px; }
    .btn-small { height: 32px; padding: 0 8px; }
    /* Hide header CTA on small screens */
    .nav .btn-small.btn-primary { display: none; }
}


