/* Cairo (Arabic) + Inter (English) loaded via Google Fonts in inc/head.php.
   Modern bento / gradient-mesh language on purpose: soft elevated cards,
   gradient icon tiles and blurred brand-color blobs — not thin hairline
   editorial panels. Palette: brand navy #001871 (Dr. Bader Medlink's brand
   color) with lighter tints for accents — the "--gold-*" variable names are
   historical (an earlier teal accent) but now hold the navy scale. */

:root {
    --brand-500: #2569c9;
    --brand-600: #1a52ab;
    --brand-700: #123f8c;
    --brand-900: #001871;
    --ink-950: #050b1e;
    --gold-400: #7fa9e6;
    --gold-500: #2569c9;
    --gold-600: #123f8c;
    --ink-900: #12141c;
    --ink-700: #454b57;
}

* { scroll-behavior: smooth; }

html, body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink-900);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Dark gradient sections ---------- */

.section-dark {
    position: relative;
    background: radial-gradient(900px 500px at 12% 0%, rgba(37,105,201,.5), transparent 55%),
                radial-gradient(700px 500px at 100% 100%, rgba(26,82,171,.35), transparent 55%),
                linear-gradient(160deg, var(--ink-950), #081335 55%, var(--ink-950));
    color: rgba(255,255,255,.82);
    overflow: hidden;
}

/* Soft blurred brand-color blobs, standing in for the brand's geometric
   identity graphic — a diffuse gradient mesh rather than thin line-art. */
.blob-motif {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.blob-motif .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
}
.blob-motif .blob.on-light { opacity: .16; }

.hairline {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37,105,201,.4), transparent);
}
.hairline-solid { height: 1px; background: rgba(18,20,28,.08); }

/* ---------- Pill eyebrow badge ---------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gold-600);
    background: rgba(37,105,201,.09);
    border: 1px solid rgba(37,105,201,.16);
    padding: 8px 18px 8px 10px;
    border-radius: 999px;
}
[dir="rtl"] .eyebrow { padding: 8px 10px 8px 18px; }
.eyebrow::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--gold-500);
    flex-shrink: 0;
}
.eyebrow.on-dark { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.eyebrow.on-dark::before { background: #fff; }

/* Large quiet background numerals — used sparingly for stepper/list index */
.num-mark {
    font-weight: 300;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(37,105,201,.5);
}

/* ---------- Buttons — bold rounded pills ---------- */

.btn-gold {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-900));
    color: #fff;
    border-radius: 999px;
    transition: transform .2s ease;
}
.btn-gold:hover { transform: translateY(-2px); }

.btn-outline {
    border: 1.5px solid rgba(18,20,28,.15);
    border-radius: 999px;
    color: var(--ink-700);
    transition: all .2s ease;
}
.btn-outline:hover { border-color: var(--gold-500); color: var(--gold-600); background: rgba(37,105,201,.06); }

.btn-gold-outline {
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.06);
    transition: all .2s ease;
}
.btn-gold-outline:hover { background: rgba(255,255,255,.16); border-color: #fff; }

.btn-blue {
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    border-radius: 999px;
    transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.btn-blue:hover { transform: translateY(-1.5px); }

/* ---------- Elevated cards (replace flat hairline panels) ---------- */

.panel {
    border: 1px solid rgba(18,20,28,.1);
    border-radius: 22px;
    background: #fff;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .28s ease;
}
.panel:hover {
    transform: translateY(-5px);
    border-color: rgba(37,105,201,.4);
}

/* Same elevated-card look without the hover lift — for static containers
   like the contact form and map, where a floating motion feels janky. */
.panel-static {
    border: 1px solid rgba(18,20,28,.1);
    border-radius: 22px;
    background: #fff;
}

.corner-frame { position: relative; }

/* Gradient icon tile — used everywhere an icon needs to feel like product art */
.icon-mark {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-900));
    color: #fff;
}
.icon-mark.on-dark { background: rgba(255,255,255,.14); }
.icon-mark.sm { width: 40px; height: 40px; border-radius: 12px; }

/* Frosted glass stat card, used floating over the hero visual */
.glass-card {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 20px;
}

/* ---------- Scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Nav — sticky glass bar ---------- */

.nav-link {
    position: relative;
    color: var(--ink-700);
    letter-spacing: .01em;
    transition: color .2s ease;
    padding-bottom: 4px;
}
.nav-link::after {
    content: '';
    position: absolute; right: 0; left: 0; bottom: 0;
    height: 2px; border-radius: 2px; background: var(--gold-500);
    transform: scaleX(0); transform-origin: center;
    transition: transform .25s ease;
}
.nav-link:hover { color: var(--brand-700); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--gold-600); }
.nav-link.is-active::after { transform: scaleX(1); }

header.is-scrolled { border-bottom-color: rgba(18,20,28,.12); }

/* Language switcher dropdown */
.lang-trigger {
    display: flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 14px;
    border: 1px solid rgba(18,20,28,.12);
    border-radius: 999px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
    color: var(--ink-700);
    transition: border-color .2s ease, color .2s ease;
}
.lang-trigger:hover { border-color: var(--gold-500); color: var(--gold-600); }
.lang-trigger svg.chev { transition: transform .2s ease; }
[data-lang-dropdown].is-open .lang-trigger svg.chev { transform: rotate(180deg); }

.lang-menu {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 10px);
    min-width: 160px;
    background: #fff;
    border: 1px solid rgba(18,20,28,.14);
    border-radius: 16px;
    padding: 6px;
    z-index: 60;
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
[data-lang-dropdown].is-open .lang-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity .2s ease, transform .22s ease;
}
.lang-menu-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13.5px; font-weight: 600;
    color: var(--ink-700);
    transition: background-color .14s ease, color .14s ease;
}
.lang-menu-item:hover { background: rgba(37,105,201,.1); color: var(--brand-700); }
.lang-menu-item.is-active { color: var(--gold-600); }

/* ---------- Mobile menu ---------- */
/* Scoped under the same "lg" breakpoint as the Tailwind `lg:hidden` utility
   on #mobileMenu itself. Without this media guard, the unconditional
   `#mobileMenu { display: grid }` below (an ID selector) outranks Tailwind's
   `.lg\:hidden { display: none }` (a class selector) on specificity alone,
   so the collapsed menu never actually hides on desktop — it sits there at
   its collapsed-but-nonzero height, inflating the header. */
@media (max-width: 1023.98px) {
    #mobileMenu {
        display: grid;
        grid-template-rows: minmax(0, 0fr);
        min-height: 0;
        opacity: 0;
        transition: grid-template-rows .42s cubic-bezier(.4,0,.2,1), opacity .24s ease;
    }
    #mobileMenu > * { overflow: hidden; min-height: 0; }
    #mobileMenu.is-open {
        grid-template-rows: minmax(0, 1fr);
        opacity: 1;
        transition: grid-template-rows .42s cubic-bezier(.4,0,.2,1), opacity .3s ease .06s;
    }
}
.mobile-menu-item {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .3s ease, transform .3s ease;
}
#mobileMenu.is-open .mobile-menu-item { opacity: 1; transform: translateY(0); }
#mobileMenu.is-open .mobile-menu-item:nth-child(1) { transition-delay: .07s; }
#mobileMenu.is-open .mobile-menu-item:nth-child(2) { transition-delay: .12s; }
#mobileMenu.is-open .mobile-menu-item:nth-child(3) { transition-delay: .17s; }
#mobileMenu.is-open .mobile-menu-item:nth-child(4) { transition-delay: .22s; }
#mobileMenu.is-open .mobile-menu-item:nth-child(5) { transition-delay: .27s; }

#mobileMenuToggle .bar {
    display: block;
    width: 22px; height: 1.5px;
    background: currentColor;
    transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .2s ease;
}
#mobileMenuToggle .bar + .bar { margin-top: 6px; }
#mobileMenuToggle.is-active .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
#mobileMenuToggle.is-active .bar:nth-child(2) { opacity: 0; }
#mobileMenuToggle.is-active .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Misc ---------- */

.stat-num { font-variant-numeric: tabular-nums; }

/* Connected-card process stepper: a gradient line running behind numbered,
   filled circles (replaces the old thin hairline + hollow dot timeline). */
.stepper-track { position: relative; }
.stepper-track .hairline {
    position: absolute; top: 26px; left: 8%; right: 8%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(37,105,201,.45), transparent);
}
.stepper-dot {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-900));
    color: #fff;
    font-family: inherit; font-weight: 700; font-size: 15px;
    border: 4px solid #fff;
}

/* Boxed form fields (replace underline-only inputs) */
.input-field {
    width: 100%;
    border: 2px solid rgba(18,20,28,.16);
    border-radius: 14px;
    background: #fff;
    padding: 12px 16px;
    transition: border-color .2s ease;
}
.input-field:focus {
    outline: none;
    border-color: var(--gold-500);
}
