/* ============================================================
   Landing 3D — dark-luxury redesign of the public landing page.
   Loaded only by index.php, after style.css + ui-ux-pro-max.css,
   so it repaints the marketing page without touching the panel.
   The palette still reads the theme's own variables (--primary-rgb,
   --hero-*, --grad-brand) so the admin's palette re-tints the whole
   dark canvas; --lx-* are the fixed signature accents.
   ============================================================ */
:root {
    --lx-bg:        #050b13;
    --lx-bg-2:      #080f1a;
    --lx-panel:     rgba(255, 255, 255, 0.055);
    --lx-panel-2:   rgba(255, 255, 255, 0.09);
    --lx-border:    rgba(148, 200, 232, 0.14);
    --lx-border-hi: rgba(148, 200, 232, 0.32);
    --lx-ink:       #eaf2fb;
    --lx-ink-2:     #c3d3e4;
    --lx-muted:     #93a8bd;
    --lx-line:      rgba(148, 200, 232, 0.10);
    --lx-cyan:      #67e8f9;
    --lx-shadow:    0 26px 60px -34px rgba(0, 0, 0, 0.95);
    --lx-inner:     inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --nav-height:   64px;
    --progress-origin: right center;
}

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

body {
    background: var(--lx-bg);
    color: var(--lx-ink-2);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 { color: var(--lx-ink); }

.hero > .container,
.stats-section > .container,
.section-padding > .container { max-width: 1180px; }

/* ============================================================
   Preloader — brand mark + progress, fades once the scene is live.
   aria-hidden and pure decoration: it never gates content, and the
   noscript rule below hides it for non-JS clients/crawlers.
   ============================================================ */
.preloader {
    position: fixed; inset: 0; z-index: 3000;
    display: grid; place-items: center;
    background:
        radial-gradient(900px 500px at 50% 30%, rgba(var(--primary-rgb), 0.28), transparent 65%),
        linear-gradient(160deg, var(--hero-1), var(--lx-bg) 70%);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-mark {
    width: 78px; height: 78px; margin: 0 auto 1.6rem;
    border-radius: 22px;
    background: var(--grad-brand);
    display: grid; place-items: center;
    color: #fff; font-size: 2rem;
    box-shadow: 0 18px 40px -16px rgba(var(--primary-rgb), 0.9);
    animation: pl-pulse 2.2s ease-out infinite;
}
@keyframes pl-pulse {
    0%   { box-shadow: 0 18px 40px -16px rgba(var(--primary-rgb), 0.9), 0 0 0 0 rgba(var(--primary-rgb), 0.45); }
    70%  { box-shadow: 0 18px 40px -16px rgba(var(--primary-rgb), 0.9), 0 0 0 30px rgba(var(--primary-rgb), 0); }
    100% { box-shadow: 0 18px 40px -16px rgba(var(--primary-rgb), 0.9), 0 0 0 0 rgba(var(--primary-rgb), 0); }
}
.preloader-word { font-weight: 800; font-size: 1.05rem; color: var(--lx-ink); letter-spacing: 0.02em; margin-bottom: 1.5rem; }
.preloader-bar {
    width: 230px; max-width: 62vw; height: 4px; margin: 0 auto;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}
.preloader-fill {
    display: block; height: 100%; width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary-light), var(--hero-accent2));
    box-shadow: 0 0 14px rgba(var(--primary-rgb), 0.8);
    transition: width 0.24s ease;
}
.preloader-pct {
    margin-top: 0.95rem; font-size: 0.78rem; color: var(--lx-muted);
    font-variant-numeric: tabular-nums; letter-spacing: 0.14em;
}

/* ============================================================
   Scroll progress hairline
   ============================================================ */
.scroll-progress {
    position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 1000;
    background: linear-gradient(90deg, var(--primary-light), var(--hero-accent2));
    transform: scaleX(0); transform-origin: var(--progress-origin, right center);
    pointer-events: none; will-change: transform;
    box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.7);
}

/* ============================================================
   Navbar — frosted dark glass, dark in both states now
   ============================================================ */
.main-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 999;
    padding: 0.3rem 0;
    background: rgba(4, 9, 17, 0.5);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid var(--lx-line);
    transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.main-nav.scrolled {
    background: rgba(4, 9, 17, 0.88);
    border-bottom-color: var(--lx-border);
    box-shadow: 0 14px 34px -22px #000;
    padding: 0;
}
.main-nav .nav-link {
    color: rgba(234, 242, 251, 0.82); font-weight: 600;
    padding: 0.5rem 0.85rem; font-size: 0.95rem; position: relative;
    transition: color 0.15s ease;
}
.main-nav .nav-link::after {
    content: ''; position: absolute; inset-inline: 0.85rem; bottom: 0.2rem; height: 2px;
    background: var(--hero-accent2); border-radius: 2px;
    transform: scaleX(0); transform-origin: center; transition: transform 0.22s ease;
    box-shadow: 0 0 8px var(--hero-accent2);
}
.main-nav .nav-link:hover::after,
.main-nav .nav-link:focus-visible::after { transform: scaleX(1); }
.main-nav .nav-link:hover, .main-nav .nav-link:focus-visible { color: #fff; }
.main-nav .btn-login {
    background: var(--grad-brand); color: white !important;
    border: 1px solid transparent;
    border-radius: var(--radius-sm); padding: 0.55rem 1.25rem !important;
    font-weight: 700; transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 22px -10px rgba(var(--primary-rgb), 0.9);
}
.main-nav .btn-login:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 12px 28px -10px rgba(var(--primary-rgb), 1); }
.main-nav .btn-hamburger { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.main-nav .btn-hamburger:hover { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: #fff; }
.brand-mark {
    width: 40px; height: 40px;
    background: var(--grad-brand);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.15rem;
    box-shadow: 0 6px 18px -6px rgba(var(--primary-rgb), 0.85);
}
.brand-name { font-weight: 800; font-size: 1.1rem; color: #fff; }

/* Mobile offcanvas inherits the dark field */
.offcanvas {
    background: linear-gradient(165deg, var(--hero-2), var(--lx-bg) 78%);
    color: var(--lx-ink);
    border-inline-start: 1px solid var(--lx-border);
}
.offcanvas .offcanvas-title { color: #fff; }
.offcanvas .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.offcanvas .list-group-item {
    background: transparent; color: var(--lx-ink-2);
    border-color: var(--lx-line); font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}
.offcanvas .list-group-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
/* .text-primary resolves to --primary, which sits near 3.2:1 against the dark
   canvas — too low for a link a keyboard user has to find. The theme's own light
   tone keeps it on-palette and legible. */
.offcanvas .text-primary { color: var(--primary-light) !important; }

/* ============================================================
   Hero — deep field, drifting blooms, aurora points on canvas
   ============================================================ */
.hero {
    display: flex; align-items: center;
    /* Clamped to ~65vh rather than 90: the hero is a landing band, not a
       full-screen gate, and the stats/services it introduces should be
       reachable with one scroll instead of a long empty descent.       */
    min-height: clamp(500px, 64vh, 660px);
    perspective: 1500px;
    perspective-origin: 50% 40%;
    background:
        radial-gradient(1100px 620px at 84% -14%, rgba(var(--primary-rgb), 0.45), transparent 62%),
        radial-gradient(900px 520px at 4% 116%, rgba(var(--primary-rgb), 0.24), transparent 60%),
        linear-gradient(152deg, var(--hero-1) 0%, var(--hero-2) 46%, var(--hero-3) 100%),
        /* Fade into the stats band's own opening tone so the two dark fields meet
           without a seam — the band below starts from --hero-3 as well. */
        linear-gradient(180deg, rgba(5, 11, 19, 0) 60%, var(--hero-3) 100%);
    position: relative;
    padding: calc(var(--nav-height, 64px) + 1.2rem) 0 2.4rem;
    overflow: hidden;
}
.hero::before, .hero::after {
    content: ''; position: absolute; border-radius: 50%;
    filter: blur(80px); pointer-events: none; z-index: 0;
}
.hero::before {
    width: 480px; height: 480px; top: -150px; left: 10%;
    background: rgba(var(--primary-rgb), 0.32);
    animation: hero-drift 22s ease-in-out infinite alternate;
}
.hero::after {
    width: 400px; height: 400px; bottom: -170px; right: 6%;
    background: rgba(var(--primary-rgb), 0.24);
    animation: hero-drift 28s ease-in-out infinite alternate-reverse;
}
@keyframes hero-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(60px, -44px, 0) scale(1.16); }
}

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#hero3d { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero-bg svg.ecg { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 96px; opacity: 0.34; }
.hero-bg .ecg-line {
    fill: none; stroke: var(--hero-accent); stroke-width: 3; stroke-linecap: round;
    stroke-dasharray: 1; stroke-dashoffset: 1;
    filter: drop-shadow(0 0 6px rgba(var(--primary-rgb), 0.9));
    animation: ecg-trace 7s linear infinite;
}
.hero-bg .ecg-glow {
    fill: none; stroke: var(--hero-accent2); stroke-width: 8; stroke-linecap: round;
    stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0.4;
    filter: blur(6px);
    animation: ecg-trace 7s linear infinite;
}
@keyframes ecg-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: -1; } }
.hero-bg .glyph {
    position: absolute; color: rgba(var(--primary-rgb), 0.2);
    animation: glyph-float 14s ease-in-out infinite alternate;
}
@keyframes glyph-float {
    from { transform: translateY(0) rotate(0deg); }
    to   { transform: translateY(-26px) rotate(6deg); }
}
.hero > .container { position: relative; z-index: 1; }

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: rgba(var(--primary-rgb), 0.16); color: var(--hero-tint);
    border: 1px solid rgba(var(--primary-rgb), 0.42);
    padding: 0.28rem 0.85rem; border-radius: var(--radius-pill);
    font-weight: 700; font-size: 0.74rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 24px -8px rgba(var(--primary-rgb), 0.5);
}
.hero-eyebrow i { color: var(--hero-accent2); }
.hero-title {
    font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; color: #fff;
    line-height: 1.18; margin: 0.55rem 0 0.5rem; letter-spacing: -0.015em;
}
.hero-title span {
    background: linear-gradient(96deg, var(--hero-tint), var(--hero-accent2) 52%, var(--hero-accent3));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    text-shadow: 0 0 40px rgba(var(--primary-rgb), 0.35);
}
.hero-title .mask { display: block; overflow: hidden; }
.hero-title .mask > span {
    display: block; padding: 0.14em 0; margin: -0.14em 0;
    animation: line-rise 0.85s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}
.hero-title .mask:nth-of-type(2) > span { animation-delay: 0.11s; }
@keyframes line-rise {
    from { opacity: 0; transform: translate3d(0, 115%, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.hero-desc { font-size: 0.98rem; color: var(--lx-ink-2); line-height: 1.75; margin-bottom: 0.9rem; max-width: 52ch; }
.hero-copy > * { animation: copy-rise 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; }
.hero-copy > *:nth-child(1) { animation-delay: 0.02s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.10s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.34s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.42s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.50s; }
@keyframes copy-rise {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.btn-hero {
    background: var(--grad-brand); color: white;
    padding: 0.62rem 1.5rem; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.92rem;
    border: none; transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
    box-shadow: 0 12px 30px -12px rgba(var(--primary-rgb), 0.95);
}
.btn-hero:hover {
    color: white; transform: translateY(-2px); filter: brightness(1.08);
    box-shadow: 0 18px 38px -12px rgba(var(--primary-rgb), 1);
}
.btn-hero-outline {
    background: rgba(255, 255, 255, 0.06); color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    padding: 0.62rem 1.25rem; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.92rem;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem;
    backdrop-filter: blur(8px);
}
.btn-hero-outline:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; color: #fff; transform: translateY(-2px); }

/* The clinic photograph becomes a floating glass plate. */
.hero-figure-col {
    transform-style: preserve-3d;
    translate: 0 var(--parallax-y, 0px);
    animation: card-tilt-in 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
    animation-delay: 0.15s;
}
@keyframes card-tilt-in {
    from { opacity: 0; transform: perspective(900px) rotateY(16deg) translate3d(40px, 14px, 0); }
    to   { opacity: 1; transform: none; }
}
.hero-figure {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
    will-change: transform;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 72px -32px rgba(0, 0, 0, 0.9), var(--lx-inner);
    padding: 0.45rem;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    overflow: hidden;
}
.hero-figure::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 45%);
}
.hero-figure img {
    display: block; width: 100%; height: auto;
    border-radius: calc(var(--radius-lg) - 5px);
    aspect-ratio: 16 / 9; object-fit: cover; max-height: 250px;
}
.hero-figure-tag {
    position: absolute; bottom: 1rem; inset-inline-end: 1rem;
    transform: translate3d(0, 0, 38px);
    background: rgba(4, 9, 17, 0.82); color: var(--lx-ink);
    border: 1px solid var(--lx-border-hi);
    font-size: 0.74rem; font-weight: 700;
    padding: 0.32rem 0.8rem; border-radius: var(--radius-pill);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8);
}
.hero-trust {
    display: flex; align-items: center; gap: 1.05rem; margin-top: 0.65rem;
    padding-top: 0.65rem; border-top: 1px solid rgba(255, 255, 255, 0.14); flex-wrap: wrap;
}
.hero-trust div { font-size: 0.74rem; color: var(--lx-ink-2); display: flex; align-items: center; gap: 0.38rem; }
.hero-trust i { color: var(--hero-accent2); }

/* ============================================================
   Stats band — glass tiles with count-up figures
   ============================================================ */
.stats-section {
    background:
        radial-gradient(760px 320px at 92% 0%, rgba(var(--primary-rgb), 0.26), transparent 66%),
        linear-gradient(165deg, var(--hero-3) 0%, var(--lx-bg) 72%);
    padding: 1.6rem 0 2.4rem;
    border-bottom: 1px solid var(--lx-line);
}
.stats-section .row { --bs-gutter-x: 1.1rem; row-gap: 1.1rem; }
.stat-box {
    text-align: center; color: white;
    background: linear-gradient(165deg, var(--lx-panel-2), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--lx-border);
    border-radius: 18px;
    padding: 1.25rem 0.6rem 1.1rem;
    position: relative; overflow: hidden;
    backdrop-filter: blur(12px);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: var(--lx-shadow), var(--lx-inner);
}
.stat-box:hover { border-color: var(--lx-border-hi); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.95), var(--lx-inner); }
.stat-box h3 {
    font-size: 1.95rem; font-weight: 800; margin-bottom: 0.15rem;
    font-variant-numeric: tabular-nums; line-height: 1.15;
    background: linear-gradient(96deg, #fff, var(--hero-accent2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    transform: translateZ(24px);
}
.stat-box p { color: var(--lx-muted); font-size: 0.9rem; margin: 0; }

/* ============================================================
   Sections — one dark field, dot-grid texture
   ============================================================ */
.section-padding {
    padding: 3.4rem 0;
    background: var(--lx-bg);
    border-block: 1px solid var(--lx-line);
}
.has-dot-grid {
    background-color: var(--lx-bg-2);
    background-image:
        radial-gradient(circle, rgba(148, 200, 232, 0.075) 1.2px, transparent 1.9px),
        radial-gradient(1100px 520px at 86% -12%, rgba(var(--primary-rgb), 0.14), transparent 62%),
        radial-gradient(900px 460px at 6% 112%, rgba(var(--primary-rgb), 0.09), transparent 60%);
    background-size: 26px 26px, auto, auto;
    background-repeat: repeat, no-repeat, no-repeat;
}
.section-header { text-align: center; margin-bottom: 2rem; }
.section-eyebrow {
    color: var(--hero-accent2); font-weight: 700; font-size: 0.8rem;
    letter-spacing: 0.08em; margin: 0 0 0.5rem;
    text-shadow: 0 0 18px rgba(var(--primary-rgb), 0.55);
}
.section-header h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 800; color: var(--lx-ink); letter-spacing: -0.012em; }
.section-header h2 span,
.grad-clip {
    background: linear-gradient(96deg, var(--hero-accent2), var(--hero-accent));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.section-header p.lead { color: var(--lx-muted); max-width: 56ch; margin: 0.75rem auto 0; font-size: 0.98rem; }

/* Bootstrap's outline buttons key off --primary for their text and border. On the
   dark glass that pair lands near 3.2:1, under the 4.5:1 body-text floor, so the
   landing retints them to the theme's light tone via Bootstrap's own button vars. */
.section-padding .btn-outline-primary {
    --bs-btn-color: var(--primary-light);
    --bs-btn-border-color: rgba(var(--primary-rgb), 0.55);
    --bs-btn-hover-bg: rgba(var(--primary-rgb), 0.18);
    --bs-btn-hover-border-color: var(--primary-light);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: rgba(var(--primary-rgb), 0.32);
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: var(--primary-light);
}

/* The doctors fallback (empty state) is styled for light surfaces by the shared
   sheet; give it the same glass treatment so it never renders as a white slab. */
.section-padding .empty-state {
    background: linear-gradient(165deg, var(--lx-panel-2), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--lx-border);
    border-radius: var(--radius-lg);
    color: var(--lx-muted);
    backdrop-filter: blur(12px);
}
.section-padding .empty-state .empty-icon { background: rgba(var(--primary-rgb), 0.2); color: var(--hero-accent); }
.section-padding .empty-state .empty-title { color: var(--lx-ink); }
.section-padding .empty-state .empty-text { color: var(--lx-muted); }

/* ============================================================
   3D card system — shared by every card family on the page.
   JS drives perspective rotateX/rotateY from the pointer and the
   glare origin from the same event; depth children sit on their
   own Z plane so the tilt reads as real parallax.
   ============================================================ */
[data-tilt-3d] {
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1),
                border-color 0.28s ease, box-shadow 0.28s ease;
    will-change: transform;
}
[data-tilt-3d]::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: radial-gradient(260px 260px at var(--glare-x, 50%) var(--glare-y, 50%),
                rgba(255, 255, 255, 0.55), transparent 62%);
    opacity: 0; transition: opacity 0.28s ease; pointer-events: none;
    mix-blend-mode: soft-light;
    z-index: 2;
}
[data-tilt-3d]:hover::before, [data-tilt-3d]:focus-within::before { opacity: 1; }

/* ============================================================
   Services
   ============================================================ */
.service-card {
    position: relative;
    background: linear-gradient(165deg, var(--lx-panel-2), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--lx-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    height: 100%;
    overflow: hidden;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: var(--lx-shadow), var(--lx-inner);
}
.service-card:hover {
    border-color: var(--lx-border-hi);
    box-shadow: 0 30px 64px -32px rgba(0, 0, 0, 0.95), 0 0 34px -16px rgba(var(--primary-rgb), 0.6), var(--lx-inner);
}
.service-icon-box {
    width: 52px; height: 52px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; margin: 0 0 1.1rem;
    background: rgba(var(--primary-rgb), 0.18); color: var(--hero-accent);
    border: 1px solid rgba(var(--primary-rgb), 0.35);
    transition: transform 0.25s ease;
    transform: translateZ(36px);
    box-shadow: 0 10px 24px -12px rgba(var(--primary-rgb), 0.8);
}
.service-card:hover .service-icon-box { transform: translateZ(36px) scale(1.09) rotate(-3deg); }
.service-card h3 { font-weight: 800; margin-bottom: 0.55rem; color: var(--lx-ink); font-size: 1.25rem; transform: translateZ(18px); }
.service-card p { color: var(--lx-muted); line-height: 1.8; margin: 0; font-size: 0.95rem; transform: translateZ(10px); }
.service-card .btn { transform: translateZ(22px); }

.service-card-featured > div { flex-direction: column; height: 100%; }
.service-card-featured > div > div:last-child { flex: 1 1 auto; display: flex; flex-direction: column; }
.service-card-featured .service-icon-box { margin-bottom: 0.9rem; }
.service-card-featured .btn { margin-top: auto !important; align-self: flex-start; }
.service-card-featured {
    background:
        radial-gradient(600px 300px at 88% -20%, rgba(var(--primary-rgb), 0.28), transparent 70%),
        linear-gradient(165deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-color: rgba(var(--primary-rgb), 0.45);
}
/* Gradient ring: the only filled border on the page, so the card reads
   as the section's focal point. */
.service-card-featured::after {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; z-index: 3;
    padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, rgba(var(--primary-rgb), 0.9), rgba(255, 255, 255, 0.06) 55%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.service-card-featured .service-icon-box {
    background: var(--grad-brand); color: #fff;
    border-color: transparent;
    width: 56px; height: 56px; margin-bottom: 0;
    box-shadow: 0 12px 26px -10px rgba(var(--primary-rgb), 0.95);
}
.service-flag {
    display: inline-block;
    background: rgba(var(--primary-rgb), 0.2); color: var(--hero-accent);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    font-size: 0.68rem; font-weight: 800; padding: 0.18rem 0.6rem;
    border-radius: var(--radius-pill); margin-bottom: 0.5rem;
    transform: translateZ(26px);
}

/* ============================================================
   Doctors
   ============================================================ */
.doctor-card-v2 {
    background: linear-gradient(165deg, var(--lx-panel-2), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--lx-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-align: center; height: 100%;
    position: relative;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: var(--lx-shadow), var(--lx-inner);
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
    transform-style: preserve-3d;
}
.doctor-card-v2:hover {
    border-color: var(--lx-border-hi);
    box-shadow: 0 30px 64px -32px rgba(0, 0, 0, 0.95), 0 0 34px -16px rgba(var(--primary-rgb), 0.6), var(--lx-inner);
}
.doctor-img-v2 {
    width: 92px; height: 92px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 1.6rem auto 1rem; font-size: 2rem; color: white;
    transform: translateZ(42px);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 16px 30px -12px rgba(0, 0, 0, 0.9);
}
.doctor-card-v2 h3.doctor-name { font-weight: 800; font-size: 1.05rem; margin-bottom: 0.2rem; color: var(--lx-ink); transform: translateZ(20px); }
.doctor-card-v2 .role { color: var(--lx-muted); font-size: 0.85rem; transform: translateZ(12px); }
.doctor-card-v2 .stats {
    padding: 0.95rem 1rem;
    background: rgba(0, 0, 0, 0.28);
    margin-top: 1.15rem;
    border-top: 1px solid var(--lx-line);
    transform: translateZ(16px);
}

/* ============================================================
   Why-us + Reserve
   ============================================================ */
.why-section { background: var(--lx-bg); }
.why-card {
    background: linear-gradient(165deg, var(--lx-panel), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--lx-border);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.3rem;
    display: flex; gap: 0.95rem; align-items: flex-start;
    height: 100%;
    position: relative; overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--lx-shadow);
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    transform-style: preserve-3d;
}
.why-card:hover {
    border-color: rgba(var(--primary-rgb), 0.5);
    box-shadow: 0 24px 52px -30px rgba(0, 0, 0, 0.95), 0 0 28px -14px rgba(var(--primary-rgb), 0.55);
}
.why-icon-v2 {
    width: 42px; height: 42px; min-width: 42px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    background: rgba(var(--primary-rgb), 0.18); color: var(--hero-accent);
    border: 1px solid rgba(var(--primary-rgb), 0.32);
    transform: translateZ(30px);
    box-shadow: 0 8px 20px -10px rgba(var(--primary-rgb), 0.8);
}
.why-card h3 { font-weight: 800; margin-bottom: 0.25rem; color: var(--lx-ink); font-size: 1rem; transform: translateZ(14px); }
.why-card p { color: var(--lx-muted); margin: 0; font-size: 0.88rem; line-height: 1.75; transform: translateZ(8px); }

/* The booking form is the page's single dominant element: a tall glass
   panel with a slow breathing glow behind it. */
.reserve-box {
    position: relative;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(var(--primary-rgb), 0.38);
    border-radius: 22px;
    box-shadow: 0 44px 96px -44px rgba(0, 0, 0, 0.95), 0 0 46px -20px rgba(var(--primary-rgb), 0.6), var(--lx-inner);
    padding: clamp(1.5rem, 3vw, 2.3rem);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reserve-box::after {
    content: ''; position: absolute; inset: -26px; border-radius: 30px; z-index: -1;
    background: radial-gradient(60% 60% at 50% 40%, rgba(var(--primary-rgb), 0.24), transparent 70%);
    filter: blur(24px); pointer-events: none;
    animation: reserve-breathe 7s ease-in-out infinite alternate;
}
@keyframes reserve-breathe {
    from { opacity: 0.55; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1.03); }
}
.reserve-box h3 { font-weight: 800; color: var(--lx-ink); font-size: 1.25rem; }
.reserve-box .text-muted { color: var(--lx-muted) !important; }
.reserve-box .form-label { color: var(--lx-ink-2); font-weight: 600; font-size: 0.88rem; margin-bottom: 0.4rem; }
.reserve-box .form-control,
.reserve-box .form-select {
    background: rgba(3, 8, 15, 0.6); color: var(--lx-ink);
    border: 1px solid var(--lx-border); border-radius: var(--radius-sm);
    padding: 0.72rem 0.92rem; font-size: 0.95rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.reserve-box .form-control::placeholder { color: #5f7186; }
.reserve-box .form-control:focus,
.reserve-box .form-select:focus {
    background: rgba(3, 8, 15, 0.8);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.28);
    color: #fff;
}
.reserve-box .form-select option { background: #0a1220; color: var(--lx-ink); }
.reserve-box .alert { border-radius: var(--radius); padding: 0.7rem 1rem; font-size: 0.9rem; }
.reserve-box .alert-success { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.38); }
.reserve-box .alert-danger { background: rgba(244, 63, 94, 0.14); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.38); }
.time-slot-v2 {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.6rem 1rem; margin: 0.22rem; min-height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lx-border); border-radius: var(--radius-sm);
    cursor: pointer; transition: all 0.16s ease;
    font-weight: 700; font-size: 0.85rem; min-width: 74px; text-align: center;
    font-variant-numeric: tabular-nums; color: var(--lx-ink-2);
}
.time-slot-v2:hover {
    border-color: var(--primary-light); color: #fff;
    background: rgba(var(--primary-rgb), 0.2);
    transform: translateY(-2px);
}
.time-slot-v2:focus-within { outline: 3px solid var(--hero-accent2); outline-offset: 2px; border-color: var(--hero-accent2); }
.time-slot-v2.selected {
    background: var(--grad-brand); color: white;
    border-color: transparent;
    box-shadow: 0 10px 22px -8px rgba(var(--primary-rgb), 0.95);
}

/* ============================================================
   Testimonials
   ============================================================ */
.testimonial-card-v2 {
    background: linear-gradient(165deg, var(--lx-panel-2), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--lx-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    position: relative; height: 100%; overflow: hidden;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: var(--lx-shadow), var(--lx-inner);
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
    transform-style: preserve-3d;
}
.testimonial-card-v2:hover {
    border-color: var(--lx-border-hi);
    box-shadow: 0 30px 64px -32px rgba(0, 0, 0, 0.95), 0 0 34px -16px rgba(var(--primary-rgb), 0.55), var(--lx-inner);
}
.testimonial-card-v2 .stars { color: #fbbf24; margin-bottom: 0.85rem; font-size: 0.9rem; transform: translateZ(26px); }
.testimonial-card-v2 p { color: var(--lx-ink-2); line-height: 1.9; margin-bottom: 1.25rem; font-size: 0.94rem; transform: translateZ(12px); }
.testimonial-card-v2 .author-img {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.22); color: var(--hero-accent);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.05rem;
    transform: translateZ(30px);
}
.testimonial-card-v2 .fw-bold { color: var(--lx-ink) !important; }
.testimonial-card-v2 small { color: var(--lx-muted) !important; }

/* ============================================================
   Footer
   ============================================================ */
.footer-v2 {
    background:
        radial-gradient(820px 340px at 12% 0%, rgba(var(--primary-rgb), 0.24), transparent 66%),
        linear-gradient(165deg, var(--hero-2), var(--hero-1) 62%, #04080f);
    color: var(--lx-ink-2);
    padding: 3.6rem 0 1.8rem;
    border-top: 1px solid var(--lx-line);
}
.footer-v2 h3 { font-weight: 800; margin-bottom: 1.1rem; color: white; font-size: 1rem; }
.footer-v2 a { color: var(--lx-muted); text-decoration: none; transition: color 0.15s ease; }
.footer-v2 a:hover { color: #fff; }
.footer-v2 ul { list-style: none; padding: 0; }
.footer-v2 ul li { margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.footer-v2 .social-icon {
    width: 40px; height: 40px; border-radius: 11px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--lx-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--lx-ink-2); font-size: 1.05rem;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.footer-v2 .social-icon:hover {
    background: rgba(var(--primary-rgb), 0.35); color: #fff;
    border-color: rgba(var(--primary-rgb), 0.6);
    transform: translateY(-3px);
}
.footer-bottom-v2 { border-top: 1px solid rgba(255, 255, 255, 0.09); margin-top: 2.3rem; padding-top: 1.5rem; text-align: center; color: #64748b; font-size: 0.82rem; }

/* ============================================================
   Scroll-driven 3D reveal (replaces AOS on this page).
   Elements enter from a tilted plane; JS adds .in-3d via
   IntersectionObserver with a per-sibling stagger.
   ============================================================ */
[data-3d] {
    opacity: 0;
    transform: perspective(1100px) rotateX(13deg) translate3d(0, 42px, 0);
    transform-style: preserve-3d;
    transform-origin: 50% 0%;
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.3, 1),
                transform 0.9s cubic-bezier(0.2, 0.8, 0.3, 1);
    transition-delay: var(--d3-delay, 0ms);
}
[data-3d].in-3d { opacity: 1; transform: none; }
/* The stat tiles and why-us cards both reveal and tilt. The reveal's slower transform
   curve would make the pointer tilt feel draggy on them, so the tilt's snappier curve
   wins here — opacity still follows the reveal timing. */
[data-3d][data-tilt-3d] {
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.3, 1),
                transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Focus ring on dark surfaces: --primary alone can sit under 3:1
   against the dark field, so the landing swaps in the theme's own
   light accent for every visible focus state. */
:focus-visible { outline-color: var(--hero-accent2); }
.skip-link { background: var(--primary); }

/* ============================================================
   Reduced motion — every effect below is decoration; none carries
   information, so all of it resolves to the resting state.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .preloader { transition: none; }
    .preloader-mark { animation: none; }
    .reserve-box::after { animation: none; }
    .hero::before, .hero::after { animation: none; }
    .hero-bg .ecg-line, .hero-bg .ecg-glow { animation: none; stroke-dashoffset: 0; }
    .hero-bg .glyph { animation: none; }
    .hero-figure-col { animation: none; translate: none; }
    .hero-figure { transition: none; transform: none; }
    .hero-bg { transform: none !important; }
    .hero-title .mask > span,
    .hero-copy > * { animation: none; }
    [data-3d] { opacity: 1 !important; transform: none !important; transition: none !important; }
    [data-tilt-3d] { transform: none !important; transition: none !important; }
    [data-tilt-3d]::before { opacity: 0 !important; }
    .service-card, .doctor-card-v2, .why-card, .testimonial-card-v2,
    .stat-box, .reserve-box { transform: none !important; }
    .service-card:hover, .doctor-card-v2:hover, .why-card:hover,
    .testimonial-card-v2:hover, .time-slot-v2:hover,
    .footer-v2 .social-icon:hover { transform: none; }
    .service-card:hover .service-icon-box { transform: translateZ(36px); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-height: 720px) {
    /* Short/landscape screens: drop the tall hero so the copy and the
       form stay reachable without scrolling past a full viewport of art. */
    .hero { min-height: 0; align-items: flex-start; }
}
@media (max-width: 991px) {
    .hero-figure img { max-height: 240px; }
    .hero { min-height: 0; }
}
@media (max-width: 768px) {
    .hero { padding: calc(var(--nav-height, 64px) + 1rem) 0 2.2rem; }
    .hero-title { font-size: 1.7rem; }
    .hero-desc { font-size: 0.92rem; }
    .btn-hero, .btn-hero-outline { width: 100%; justify-content: center; }
    .btn-hero-outline { margin-top: 0.6rem; }
    .section-padding { padding: 2.6rem 0; }
    .service-card, .testimonial-card-v2 { padding: 1.4rem; }
}
