
/* ═══════════════════════════════════════════════════════════════
   PROFESSIONAL UI/UX IMPROVEMENTS — v2.2
   Accessibility · Motion Safety · Visual Polish · Print
   ═══════════════════════════════════════════════════════════════ */

/* ── SKIP NAVIGATION LINK ─────────────────────────────────── */
.skip-nav {
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    padding: 12px 28px;
    background: var(--indigo);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    text-decoration: none;
    white-space: nowrap;
    transition: top 0.25s var(--ease-out);
    box-shadow: var(--shadow-md);
}

.skip-nav:focus,
.skip-nav:focus-visible {
    top: 0;
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

/* ── KEYBOARD FOCUS VISIBLE SYSTEM ────────────────────────── */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2.5px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
}

a:focus-visible,
button:focus-visible,
.tab-btn:focus-visible,
.platform-tab:focus-visible,
.quiz-option:focus-visible,
.slot-btn:focus-visible,
.cal-day:focus-visible {
    outline: 2.5px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
    box-shadow: 0 0 0 5px rgba(0, 180, 216, 0.14);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--teal) !important;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.14) !important;
}

/* ── BACK TO TOP BUTTON ───────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 44px;
    height: 44px;
    background: #fff;
    color: var(--indigo);
    border: 1.5px solid var(--border-mid);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 899;
    font-size: 0.9rem;
    line-height: 1;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease,
                background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    pointer-events: none;
    text-decoration: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.back-to-top:hover {
    background: var(--indigo);
    color: #fff;
    border-color: var(--indigo);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

[data-theme="dark"] .back-to-top {
    background: var(--card-bg);
    color: var(--text-h);
    border-color: var(--border-mid);
}

[data-theme="dark"] .back-to-top:hover {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

/* ── PREFERS REDUCED MOTION ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.1ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .reveal.visible {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-word {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .fact-ticker {
        animation: none !important;
        overflow-x: auto;
    }

    .hero-glow-orb,
    .hero-float-badge,
    .ecg-line,
    .sd-pulse,
    .hero-badge-dot {
        animation: none !important;
    }

    .myth-card-inner {
        transition: none !important;
    }

    .glass-card {
        transition: box-shadow 0.1ms, border-color 0.1ms !important;
    }

    .glass-card:hover {
        transform: none !important;
    }

    .glass-card::after {
        display: none;
    }
}

/* ── MOBILE NAV BACKDROP OVERLAY ─────────────────────────── */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 26, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 997;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    cursor: pointer;
}

.nav-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

@media (max-width: 900px) {
    .nav-backdrop {
        display: block;
    }
}

/* ── ENHANCED SCROLL HOOK ─────────────────────────────────── */
.scroll-hook {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}

.scroll-hook::before,
.scroll-hook::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-accent));
    max-width: 200px;
    margin: 0 20px;
    flex-shrink: 0;
}

.scroll-hook::after {
    background: linear-gradient(to left, transparent, var(--border-accent));
}

.scroll-hook p {
    font-family: var(--font-display);
    font-size: 0.87rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    max-width: 440px;
    letter-spacing: 0.02em;
    line-height: 1.65;
    position: relative;
}

[data-theme="dark"] .scroll-hook::before {
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1));
}

[data-theme="dark"] .scroll-hook::after {
    background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.1));
}

/* ── BOOKING STEP PROGRESS INDICATOR ─────────────────────── */
.booking-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin: 0 0 32px;
    padding: 28px 24px 0;
}

.booking-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    flex: 1;
    max-width: 120px;
}

.booking-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    left: calc(50% + 20px);
    right: calc(-50% + 20px);
    height: 2px;
    background: var(--border-light);
    z-index: 0;
    transition: background 0.4s ease;
}

.booking-step.completed:not(:last-child)::after {
    background: var(--teal);
}

.booking-step.active:not(:last-child)::after {
    background: linear-gradient(90deg, var(--teal) 0%, var(--border-light) 100%);
}

.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border-mid);
    background: #fff;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: border-color 0.35s ease, background 0.35s ease,
                color 0.35s ease, box-shadow 0.35s ease;
    flex-shrink: 0;
}

.booking-step.active .step-circle {
    border-color: var(--indigo);
    background: var(--indigo);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.14);
}

.booking-step.completed .step-circle {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
}

.step-label {
    font-size: 0.67rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.booking-step.active .step-label {
    color: var(--indigo);
}

.booking-step.completed .step-label {
    color: var(--teal);
}

[data-theme="dark"] .step-circle {
    background: var(--card-bg);
    border-color: var(--border-mid);
}

[data-theme="dark"] .booking-step.active .step-circle {
    background: var(--indigo);
    border-color: var(--indigo);
}

[data-theme="dark"] .booking-step.completed .step-circle {
    background: var(--teal);
    border-color: var(--teal);
}

/* ── IMPROVED FORM FOCUS RING ─────────────────────────────── */
.booking-form-card input:focus,
.booking-form-card select:focus,
.booking-form-card textarea:focus {
    outline: none;
    border-color: var(--teal) !important;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.12) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── PRINT STYLES — Medical information pages ─────────────── */
@media print {
    .nav,
    .nav-mobile,
    .nav-backdrop,
    .sd-wrap,
    .back-to-top,
    .skip-nav,
    #scroll-progress,
    .hero-ctas,
    .section-cta,
    .final-cta-section,
    .hero-float-badge,
    .scroll-hook,
    .trust-strip {
        display: none !important;
    }

    body {
        color: #000 !important;
        background: #fff !important;
        font-size: 11pt;
        line-height: 1.6;
    }

    .glass-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
        background: #fff !important;
    }

    h1, h2, h3, h4 {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }

    .glow-text {
        background: none !important;
        -webkit-background-clip: unset !important;
        background-clip: unset !important;
        -webkit-text-fill-color: #000 !important;
        color: #000 !important;
    }

    .section {
        padding: 32px 0 !important;
    }

    .hero {
        min-height: auto !important;
        padding: 24px 0 !important;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        color: #666;
        word-break: break-all;
    }

    a[href^="tel:"]::after,
    a[href^="#"]::after,
    .btn-primary::after,
    .nav-cta::after {
        content: none !important;
    }
}

/* ── READING TIME BADGE ────────────────────────────────────── */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 4px 12px;
    letter-spacing: 0.03em;
}


/* ── CALENDAR KEYBOARD ACCESSIBILITY ─────────────────────── */
.cal-day[data-date] {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* ── SLOT BUTTON FOCUS ────────────────────────────────────── */
.slot-btn:focus-visible {
    outline: 2.5px solid var(--teal);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.14);
}

/* ── QUIZ OPTION KEYBOARD FOCUS ───────────────────────────── */
.quiz-option:focus-visible {
    outline: 2.5px solid var(--teal);
    outline-offset: 2px;
}

/* ── NAV LINK ACTIVE UNDERLINE USING TEAL ─────────────────── */
.nav-links a::after {
    background: linear-gradient(90deg, var(--teal), var(--teal-deep));
}

/* ── SCREEN READER ONLY ─────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ── MOBILE RESPONSIVE SECTION PADDING ──────────────── */
@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }
    .section-header {
        margin-bottom: 40px;
    }
    .hero-stats {
        gap: 24px;
    }
}

/* ── LIVE ENHANCEMENTS ──────────────────────────────── */

/* Breathing glow on primary CTA buttons */
.btn-cta-opd,
.nav-cta {
    animation: breatheGlow 3s ease-in-out infinite;
}

@keyframes breatheGlow {
    0%, 100% { box-shadow: 0 4px 20px var(--glow-teal); }
    50% { box-shadow: 0 6px 32px var(--glow-teal), 0 0 60px rgba(0, 180, 216, 0.15); }
}

/* Subtle live indicator pulse on hero badge dot */
.hero-badge-dot {
    position: relative;
}
.hero-badge-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--teal);
    opacity: 0;
    animation: livePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes livePing {
    0% { transform: scale(1); opacity: 0.6; }
    75%, 100% { transform: scale(2.5); opacity: 0; }
}

/* Icon containers - consistent sizing and alignment */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
}

.expertise-icon .icon,
.why-icon .icon,
.contact-icon .icon,
.comm-promise-icon .icon,
.scenario-icon .icon {
    width: 48px;
    height: 48px;
}

.expertise-icon .icon svg,
.why-icon .icon svg,
.contact-icon .icon svg,
.comm-promise-icon .icon svg,
.scenario-icon .icon svg {
    width: 28px;
    height: 28px;
}

/* Floating badge icons */
.float-icon .icon svg {
    width: 24px;
    height: 24px;
}

/* About highlight icons */
.about-highlight .icon svg {
    width: 16px;
    height: 16px;
}

/* Trust strip icons */
.trust-item .icon svg {
    width: 18px;
    height: 18px;
}


/* Stat counter shimmer on completion */
.stat-number[data-counted] {
    animation: statShimmer 0.6s ease-out;
}

@keyframes statShimmer {
    0% { filter: drop-shadow(0 0 12px rgba(0, 180, 216, .45)); }
    50% { filter: drop-shadow(0 0 24px rgba(0, 180, 216, .8)); }
    100% { filter: drop-shadow(0 0 12px rgba(0, 180, 216, .45)); }
}

/* Interactive timeline dot pulse on hover */
.timeline-item:hover .timeline-dot {
    box-shadow: 0 0 0 6px rgba(0, 180, 216, 0.2);
    transform: scale(1.3);
    transition: all 0.3s var(--ease-out);
}

.timeline-dot.active {
    animation: activeDotPulse 2.5s ease-in-out infinite;
}

@keyframes activeDotPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(0, 180, 216, 0.1); }
}

/* Process step number hover effect */
.process-step:hover .process-num {
    background: var(--grad-primary);
    color: #fff;
    transform: scale(1.1);
    transition: all 0.3s var(--ease-out);
}

/* FAQ item active state enhancement */
.faq-item.open .faq-question {
    color: var(--indigo);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
    color: var(--teal);
    transition: transform 0.3s var(--ease-out), color 0.3s;
}

/* Credential pills subtle hover */
.credential-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    transition: all 0.2s var(--ease-out);
}

/* Hero empathy quote typewriter cursor */
.hero-empathy::after {
    content: '|';
    animation: cursorBlink 1s step-end infinite;
    color: var(--teal);
    font-weight: 300;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Live availability indicator for contact section */
.contact-highlight {
    position: relative;
}
.contact-highlight::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--green-ok);
    border-radius: 50%;
    margin-right: 6px;
    animation: livePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    vertical-align: middle;
}

/* Scroll hook subtle entrance animation */
.scroll-hook p {
    position: relative;
    overflow: hidden;
}
.scroll-hook.visible p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--grad-primary);
    animation: lineReveal 0.8s var(--ease-out) 0.3s both;
}

@keyframes lineReveal {
    from { transform: scaleX(0); transform-origin: left; }
    to { transform: scaleX(1); transform-origin: left; }
}


/* Newsletter form focus-within glow */
.newsletter-form:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
    border-radius: var(--radius-sm);
    transition: box-shadow 0.3s ease;
}

/* Insight card image zoom on hover */
.insight-card:hover .insight-card-image {
    transform: scale(1.05);
    transition: transform 0.6s var(--ease-out);
}
.insight-card-image {
    transition: transform 0.6s var(--ease-out);
}

/* Respect reduced motion for all new animations */
@media (prefers-reduced-motion: reduce) {
    .btn-cta-opd,
    .nav-cta {
        animation: none;
    }
    .hero-badge-dot::after {
        animation: none;
    }
    .stat-number[data-counted] {
        animation: none;
    }
    .timeline-dot.active {
        animation: none;
    }
    .hero-empathy::after {
        animation: none;
        content: '';
    }
    .contact-highlight::before {
        animation: none;
    }
    .scroll-hook.visible p::after {
        animation: none;
        transform: scaleX(1);
    }
    .insight-card:hover .insight-card-image {
        transform: none;
    }
}
