/*
 * landing-responsive.css
 * ─────────────────────────────────────────────────────────────────────────
 * Responsive overrides for the Unity Hospital landing page.
 * Desktop layout (≥ 1025px) is COMPLETELY UNCHANGED.
 * Breakpoints: 1024px (tablet), 768px (mobile), 480px (small mobile)
 * ─────────────────────────────────────────────────────────────────────────
 */


/* ═══════════════════════════════════════════════════════════════════════
   SERVICE FILTER TABS — horizontal scroll wrapper on mobile
   (JS handles card count per breakpoint; this handles the tab row)
   ═══════════════════════════════════════════════════════════════════════ */

/* Container: scrollable on mobile, centered flex on desktop */
.svc-tabs-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;     /* Firefox */
    -ms-overflow-style: none;  /* IE / Edge */
}

.svc-tabs-container::-webkit-scrollbar {
    display: none;             /* Chrome / Safari / Opera */
}

/* Inner row: prevent wrap so tabs stay in one scrollable line */
.svc-tabs-inner {
    min-width: max-content;
    display: flex;
}

/* Desktop restore: no scroll, centered */
@media (min-width: 768px) {
    .svc-tabs-container {
        overflow-x: visible;
        display: flex;
        justify-content: center;
    }

    .svc-tabs-inner {
        min-width: 0;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   MOBILE MENU — touch target compliance (min 44 × 44 px)
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    #mobile-menu a,
    #mobile-menu button:not(.mobile-menu-close) {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   MOBILE TYPOGRAPHY — Playfair Display for headings, DM Sans for body
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    /* Section headings across the page — elegant serif */
    h2 {
        font-family: 'Playfair Display', Georgia, serif !important;
        letter-spacing: -0.01em;
    }

    h3 {
        font-family: 'Playfair Display', Georgia, serif !important;
    }

    /* Tighter body text on mobile */
    body {
        font-family: 'DM Sans', system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   HERO — premium mobile treatment
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    /* Hero main heading — Playfair, larger with breathing */
    .hero-main-heading {
        font-family: 'Playfair Display', Georgia, serif !important;
        font-size: 2.15rem !important;
        line-height: 1.18 !important;
        letter-spacing: -0.015em !important;
        font-weight: 700 !important;
    }

    /* Accent span — italic flair */
    .hero-accent-text {
        font-style: italic !important;
    }

    /* Hero description text */
    .hero-main-heading ~ p {
        font-size: 0.9375rem;
        line-height: 1.65;
    }
}

@media (max-width: 640px) {
    .hero-main-heading {
        font-size: 1.9rem !important;
    }
}

@media (max-width: 420px) {
    .hero-main-heading {
        font-size: 1.7rem !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   HERO CTA — Compact side-by-side buttons on mobile
   ═══════════════════════════════════════════════════════════════════════ */

/* Desktop: show full text, hide short text */
.hero-btn-short { display: none; }
.hero-btn-full  { display: inline; }

@media (max-width: 1024px) {

    /* Row: horizontal, equal-width buttons, tight gap */
    .hero-cta-row {
        flex-direction: row !important;
        gap: 0.625rem !important;
    }

    /* Mobile: swap to short label — prevents 2-line wrap */
    .hero-btn-full  { display: none; }
    .hero-btn-short { display: inline; }

    /* Book button: compact primary */
    .hero-book-btn {
        flex: 1 !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.8125rem !important;
        font-weight: 600 !important;
        border-radius: 0.75rem !important;
        letter-spacing: 0.01em !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    /* Emergency button: compact secondary */
    .btn-emergency {
        flex: 1 !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.8125rem !important;
        font-weight: 600 !important;
        border-radius: 0.75rem !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }

    /* Scale down pulse rings on mobile */
    .btn-emergency::before,
    .btn-emergency::after {
        inset: -3px !important;
        border-radius: 0.75rem !important;
    }

    /* Smaller icons inside both buttons */
    .hero-cta-row .btn-icon {
        width: 14px !important;
        height: 14px !important;
    }
}

/* Extra small phones — slightly tighter */
@media (max-width: 380px) {
    .hero-book-btn,
    .btn-emergency {
        padding: 0.55rem 0.75rem !important;
        font-size: 0.75rem !important;
        border-radius: 0.625rem !important;
    }
}

@media (min-width: 1025px) {
    /* Hide mobile stats strip on desktop — desktop has the floating cards */
    .mobile-stats-strip {
        display: none !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   MOBILE STATS STRIP — glassmorphism floating bar in hero
   ═══════════════════════════════════════════════════════════════════════ */

@keyframes mssItemUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .mobile-stats-strip {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        margin-top: 1.25rem;
        background: rgba(255, 255, 255, 0.07);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.13);
        border-radius: 0.875rem;
        overflow: hidden;
        position: relative;
    }

    /* Top glass sheen */
    .mobile-stats-strip::before {
        content: '';
        position: absolute;
        top: 0; left: 0; right: 0;
        height: 1px;
        background: linear-gradient(90deg,
            transparent 0%,
            rgba(255,255,255,0.35) 30%,
            rgba(255,255,255,0.35) 70%,
            transparent 100%);
    }

    .mss-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.85rem 0.4rem;
        gap: 0.25rem;
        opacity: 0;
        animation: mssItemUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        animation-delay: calc(var(--i) * 0.08s);
    }

    .mss-num {
        font-family: 'Playfair Display', Georgia, serif;
        font-size: 1.3rem;
        font-weight: 700;
        color: #2dd4bf;
        line-height: 1;
        letter-spacing: -0.02em;
    }

    .mss-label {
        font-size: 0.56rem;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: rgba(255, 255, 255, 0.55);
        font-weight: 500;
        line-height: 1;
    }

    .mss-divider {
        width: 1px;
        background: rgba(255, 255, 255, 0.12);
        align-self: stretch;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .mss-num   { font-size: 1.15rem; }
    .mss-label { font-size: 0.52rem; letter-spacing: 0.09em; }
    .mss-item  { padding: 0.75rem 0.3rem; }
}

@media (max-width: 360px) {
    .mss-num   { font-size: 1rem; }
    .mss-label { font-size: 0.48rem; }
    .mss-item  { padding: 0.65rem 0.2rem; }
}


/* ═══════════════════════════════════════════════════════════════════════
   SECTION HEADINGS — premium sizing on mobile
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    /* About / services / contact section h2 titles */
    section h2 {
        font-size: 1.65rem !important;
        line-height: 1.22 !important;
    }

    section h2 + p,
    section h2 ~ p:first-of-type {
        font-size: 0.9rem;
        line-height: 1.65;
    }
}

@media (max-width: 640px) {
    section h2 {
        font-size: 1.45rem !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   QUICK CONTACT BAR — Premium 3-column horizontal strip on mobile (≤ 767px)
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* Section: teal-tinted ribbon, flush borders */
    .quick-contact-section {
        background: linear-gradient(to bottom, #f0fdfa 0%, #ffffff 100%) !important;
        border-top: 2px solid rgba(13, 148, 136, 0.22) !important;
        border-bottom: 1px solid rgba(13, 148, 136, 0.1) !important;
        padding: 0 !important;
    }

    /* Inner wrapper: full-bleed, no padding */
    .quick-contact-section > div {
        padding: 0 !important;
        max-width: 100% !important;
    }

    /* Grid → single-row 3 equal columns */
    .quick-contact-grid {
        display: flex !important;
        flex-direction: row !important;
        align-items: stretch !important;
        gap: 0 !important;
    }

    /* Each column: centered, icon on top */
    .quick-contact-grid > div {
        flex: 1;
        min-width: 0;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 14px 6px !important;
        gap: 0 !important;
        position: relative;
        opacity: 0;
        transform: translateY(7px);
        animation: qcColUp 0.44s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .quick-contact-grid > div:nth-child(1) { animation-delay: 0.06s; }
    .quick-contact-grid > div:nth-child(2) { animation-delay: 0.14s; }
    .quick-contact-grid > div:nth-child(3) { animation-delay: 0.22s; }

    @keyframes qcColUp {
        to { opacity: 1; transform: translateY(0); }
    }

    /* Vertical hairline dividers */
    .quick-contact-grid > div:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 16%;
        height: 68%;
        width: 1px;
        background: linear-gradient(
            to bottom,
            transparent,
            rgba(13, 148, 136, 0.2) 25%,
            rgba(13, 148, 136, 0.2) 75%,
            transparent
        );
    }

    /* Icon: compact circle, teal gradient fill */
    .quick-contact-grid > div > div:first-child {
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, #e6faf8 0%, #b2f0e8 100%) !important;
        border: 1.5px solid rgba(13, 148, 136, 0.22) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        margin-bottom: 8px !important;
        box-shadow: 0 2px 10px rgba(13, 148, 136, 0.16) !important;
    }

    .quick-contact-grid > div > div:first-child svg {
        width: 15px !important;
        height: 15px !important;
        stroke: #0f766e !important;
        color: #0f766e !important;
    }

    /* Text wrapper */
    .quick-contact-grid > div > div:last-child {
        width: 100%;
        min-width: 0;
    }

    /* Label — small teal tracked caps */
    .quick-contact-grid > div p:first-child {
        font-size: 0.55rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.15em !important;
        text-transform: uppercase !important;
        color: #0d9488 !important;
        line-height: 1 !important;
        margin-bottom: 3px !important;
    }

    /* Value — bold dark, ellipsis clamp */
    .quick-contact-grid > div p:last-child {
        font-size: 0.72rem !important;
        font-weight: 600 !important;
        color: #111827 !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   MOBILE SERVICES SECTION — single-row scrollable filter + swipe dots
   Arrow buttons hidden on mobile; replaced with touch swipe + dots.
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 639px) {

    /* ── Hide arrow buttons — swipe replaces them ── */
    #svc-prev,
    #svc-next {
        display: none !important;
    }

    /* ── Filter container: single-line horizontal scroll ── */
    /* Right-edge fade hints there's more to scroll */
    .svc-tabs-container {
        -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
        mask-image: linear-gradient(to right, black 88%, transparent 100%);
        padding-bottom: 2px; /* prevent box-shadow clip */
    }

    /* Single non-wrapping row — restore max-content width for scroll */
    .svc-tabs-inner {
        flex-wrap: nowrap !important;
        min-width: max-content !important;
        gap: 8px !important;
        border-bottom: none !important;
        padding: 3px 0 6px !important;
    }

    /* Base pill — generous tap target, premium feel */
    .svc-tab {
        padding: 9px 20px !important;
        padding-bottom: 9px !important;   /* override Tailwind pb-3 */
        border-radius: 999px !important;
        border: 1.5px solid #e2e8f0 !important;
        border-bottom-width: 1.5px !important;  /* override border-b-2 */
        font-size: 0.625rem !important;
        letter-spacing: 0.07em !important;
        font-weight: 700 !important;
        background: #f8fafc !important;
        color: #94a3b8 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        transition: background 0.22s ease, color 0.22s ease,
                    border-color 0.22s ease, box-shadow 0.22s ease !important;
    }

    /* Inactive hover */
    .svc-tab:not(.border-unity-500):active {
        background: #f1f5f9 !important;
        color: #64748b !important;
    }

    /* Active pill — JS adds border-unity-500 */
    .svc-tab.border-unity-500 {
        background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%) !important;
        color: #fff !important;
        border-color: transparent !important;
        border-bottom-color: transparent !important;
        box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4) !important;
        letter-spacing: 0.065em !important;
    }

    /* ── Service card — mobile refinements ── */
    .svc-card {
        padding: 1.125rem !important;
        border-radius: 1.125rem !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    }

    .svc-card h3 {
        font-size: 0.9375rem !important;
        margin-bottom: 0.375rem !important;
    }

    .svc-card p {
        font-size: 0.8125rem !important;
        margin-bottom: 1rem !important;
    }

    /* Card CTA buttons — more tap-friendly */
    .svc-card .flex.gap-2 button,
    .svc-card .flex.gap-2 a {
        padding-top: 0.625rem !important;
        padding-bottom: 0.625rem !important;
        font-size: 0.75rem !important;
        border-radius: 0.625rem !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   SWIPE DOT INDICATORS — mobile only
   ═══════════════════════════════════════════════════════════════════════ */
#svc-dots {
    display: none; /* hidden by default; JS populates + CSS shows on mobile */
}

@media (max-width: 639px) {
    #svc-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        margin-top: 1.375rem;
        padding: 0 1rem;
    }
}

.svc-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #cbd5e1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
    flex-shrink: 0;
}

.svc-dot-active {
    width: 22px;
    background: linear-gradient(90deg, #0f766e, #0d9488);
}


/* ═══════════════════════════════════════════════════════════════════════
   TABLET (≤ 1024px) — hero clip-path simplification
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-clip-section {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%) !important;
    }
}

/* Mobile: remove clip-path entirely to avoid content clipping */
@media (max-width: 768px) {
    .hero-clip-section {
        clip-path: none !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   SMALL MOBILE (≤ 480px) — additional adjustments
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    /* Footer bottom row: stack on tiny screens */
    .footer-bottom-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    /* Ensure images in cards never overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Hero padding tighter on small phones */
    .hero-clip-section > div {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   GLOBAL — prevent horizontal overflow at all sizes
   ═══════════════════════════════════════════════════════════════════════ */
html {
    overflow-x: hidden;
}


/* ═══════════════════════════════════════════════════════════════════════
   DESKTOP PREMIUM TYPOGRAPHY (≥ 1025px)
   Cormorant Garamond — luxury editorial serif for headings.
   Leaves body (DM Sans) and UI components completely untouched.
   ═══════════════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {

    /* Sub-pixel rendering — crisp edges at all sizes */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        font-feature-settings: "kern" 1, "liga" 1;
    }

    /* ── Hero h1 ────────────────────────────────────────────────────── */
    /* Cormorant Garamond: tight-tracked, large editorial scale.         */
    /* Mint text-shadow adds depth against the dark hero gradient.       */
    .hero-main-heading {
        font-family: 'Cormorant Garamond', Georgia, serif !important;
        font-size: 3.875rem !important;
        line-height: 1.06 !important;
        letter-spacing: -0.03em !important;
        font-weight: 700 !important;
        text-shadow: 0 4px 56px rgba(94, 234, 212, 0.14);
    }

    /* Accent span — italic flair, no separate colour change needed */
    .hero-accent-text {
        font-style: italic !important;
        font-weight: 700 !important;
    }

    /* Hero description — breathe out a little on wide screens */
    .hero-main-heading ~ p {
        font-size: 1.0625rem !important;
        line-height: 1.78 !important;
        letter-spacing: 0.004em;
    }

    /* ── Nav links — refined letter-spacing ────────────────────────── */
    .nav-link {
        letter-spacing: 0.045em !important;
        font-weight: 500 !important;
    }

    /* ── Section h2 — editorial serif ──────────────────────────────── */
    section h2 {
        font-family: 'Cormorant Garamond', Georgia, serif !important;
        font-size: 2.875rem !important;
        line-height: 1.1 !important;
        letter-spacing: -0.022em !important;
        font-weight: 700 !important;
    }

    /* About section h2 — slightly tighter since it lives in a content column */
    #about h2 {
        font-size: 2.625rem !important;
        line-height: 1.12 !important;
    }

    /* Section intro paragraphs — slightly more body weight */
    section h2 + p,
    section h2 ~ p:first-of-type {
        font-size: 1rem !important;
        line-height: 1.72 !important;
    }

    /* ── "Our Services / About" eyebrow labels — refined spaced caps ── */
    section span.text-unity-600,
    section span.text-unity-500 {
        letter-spacing: 0.12em;
        font-size: 0.6875rem;
        font-weight: 700;
    }
}
