:root {
    --primary: #1e40af;
    --primary-dark: #1e1b4b;
    --accent: #3b82f6;
    --bg: #f8fafc;
    --glass: rgba(255, 255, 255, 0.88);
    --border: rgba(255, 255, 255, 0.55);
    --card-shadow: 0 20px 40px -18px rgba(15, 23, 42, 0.14);
    --card-shadow-strong: 0 28px 55px -24px rgba(30, 64, 175, 0.28);
    --surface: rgba(255, 255, 255, 0.82);
    --surface-solid: #ffffff;
    --text-main: #1e293b;
    --text-soft: #64748b;
}

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

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--site-font);
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 35%),
        radial-gradient(circle at bottom right, rgba(30, 64, 175, 0.08), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, #f8fafc 55%, #f3f7fb 100%);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: rgba(59, 130, 246, 0.18);
    color: var(--primary-dark);
}

.container {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-intro {
    text-align: center;
    padding: 4rem 0 2.5rem;
}

.page-intro-title {
    font-size: clamp(2.3rem, 6vw, 3.6rem);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, var(--primary-dark), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-intro-text {
    max-width: 680px;
    margin: 1rem auto 0;
    color: var(--text-soft);
    font-size: 1.08rem;
    line-height: 1.8;
}

.site-footer {
    padding: 4rem 0;
    margin-top: 5rem;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
}

.footer-download {
    display: grid;
    justify-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-download-title {
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 800;
}

/* From Uiverse.io by Yaya12085 */
.playstore-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border: 2px solid #000;
    border-radius: 9999px;
    background-color: rgba(0, 0, 0, 1);
    padding: 0.625rem 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 1);
    outline: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
}

.playstore-button:hover {
    background-color: transparent;
    color: rgba(0, 0, 0, 1);
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
}

.playstore-button:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.42);
    outline-offset: 3px;
}

.icon {
    height: 1.5rem;
    width: 1.5rem;
    flex: 0 0 auto;
}

.texts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

.text-1 {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-2 {
    font-weight: 600;
    font-size: 1rem;
}

html[dir="rtl"] .texts {
    align-items: flex-start;
    text-align: right;
}

html[dir="ltr"] .texts {
    text-align: left;
}

#custom-cursor {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    mix-blend-mode: multiply;
    transition: transform 0.15s ease-out, opacity 0.2s ease-out;
    transform: translate(-50%, -50%);
    opacity: 0.45;
}

@media (hover: none), (pointer: coarse), (max-width: 768px), (prefers-reduced-motion: reduce) {
    #custom-cursor {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.navbar {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(92%, 1120px);
    background: var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 26px;
    z-index: 1000;
    padding: 0.8rem 1.3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.18rem;
    letter-spacing: -0.02em;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    box-shadow: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 1001;
    padding: 5px;
    min-width: 44px;
    min-height: 44px;
}

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

.nav-links {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 700;
    font-size: 0.95rem;
    transition: 0.25s ease;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(30, 64, 175, 0.08);
}

.nav-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: 0.25s ease;
    background: rgba(30, 64, 175, 0.08);
}

.nav-profile-link[hidden] {
    display: none !important;
}

.nav-profile-link:hover {
    color: var(--primary);
    background: rgba(30, 64, 175, 0.12);
}

.nav-profile-link .avatar {
    width: 1.7rem;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 800;
}

.lang-switch-btn,
.btn-main,
.submit-btn,
.btn {
    cursor: pointer;
}

.lang-switch-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 0.5rem 0.95rem;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(30, 64, 175, 0.18);
}

.btn-main,
.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-main {
    gap: 0.5rem;
    padding: 1.05rem 1.75rem;
    border: 1px solid transparent;
    border-radius: 18px;
    font-weight: 850;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 35px rgba(30, 64, 175, 0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary);
    border-color: rgba(30, 64, 175, 0.14);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.btn-main:hover,
.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    filter: saturate(1.02);
}

.btn-primary:hover {
    box-shadow: var(--card-shadow-strong);
}

.btn-secondary:hover {
    background: rgba(239, 246, 255, 0.95);
    border-color: rgba(59, 130, 246, 0.28);
    box-shadow: 0 16px 32px rgba(30, 64, 175, 0.14);
}

.btn-main:active,
.submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-main[aria-disabled="true"],
.btn-main.is-disabled,
.btn-main:disabled {
    cursor: not-allowed;
    pointer-events: none;
    color: #475569;
    background: #e2e8f0;
    border-color: #cbd5e1;
    box-shadow: none;
    filter: saturate(0.72);
    transform: none;
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
}

.section-heading p {
    color: var(--text-soft);
    font-size: 1.05rem;
    max-width: 720px;
    margin: 0 auto;
}

/* Arabic readability safeguards
   Large Arabic headings lose clarity when transparent gradient text,
   tight line-height, or negative letter spacing are applied. Keep the
   premium gradient treatment, but use safer Arabic metrics and contrast. */
html[lang="ar"],
html[dir="rtl"] {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body,
html[dir="rtl"] body {
    font-weight: 400;
}

html[lang="ar"] .page-intro-title,
html[lang="ar"] .hero h1,
html[lang="ar"] .portal-title,
html[lang="ar"] .join-hero h1,
html[lang="ar"] .news-header h1,
html[lang="ar"] .page-header h1,
html[lang="ar"] .voice-title,
html[lang="ar"] .event-title,
html[lang="ar"] h1.news-title,
html[dir="rtl"] .page-intro-title,
html[dir="rtl"] .hero h1,
html[dir="rtl"] .portal-title,
html[dir="rtl"] .join-hero h1,
html[dir="rtl"] .news-header h1,
html[dir="rtl"] .page-header h1,
html[dir="rtl"] .voice-title,
html[dir="rtl"] .event-title,
html[dir="rtl"] h1.news-title {
    color: var(--primary) !important;
    background:
        linear-gradient(
            135deg,
            #1e3a8a 0%,
            var(--primary) 46%,
            var(--accent) 100%
        ) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    letter-spacing: 0 !important;
    line-height: 1.28 !important;
    padding-block: 0.08em 0.14em;
    overflow: visible;
    text-shadow: none !important;
}

html[lang="ar"] .section-heading h2,
html[lang="ar"] .section-heading h3,
html[lang="ar"] .section-title,
html[lang="ar"] .card-body h3,
html[lang="ar"] .info-card h3,
html[lang="ar"] .path-card h2,
html[lang="ar"] .decision-panel h2,
html[lang="ar"] .choice-title,
html[lang="ar"] .news-title,
html[lang="ar"] .footer-download-title,
html[dir="rtl"] .section-heading h2,
html[dir="rtl"] .section-heading h3,
html[dir="rtl"] .section-title,
html[dir="rtl"] .card-body h3,
html[dir="rtl"] .info-card h3,
html[dir="rtl"] .path-card h2,
html[dir="rtl"] .decision-panel h2,
html[dir="rtl"] .choice-title,
html[dir="rtl"] .news-title,
html[dir="rtl"] .footer-download-title {
    letter-spacing: 0 !important;
    line-height: 1.35;
    overflow: visible;
}

html[lang="ar"] .nav-links a,
html[lang="ar"] .brand,
html[lang="ar"] .lang-switch-btn,
html[lang="ar"] .btn,
html[lang="ar"] .btn-main,
html[lang="ar"] .submit-btn,
html[lang="ar"] label,
html[lang="ar"] .field-label,
html[lang="ar"] .hero-badge,
html[lang="ar"] .portal-badge,
html[lang="ar"] .join-eyebrow,
html[lang="ar"] .path-badge,
html[lang="ar"] .event-status-badge,
html[lang="ar"] .status-badge,
html[lang="ar"] .badge-soft,
html[lang="ar"] .role-chip,
html[lang="ar"] .status-pill,
html[dir="rtl"] .nav-links a,
html[dir="rtl"] .brand,
html[dir="rtl"] .lang-switch-btn,
html[dir="rtl"] .btn,
html[dir="rtl"] .btn-main,
html[dir="rtl"] .submit-btn,
html[dir="rtl"] label,
html[dir="rtl"] .field-label,
html[dir="rtl"] .hero-badge,
html[dir="rtl"] .portal-badge,
html[dir="rtl"] .join-eyebrow,
html[dir="rtl"] .path-badge,
html[dir="rtl"] .event-status-badge,
html[dir="rtl"] .status-badge,
html[dir="rtl"] .badge-soft,
html[dir="rtl"] .role-chip,
html[dir="rtl"] .status-pill {
    letter-spacing: 0 !important;
    line-height: 1.45;
}

html[lang="ar"] .nav-links a,
html[dir="rtl"] .nav-links a {
    font-weight: 800;
}

@media (max-width: 1100px) {
    .navbar {
        width: min(94%, 1120px);
        padding: 0.75rem 1.05rem;
    }

    .nav-links {
        gap: 0.25rem;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.55rem 0.72rem;
    }

    .brand {
        font-size: 1.06rem;
    }
}

@media (min-width: 1440px) {
    .container {
        width: min(100%, 1240px);
        padding: 0 2rem;
    }

    .navbar {
        width: min(90%, 1180px);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .navbar {
        top: 12px;
        width: min(94%, 1120px);
        padding: 0.7rem 0.9rem;
        border-radius: 22px;
    }

    .brand {
        gap: 10px;
        font-size: 1rem;
    }

    .brand img {
        width: 38px;
        height: 38px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(86%, 340px);
        height: 100vh;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        padding: 1.6rem;
        gap: 1rem;
        transition: right 0.35s ease;
        box-shadow: -18px 0 44px rgba(15, 23, 42, 0.12);
    }

    .nav-links a,
    .lang-switch-btn {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.85rem 1rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .lang-switch-btn {
        padding: 0.85rem 1rem;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    #custom-cursor {
        display: none;
    }

    * {
        cursor: auto !important;
    }

    .container {
        padding: 0 1rem;
    }

    .page-intro {
        padding: 3rem 0 1.8rem;
    }

    .page-intro-title {
        font-size: clamp(2rem, 10vw, 2.9rem);
    }

    .page-intro-text {
        max-width: 680px;
        margin-inline: auto;
        font-size: 0.98rem;
        line-height: 1.75;
    }

    .section-heading {
        margin-bottom: 2rem;
    }

    .section-heading p {
        font-size: 0.98rem;
    }

    .site-footer {
        padding: 3rem 0;
        margin-top: 3.5rem;
    }
}
