/* ============================================================
   SANABIL MEDICAL ESTABLISHMENT — Brand Layer
   Corporate medical/laboratory components on top of the
   design system (sanabil-base.css + tailwind.generated.css).
   ============================================================ */

/* --- Bilingual toggling (global) --- */
html[lang="ar"] .sanabil-page .lang-en,
html[lang="ar"] .sanabil-page .label-en { display: none !important; }

html[lang="en"] .sanabil-page .lang-ar,
html[lang="en"] .sanabil-page .label-ar { display: none !important; }

html[lang="en"] .sanabil-page .lang-en { text-align: left; }
html[lang="en"] .sanabil-page .lang-en ul { padding-right: 0; padding-left: 2rem; }

/* --- Brand color utilities --- */
.text-accent { color: var(--accent, #0EA5A0) !important; }
.bg-accent { background-color: var(--accent, #0EA5A0) !important; }
.border-accent { border-color: var(--accent, #0EA5A0) !important; }
.text-accent-soft { color: var(--accent-soft, #0B8580) !important; }
.bg-navy { background-color: #0B2A4A !important; }
.bg-navy-deep { background-color: #071E36 !important; }
.bg-navy-mid { background-color: #174A73 !important; }
.text-navy { color: #0B2A4A !important; }
.border-navy { border-color: #0B2A4A !important; }

/* --- Logo --- */
.sanabil-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}
.sanabil-logo__mark {
    flex: 0 0 auto;
    width: 2.6rem;
    height: 2.6rem;
}
.sanabil-logo__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    line-height: 1.15;
}
.sanabil-logo__ar {
    font-weight: 800;
    font-size: 1.05rem;
}
.sanabil-logo__en {
    font-family: var(--font-en), sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* --- Section header system --- */
.sanabil-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent, #0EA5A0);
}
.sanabil-eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}
.sanabil-eyebrow--center::after {
    content: "";
    width: 1.75rem;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}
.sanabil-section-title {
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-main, #102A41);
    letter-spacing: -0.01em;
}
.sanabil-section-sub {
    color: var(--text-muted, #5B6B7A);
    font-size: 1.05rem;
    line-height: 1.9;
}

/* --- Home hero --- */
.sanabil-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 18%, rgba(23, 74, 115, 0.55), transparent 42%),
        radial-gradient(circle at 12% 85%, rgba(14, 165, 160, 0.16), transparent 40%),
        linear-gradient(160deg, #071E36 0%, #0B2A4A 55%, #174A73 100%);
    color: #ffffff;
    isolation: isolate;
}
.sanabil-hero__grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 30%, transparent 78%);
    mask-image: radial-gradient(circle at 50% 45%, #000 30%, transparent 78%);
}
.sanabil-hero__halo {
    position: absolute;
    inset: -30%;
    z-index: -1;
    background:
        conic-gradient(from 120deg at 70% 40%, rgba(14, 165, 160, 0.16), transparent 30%, rgba(23, 74, 115, 0.24) 55%, transparent 78%);
    filter: blur(40px);
    animation: sanabil-halo-float 26s ease-in-out infinite alternate;
}
@keyframes sanabil-halo-float {
    from { transform: translate3d(-2%, -1%, 0) rotate(0deg); }
    to   { transform: translate3d(2%, 1%, 0) rotate(4deg); }
}
.sanabil-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid rgba(14, 165, 160, 0.55);
    border-radius: 999px;
    background: rgba(14, 165, 160, 0.12);
    color: #4FD6D1;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
}
.sanabil-hero-title {
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.015em;
    color: #ffffff;
}
.sanabil-hero-title .lang-en {
    font-family: var(--font-en), sans-serif;
    font-weight: 700;
}
.sanabil-hero-lead {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.15rem;
    line-height: 2;
    max-width: 44rem;
}

/* --- Buttons --- */
.btn-sanabil {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 2.1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-sanabil:hover { transform: translateY(-2px); }
.btn-sanabil:focus-visible { outline: 3px solid rgba(14, 165, 160, 0.5); outline-offset: 3px; }
.btn-sanabil--teal { background: var(--teal, #0EA5A0); color: #ffffff; }
.btn-sanabil--teal:hover { box-shadow: 0 14px 30px rgba(14, 165, 160, 0.38); }
.btn-sanabil--navy { background: #0B2A4A; color: #ffffff; }
.btn-sanabil--navy:hover { box-shadow: 0 14px 30px rgba(11, 42, 74, 0.38); }
.btn-sanabil--ghost { border-color: rgba(255, 255, 255, 0.4); color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.btn-sanabil--ghost:hover { border-color: #0EA5A0; color: #4FD6D1; background: rgba(14, 165, 160, 0.12); }
.btn-sanabil--outline { border-color: #0B2A4A; color: #0B2A4A; background: transparent; }
.btn-sanabil--outline:hover { background: #0B2A4A; color: #ffffff; }

/* --- Cards --- */
.sanabil-card {
    background: var(--surface-strong, rgba(255, 255, 255, 0.95));
    border: 1px solid rgba(11, 42, 74, 0.08);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease, border-color 0.4s ease;
}
.sanabil-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(11, 42, 74, 0.1);
    border-color: rgba(14, 165, 160, 0.28);
}
.sanabil-card__body { padding: 1.5rem; }

/* --- Numbered badge --- */
.sanabil-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    background: rgba(14, 165, 160, 0.12);
    border: 1px solid rgba(14, 165, 160, 0.4);
    color: var(--teal-soft, #0B8580);
    font-weight: 800;
    font-size: 1.05rem;
    flex-shrink: 0;
}

/* --- Category tag --- */
.sanabil-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(11, 42, 74, 0.06);
    color: #0B2A4A;
    border: 1px solid rgba(11, 42, 74, 0.14);
}
.sanabil-tag--teal { background: rgba(14, 165, 160, 0.12); color: var(--teal-soft, #0B8580); border-color: rgba(14, 165, 160, 0.35); }
.sanabil-tag--soft { background: rgba(23, 74, 115, 0.1); color: #174A73; border-color: rgba(23, 74, 115, 0.22); }

/* --- Inline link --- */
.sanabil-link {
    font-weight: 700;
    color: #0B2A4A;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: color 0.25s ease, gap 0.25s ease;
}
.sanabil-link:hover { color: var(--teal, #0EA5A0); gap: 0.7rem; }

/* --- Icon tile (abstract cover / small icon) --- */
.sanabil-cover__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.9rem;
    background: rgba(14, 165, 160, 0.1);
    border: 1px solid rgba(14, 165, 160, 0.3);
    color: var(--teal-soft, #0B8580);
    font-size: 1.25rem;
    flex-shrink: 0;
}
.sanabil-cover__icon--sm { width: 3rem; height: 3rem; font-size: 1.05rem; border-radius: 0.75rem; }

/* --- Filter chips --- */
.sanabil-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.sanabil-filter {
    appearance: none;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    border: 1px solid rgba(11, 42, 74, 0.16);
    background: var(--surface-strong, rgba(255, 255, 255, 0.95));
    color: #102A41;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.sanabil-filter:hover { border-color: #0B2A4A; }
.sanabil-filter.is-active { background: var(--teal, #0EA5A0); color: #ffffff; border-color: var(--teal, #0EA5A0); }

/* --- Breadcrumbs --- */
.sanabil-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}
.sanabil-breadcrumb a { color: #8FD9D5; text-decoration: none; font-weight: 600; }
.sanabil-breadcrumb a:hover { color: #ffffff; }
.sanabil-breadcrumb .sep { opacity: 0.45; }

/* --- Inner page hero --- */
.sanabil-page-hero {
    position: relative;
    padding: clamp(7rem, 12vh, 9rem) 0 clamp(3rem, 6vh, 4.5rem);
    background:
        radial-gradient(circle at 80% 20%, rgba(23, 74, 115, 0.5), transparent 45%),
        linear-gradient(155deg, #071E36 0%, #0B2A4A 58%, #174A73 100%);
    color: #ffffff;
    overflow: hidden;
}
.sanabil-page-hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 52px 52px;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%);
    mask-image: linear-gradient(180deg, #000, transparent 90%);
}
.sanabil-page-hero__glow {
    position: absolute;
    inset: -30%;
    background:
        conic-gradient(from 140deg at 70% 40%, rgba(14, 165, 160, 0.14), transparent 34%, rgba(23, 74, 115, 0.22) 58%, transparent 80%);
    filter: blur(50px);
    animation: sanabil-halo-float 30s ease-in-out infinite alternate;
}

/* --- CTA band --- */
.sanabil-cta-band {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    padding: clamp(3rem, 7vw, 5rem);
    background:
        radial-gradient(circle at 85% 20%, rgba(14, 165, 160, 0.3), transparent 40%),
        linear-gradient(150deg, #071E36 0%, #0B2A4A 60%, #174A73 100%);
    color: #ffffff;
    text-align: center;
}
.sanabil-cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: 0.5;
}
.sanabil-cta-band--tight { border-radius: 1.25rem; padding: 2rem; }

/* --- Partner tile --- */
.sanabil-partner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    min-height: 11rem;
    padding: 1.6rem;
    border-radius: 1rem;
    border: 1px dashed rgba(11, 42, 74, 0.18);
    background: var(--surface-strong, rgba(255, 255, 255, 0.95));
    text-align: center;
    transition: border-color 0.3s ease, transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}
.sanabil-partner:hover { border-color: var(--teal, #0EA5A0); transform: translateY(-3px); box-shadow: 0 18px 36px rgba(11, 42, 74, 0.08); }
.sanabil-partner__link { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.sanabil-partner__name { font-weight: 700; color: #0B2A4A; font-size: 0.98rem; }
.sanabil-partner__meta { font-size: 0.78rem; color: var(--text-muted, #5B6B7A); }
.sanabil-partner__logo {
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.4rem;
}
.sanabil-partner__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0.15);
    transition: filter 0.3s ease, transform 0.3s ease;
}
.sanabil-partner:hover .sanabil-partner__logo img { filter: grayscale(0); transform: scale(1.04); }
.sanabil-partner--card { border-style: solid; border-color: rgba(11, 42, 74, 0.1); }
.sanabil-partner__logo--card { width: 5.5rem; height: 5.5rem; margin: 0 auto 0.4rem; }

/* --- Dark card (Why Sanabil) --- */
.sanabil-dark-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    transition: transform 0.35s var(--ease-out-expo), border-color 0.35s ease, background-color 0.35s ease;
}
.sanabil-dark-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 160, 0.5);
    background: rgba(255, 255, 255, 0.08);
}
.sanabil-dark-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.8rem;
    background: rgba(14, 165, 160, 0.16);
    border: 1px solid rgba(14, 165, 160, 0.4);
    color: #4FD6D1;
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

/* --- Customer journey --- */
.sanabil-journey {
    position: relative;
    border: 1px solid rgba(11, 42, 74, 0.08);
    border-radius: 1rem;
    padding: 1.5rem;
    background: var(--surface-strong, rgba(255, 255, 255, 0.95));
    transition: transform 0.35s var(--ease-out-expo), border-color 0.35s ease, box-shadow 0.35s ease;
}
.sanabil-journey:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 160, 0.3);
    box-shadow: 0 20px 40px rgba(11, 42, 74, 0.1);
}
.sanabil-journey__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: var(--teal, #0EA5A0);
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* --- Product card --- */
.sanabil-product-card { height: 100%; }
.sanabil-product-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: linear-gradient(150deg, #F1F7F8 0%, #E4EFF0 100%);
    border-bottom: 1px solid rgba(11, 42, 74, 0.08);
    overflow: hidden;
}
.sanabil-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.25rem;
    transition: transform 0.45s var(--ease-out-expo);
}
.sanabil-product-card:hover .sanabil-product-card__img { transform: scale(1.05); }
.sanabil-product-card__tag {
    position: absolute;
    top: 0.85rem;
    inset-inline-start: 0.85rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
}

/* --- Product gallery (detail) --- */
.sanabil-product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(150deg, #F1F7F8 0%, #E4EFF0 100%);
    padding: 2rem;
}
.sanabil-product-gallery__img {
    width: 100%;
    max-width: 30rem;
    max-height: 24rem;
    object-fit: contain;
}

/* --- Prose & lists --- */
.sanabil-prose { color: var(--text-main, #102A41); line-height: 2; font-size: 1.04rem; }
.sanabil-prose h2, .sanabil-prose h3 { font-weight: 800; color: #0B2A4A; margin: 2rem 0 0.9rem; line-height: 1.4; }
.sanabil-prose h2 { font-size: 1.6rem; }
.sanabil-prose h3 { font-size: 1.3rem; }
.sanabil-prose p { margin-bottom: 1.2rem; }

.sanabil-list { list-style: none; display: grid; gap: 0.6rem; margin: 0; padding: 0; }
.sanabil-list li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    border-radius: 0.7rem;
    background: rgba(11, 42, 74, 0.04);
    line-height: 1.75;
}
.sanabil-list li::before {
    content: "";
    flex: 0 0 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.6rem;
    border-radius: 999px;
    background: #0B2A4A;
}
.sanabil-list--teal li::before { background: var(--teal, #0EA5A0); }

/* --- Forms --- */
.sanabil-field { width: 100%; }
.sanabil-field label { display: block; font-size: 0.85rem; font-weight: 700; color: #0B2A4A; margin-bottom: 0.4rem; }
.sanabil-field input,
.sanabil-field select,
.sanabil-field textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(11, 42, 74, 0.16);
    background: var(--surface-strong, #fff);
    color: #102A41;
    font-family: inherit;
    font-size: 0.98rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.sanabil-field input:focus,
.sanabil-field select:focus,
.sanabil-field textarea:focus {
    outline: none;
    border-color: var(--teal, #0EA5A0);
    box-shadow: 0 0 0 4px rgba(14, 165, 160, 0.12);
}

/* --- Footer --- */
.sanabil-footer {
    position: relative;
    z-index: 20;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 2.5rem;
    border-top-right-radius: 2.5rem;
    background:
        radial-gradient(circle at 85% 15%, rgba(23, 74, 115, 0.4), transparent 45%),
        linear-gradient(150deg, #071E36 0%, #0B2A4A 100%);
    color: #ffffff;
}
.sanabil-footer a { text-decoration: none; }
.sanabil-footer .sanabil-logo__ar { color: #ffffff; }
.sanabil-footer .sanabil-logo__en { color: rgba(255, 255, 255, 0.72); }

/* --- English (LTR) adjustments --- */
html[dir="ltr"] header#navbar > nav.pill-nav-shell { direction: ltr; }
html[dir="ltr"] .sanabil-hero .lang-en, html[dir="ltr"] .sanabil-page-hero .lang-en { text-align: left; }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .sanabil-hero__halo, .sanabil-page-hero__glow { animation: none; }
    .sanabil-card, .sanabil-dark-card, .sanabil-journey, .sanabil-partner { transition: none; }
    .sanabil-card:hover, .sanabil-dark-card:hover, .sanabil-journey:hover, .sanabil-partner:hover { transform: none; }
}

/* --- Nav tightening between tablet and wide desktop --- */
@media (min-width: 768px) and (max-width: 1279px) {
    header#navbar .pill,
    header#navbar .pill-list > li > a:not(.pill) { min-width: 0; padding: 0 0.8rem; font-size: 0.72rem; }
    header#navbar .pill-cta { display: none !important; }
    header#navbar .pill-nav-items { max-width: 70vw; }
    header#navbar .pill-list { gap: 1px; }
}

@media (max-width: 767px) {
    .sanabil-logo__text { display: none !important; }
}