:root {
    --color-steel: #3d5470;
    --color-royal: #6b4580;
    --color-cyan: #5eead4;
    --color-magenta: #c084fc;
    --color-bronze: #b08968;
    --color-ink: #152033;
    --header-h: 4.65rem;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

html[dir="rtl"] {
    font-family: Almarai, "Segoe UI", Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

html[dir="ltr"] {
    font-family: Inter, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: inherit;
    line-height: 1.7;
}

.font-almarai {
    font-family: Almarai, "Segoe UI", Tahoma, sans-serif;
}

.font-inter {
    font-family: Inter, "Segoe UI", sans-serif;
}

.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;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 2;
    grid-row: 1;
    grid-column: 1;
}

.brand-logo-wrap {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.18), transparent 55%);
    box-shadow:
        0 8px 22px rgba(192, 132, 252, 0.28),
        0 0 0 3px rgba(94, 234, 212, 0.22);
}

.brand-logo {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 50%;
}

.brand-name {
    font-weight: 800;
    font-size: 1.02rem;
    color: #fff;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 8px rgba(21, 32, 51, 0.35);
}

.brand-lockup--dark .brand-name {
    color: var(--color-steel);
    text-shadow: none;
}

.brand-float {
    display: none;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    min-height: var(--header-h);
    background: linear-gradient(90deg, rgba(21, 32, 51, 0.72), rgba(107, 69, 128, 0.55));
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    border-bottom: 1px solid rgba(94, 234, 212, 0.18);
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-scrolled {
    background: linear-gradient(90deg, rgba(21, 32, 51, 0.94), rgba(84, 50, 101, 0.9));
    box-shadow: 0 12px 40px rgba(21, 32, 51, 0.32);
}

.site-header__inner {
    max-width: 72rem;
    margin: 0 auto;
    min-height: var(--header-h);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem 0.9rem;
    padding: 0.55rem 1rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    font-size: 0.88rem;
    font-weight: 700;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--color-cyan);
}

.site-header__tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    justify-self: end;
    grid-row: 1;
    grid-column: 3;
}

.lang-switch {
    appearance: none;
    border-radius: 999px;
    border: 1px solid rgba(94, 234, 212, 0.28);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
}

.lang-switch option {
    color: var(--color-ink);
}

.academy-chip {
    display: none;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(107, 69, 128, 0.7), rgba(192, 132, 252, 0.55));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.7rem;
    box-shadow: 0 0 14px rgba(94, 234, 212, 0.25);
}

.page-inner .site-main {
    padding-top: 7.4rem;
}

.page-home .site-main {
    padding-top: 0;
}

.site-footer {
    background: linear-gradient(90deg, var(--color-ink), var(--color-royal));
    color: #e8ecef;
    border-top: 1px solid rgba(94, 234, 212, 0.14);
}

.site-footer__inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.site-footer__nav a {
    color: var(--color-cyan);
    text-decoration: none;
}

.site-footer__copy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 767px) {
    body {
        padding-bottom: 4.75rem;
    }

    .brand-logo,
    .brand-logo-wrap {
        width: 48px;
        height: 48px;
    }

    .brand-float {
        display: grid;
        place-items: center;
        position: fixed;
        inset-inline-end: 0.85rem;
        bottom: 0.85rem;
        z-index: 55;
        width: 58px;
        height: 58px;
        border-radius: 50%;
        background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.2), rgba(21, 32, 51, 0.2));
        box-shadow:
            0 10px 28px rgba(107, 69, 128, 0.4),
            0 0 0 3px rgba(94, 234, 212, 0.45);
    }

    .brand-float img {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        object-fit: cover;
    }

    .lms-classroom-page .brand-float {
        display: none;
    }
}

@media (min-width: 768px) {
    .site-header__inner {
        grid-template-columns: auto 1fr auto;
        padding: 0 1rem;
    }

    .site-nav {
        grid-column: 2;
        grid-row: 1;
        overflow: visible;
        padding-bottom: 0;
        gap: 1.25rem;
        justify-content: center;
    }

    .page-inner .site-main {
        padding-top: var(--header-h);
    }

    .academy-chip {
        display: inline;
    }

    .site-footer__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.lms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-royal), var(--color-magenta));
    color: #fff;
    font-weight: 800;
    padding: 0.7rem 1.15rem;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}
    html {
        scroll-behavior: auto;
    }

    .mag-btn,
    .lms-btn,
    .studio-btn {
        transform: none !important;
    }
}
