/**
 * Hospital theme — cards, typography, section polish (content unchanged in CMS).
 */

:root {
    --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 20px 48px rgba(15, 118, 110, 0.14);
    --radius-card: 16px;
    --gradient-brand: linear-gradient(135deg, #0f766e 0%, #2563eb 55%, #7c3aed 100%);
}

body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

/* Hide old overlay pattern if cached */
.interactive-card-overlay {
    display: none !important;
}

/* —— Universal hospital card (h-card) —— */
.h-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: var(--radius-card);
    border: 1px solid #dbeafe;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.h-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: var(--gradient-brand);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.h-card-hit {
    position: absolute;
    inset: 0;
    z-index: 6;
    border-radius: inherit;
    text-indent: -9999px;
    overflow: hidden;
}

.h-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, #ccfbf1 0%, #bae6fd 50%, #ddd6fe 100%);
}

.h-card-media img {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.h-card-media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 8rem;
}

.h-card-icon-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: #0f766e;
    font-size: 1.65rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.h-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.35rem;
    padding: 1rem 1.1rem 1.05rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.h-card-body h3 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--brand-heading, #0b2948);
    text-transform: none;
    letter-spacing: 0;
}

.h-card-excerpt {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.h-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid #e2e8f0;
}

.h-card-foot-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0f766e;
}

.h-card-foot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    color: #ffffff;
    font-size: 0.72rem;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .h-card:hover,
    .h-card:focus-within {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
        border-color: #99f6e4;
    }

    .h-card:hover::after,
    .h-card:focus-within::after {
        opacity: 1;
    }

    .h-card:hover .h-card-media img,
    .h-card:focus-within .h-card-media img {
        transform: scale(1.07);
    }

    .h-card:hover .h-card-foot-icon,
    .h-card:focus-within .h-card-foot-icon {
        transform: translateX(4px) scale(1.05);
    }

    .h-card:hover .h-card-media,
    .h-card:focus-within .h-card-media {
        filter: saturate(1.08);
    }
}

/* Department cards — colour variety when no photo (CMS wrapper safe) */
.home-departments .departments-grid > *:nth-child(8n + 1) .department-card .h-card-media,
.home-departments .reveal-stagger > *:nth-child(8n + 1) .department-card .h-card-media {
    background: linear-gradient(145deg, #ccfbf1, #a7f3d0);
}

.home-departments .departments-grid > *:nth-child(8n + 2) .department-card .h-card-media,
.home-departments .reveal-stagger > *:nth-child(8n + 2) .department-card .h-card-media {
    background: linear-gradient(145deg, #dbeafe, #93c5fd);
}

.home-departments .departments-grid > *:nth-child(8n + 3) .department-card .h-card-media,
.home-departments .reveal-stagger > *:nth-child(8n + 3) .department-card .h-card-media {
    background: linear-gradient(145deg, #ede9fe, #c4b5fd);
}

.home-departments .departments-grid > *:nth-child(8n + 4) .department-card .h-card-media,
.home-departments .reveal-stagger > *:nth-child(8n + 4) .department-card .h-card-media {
    background: linear-gradient(145deg, #ffedd5, #fdba74);
}

.home-departments .departments-grid > *:nth-child(8n + 5) .department-card .h-card-media,
.home-departments .reveal-stagger > *:nth-child(8n + 5) .department-card .h-card-media {
    background: linear-gradient(145deg, #fce7f3, #f9a8d4);
}

.home-departments .departments-grid > *:nth-child(8n + 6) .department-card .h-card-media,
.home-departments .reveal-stagger > *:nth-child(8n + 6) .department-card .h-card-media {
    background: linear-gradient(145deg, #e0f2fe, #67e8f9);
}

.home-departments .departments-grid > *:nth-child(8n + 7) .department-card .h-card-media,
.home-departments .reveal-stagger > *:nth-child(8n + 7) .department-card .h-card-media {
    background: linear-gradient(145deg, #ecfccb, #bef264);
}

.home-departments .departments-grid > *:nth-child(8n + 8) .department-card .h-card-media,
.home-departments .reveal-stagger > *:nth-child(8n + 8) .department-card .h-card-media {
    background: linear-gradient(145deg, #fef3c7, #fcd34d);
}

.home-departments .departments-grid > *:nth-child(8n + 1) .h-card-icon-ring,
.home-departments .reveal-stagger > *:nth-child(8n + 1) .h-card-icon-ring { color: #0f766e; }
.home-departments .departments-grid > *:nth-child(8n + 2) .h-card-icon-ring,
.home-departments .reveal-stagger > *:nth-child(8n + 2) .h-card-icon-ring { color: #2563eb; }
.home-departments .departments-grid > *:nth-child(8n + 3) .h-card-icon-ring,
.home-departments .reveal-stagger > *:nth-child(8n + 3) .h-card-icon-ring { color: #7c3aed; }
.home-departments .departments-grid > *:nth-child(8n + 4) .h-card-icon-ring,
.home-departments .reveal-stagger > *:nth-child(8n + 4) .h-card-icon-ring { color: #ea580c; }
.home-departments .departments-grid > *:nth-child(8n + 5) .h-card-icon-ring,
.home-departments .reveal-stagger > *:nth-child(8n + 5) .h-card-icon-ring { color: #db2777; }
.home-departments .departments-grid > *:nth-child(8n + 6) .h-card-icon-ring,
.home-departments .reveal-stagger > *:nth-child(8n + 6) .h-card-icon-ring { color: #0891b2; }
.home-departments .departments-grid > *:nth-child(8n + 7) .h-card-icon-ring,
.home-departments .reveal-stagger > *:nth-child(8n + 7) .h-card-icon-ring { color: #65a30d; }
.home-departments .departments-grid > *:nth-child(8n + 8) .h-card-icon-ring,
.home-departments .reveal-stagger > *:nth-child(8n + 8) .h-card-icon-ring { color: #ca8a04; }

/* News cards */
.news-card .news-date-badge {
    z-index: 2;
}

.news-card .h-card-media {
    aspect-ratio: 16 / 10;
}

/* Doctor cards — listing grid (vertical) */
.doctors-page-grid .doctor-card.h-card {
    min-height: 100%;
}

.doctors-page-grid .doctor-card-media {
    aspect-ratio: 3 / 4;
}

.doctors-page-grid .doctor-designation {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f766e;
}

/* Directors — horizontal featured cards */
.directors-grid .doctor-card.h-card {
    display: grid;
    grid-template-columns: minmax(10rem, 12rem) minmax(0, 1fr);
    flex-direction: unset;
    max-width: 36rem;
    flex: 1 1 min(100%, 22rem);
}

.directors-grid .doctor-card-media {
    aspect-ratio: auto;
    min-height: 100%;
}

.directors-grid .doctor-card-media img {
    height: 100%;
    min-height: 12rem;
    object-fit: cover;
}

.directors-grid .doctor-card-body {
    justify-content: center;
    padding: 1.2rem 1.35rem;
}

.directors-grid .doctor-card .h-card-excerpt {
    -webkit-line-clamp: 4;
}

/* Stats */
.h-card.stat-card {
    text-align: center;
    padding: 1.15rem 0.85rem;
    background: linear-gradient(160deg, #ffffff, #f0fdfa);
}

.stats-band .h-card.stat-card {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
}

.stats-band .h-card.stat-card .stat-value,
.stats-band .h-card.stat-card .stat-label {
    color: #f8fafc;
}

.stats-band .h-card.stat-card .stat-icon {
    color: #99f6e4;
}

.h-card.stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 800;
}

.h-card.stat-card .stat-label {
    font-size: 0.86rem;
    color: #475569;
}

/* Testimonials */
.testimonial-card {
    border-radius: var(--radius-card);
    border: 1px solid #a7f3d0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Homepage sections */
.page-home .home-departments {
    background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 50%, #e0f2fe 100%);
    padding: 3.5rem 0;
}

.page-home .home-departments .auto-grid,
.page-home .home-departments .departments-grid {
    gap: 1.35rem;
}

/* Departments: flex 4-up (same pattern as doctor cards — avoids narrow pill layout) */
.page-home .home-departments .departments-grid.reveal-stagger,
.page-home .home-departments .reveal-stagger.auto-grid.cols-4 {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1.35rem;
    width: 100%;
}

.page-home .home-departments .departments-grid.reveal-stagger > *,
.page-home .home-departments .reveal-stagger.auto-grid.cols-4 > * {
    display: flex !important;
    flex: 1 1 calc(25% - 1.02rem) !important;
    max-width: calc(25% - 1.02rem) !important;
    min-width: min(100%, 260px) !important;
    width: auto !important;
}

.page-home .home-departments .departments-grid .department-card,
.page-home .home-departments .reveal-stagger.auto-grid.cols-4 .department-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* Department tile: image + name; summary & Explore on hover; full card links out */
.department-card--tile {
    flex-direction: column;
    min-height: 100%;
}

.department-card--tile .h-card-media {
    flex: 1 1 auto;
    aspect-ratio: 4 / 3;
    min-height: 10.5rem;
}

.department-card--tile .department-card-nameplate {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 2rem 1rem 0.85rem;
    background: linear-gradient(180deg, transparent 0%, rgba(11, 41, 72, 0.82) 68%);
    pointer-events: none;
}

.department-card--tile .department-card-nameplate h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.35);
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}

.department-card--tile .department-card-detail {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.35rem;
    padding: 1rem 1.05rem 1.1rem;
    background: linear-gradient(
        180deg,
        rgba(15, 118, 110, 0.55) 0%,
        rgba(11, 41, 72, 0.94) 45%,
        rgba(11, 41, 72, 0.98) 100%
    );
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: none;
}

.department-card--tile .department-card-detail .h-card-excerpt {
    margin: 0;
    color: #e2e8f0;
    -webkit-line-clamp: 4;
    flex: 1;
}

.department-card--tile .department-card-detail .h-card-foot {
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.department-card--tile .department-card-detail .h-card-foot-label {
    color: #99f6e4;
}

.department-card--tile .department-card-detail .h-card-foot-icon {
    background: rgba(255, 255, 255, 0.95);
    color: #0f766e;
}

@media (hover: hover) {
    .department-card--tile:hover .department-card-detail,
    .department-card--tile:focus-within .department-card-detail {
        opacity: 1;
        visibility: visible;
    }

    .department-card--tile:hover .department-card-nameplate,
    .department-card--tile:focus-within .department-card-nameplate {
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .department-card--tile .department-card-detail {
        opacity: 1;
        visibility: visible;
    }

    .department-card--tile .department-card-nameplate {
        opacity: 1;
        background: linear-gradient(180deg, transparent 0%, rgba(11, 41, 72, 0.75) 100%);
    }
}

@media (max-width: 1100px) {
    .page-home .home-departments .departments-grid.reveal-stagger > *,
    .page-home .home-departments .reveal-stagger.auto-grid.cols-4 > * {
        flex: 1 1 calc(50% - 0.68rem) !important;
        max-width: calc(50% - 0.68rem) !important;
    }
}

@media (max-width: 560px) {
    .page-home .home-departments .departments-grid.reveal-stagger > *,
    .page-home .home-departments .reveal-stagger.auto-grid.cols-4 > * {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
}

.page-home .home-directors {
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
    padding-bottom: 3rem;
}

.page-home .home-directors .doctors-showcase-grid {
    min-height: 0;
}

.page-home .home-news {
    background: linear-gradient(180deg, #fff1f2 0%, #fff7ed 40%, #f8fafc 100%);
}

.page-home .section-head-home h2::after {
    width: 5rem;
    height: 5px;
}

/* Inner pages */
.page-inner .highlights-panel,
.page-inner .inner-intro-panel {
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
}

@media (prefers-reduced-motion: reduce) {
    .h-card:hover,
    .h-card:focus-within {
        transform: none;
    }

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

@media (max-width: 900px) {
    .directors-grid .doctor-card.h-card {
        grid-template-columns: 1fr;
    }

    .directors-grid .doctor-card-media {
        aspect-ratio: 16 / 10;
        min-height: 12rem;
    }
}

/* CMS-safe card grids (inner pages + departments) */
.reveal-stagger.auto-grid,
.inner-cards-wrap .auto-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1.25rem;
}

.reveal-stagger.auto-grid.cols-3 > *,
.reveal-stagger.auto-grid.cols-4 > *,
.inner-cards-wrap .auto-grid > * {
    display: flex;
}

.reveal-stagger.auto-grid.cols-3 > * {
    flex: 1 1 calc(33.333% - 0.85rem);
    max-width: calc(33.333% - 0.85rem);
    min-width: min(100%, 260px);
}

.reveal-stagger.auto-grid.cols-4 > * {
    flex: 1 1 calc(25% - 0.95rem);
    max-width: calc(25% - 0.95rem);
    min-width: min(100%, 220px);
}

/* Do not let generic cols-4 flex rules crush homepage department tiles */
.page-home .home-departments .reveal-stagger.auto-grid.cols-4 > * {
    flex: 1 1 calc(25% - 1.02rem) !important;
    max-width: calc(25% - 1.02rem) !important;
    min-width: min(100%, 260px) !important;
}

.reveal-stagger.auto-grid .h-card,
.reveal-stagger.auto-grid .auto-card,
.inner-cards-wrap .auto-grid .h-card {
    width: 100%;
}

/* —— Doctor showcase cards: flex 4-up (CMS-wrapper safe) —— */
.doctors-showcase-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.35rem;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    min-height: 8rem;
}

.doctors-showcase-grid > * {
    flex: 1 1 calc(25% - 1.02rem);
    max-width: calc(25% - 1.02rem);
    min-width: min(100%, 220px);
    display: flex;
}

/* Only hide obvious non-card CMS blocks (text), never hide doctor cards */
.doctors-showcase-grid > .cms-plugin:has(.text-plugin),
.doctors-showcase-grid > div:has(> .text-plugin):not(:has(.doctor-card--showcase)) {
    display: none !important;
    flex: 0 0 0;
    max-width: 0;
    overflow: hidden;
}

.doctor-card--showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    border: none;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Homepage: one director — centered, not a wide empty row */
.directors-showcase.doctors-showcase-grid {
    justify-content: center;
}

.directors-showcase.doctors-showcase-grid > *:only-child {
    flex: 0 1 min(100%, 300px);
    max-width: 300px;
}

.directors-showcase .doctor-card--showcase:only-child {
    max-width: 300px;
    margin: 0 auto;
}

/* Doctors page: hide duplicate blocks only (keep doctor grid in inner_cards) */
body[data-page-slug="doctors"] .inner-feature-section,
body[data-page-slug="doctors"] .inner-about-section,
body[data-page-slug="doctors"] .inner-story-section,
body[data-page-slug="doctors"] .inner-highlights-section {
    display: none !important;
}

/* Wrong template fallback: style inner_cards area as doctor grid */
body[data-page-slug="doctors"] .inner-cards-section .auto-grid,
body[data-page-slug="doctors"] .inner-cards-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 1.35rem;
    justify-content: flex-start;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

body[data-page-slug="doctors"] .inner-cards-section .auto-grid > *,
body[data-page-slug="doctors"] .inner-cards-wrap > * {
    flex: 1 1 calc(25% - 1.02rem);
    max-width: calc(25% - 1.02rem);
    min-width: min(100%, 220px);
}

body[data-page-slug="facilities"] .inner-feature-section,
body[data-page-slug="facilities"] .inner-about-section,
body[data-page-slug="facilities"] .inner-highlights-section,
body[data-page-slug="facilities"] .inner-cards-section {
    display: none !important;
}

.doctors-page-section .doctors-showcase-grid--empty-hint {
    text-align: center;
    color: #64748b;
    padding: 2rem;
    width: 100%;
}

.doctor-card-hit {
    position: absolute;
    inset: 0;
    z-index: 8;
    border-radius: inherit;
    text-indent: -9999px;
    overflow: hidden;
}

.doctor-card-photo-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(160deg, #e0f2fe 0%, #ccfbf1 100%);
}

.doctor-card-qr-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0.2rem;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
    cursor: pointer;
    line-height: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.doctor-card-qr-badge img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0;
    border-radius: 4px;
    pointer-events: none;
}

.doctor-card-qr-expanded {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.45rem;
    padding: 0.4rem 0.5rem 0.35rem;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
}

.doctor-card-qr-expanded img {
    display: block;
    width: 7.25rem !important;
    height: 7.25rem !important;
    object-fit: contain !important;
    margin: 0 !important;
    border-radius: 5px !important;
}

.doctor-card-qr-hint {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0b2948;
    text-align: center;
    max-width: 8.5rem;
}

.doctor-card-hover-copy {
    width: 100%;
}

.doctor-card-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
    transition: transform 0.45s ease;
}

.doctor-card-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #0f766e;
    font-size: 3rem;
    opacity: 0.45;
}

.doctor-card-label {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 4;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.doctor-card-label h3 {
    margin: 0 0 0.15rem;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--brand-heading, #0b2948);
    text-transform: none;
    letter-spacing: 0;
}

.doctor-card-label p {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f766e;
    line-height: 1.35;
}

.doctor-card-hover-panel {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(15, 118, 110, 0.9));
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.doctor-card-hover-panel h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: none;
}

.doctor-card-hover-panel .doctor-designation {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #bae6fd;
}

.doctor-card-hover-panel .doctor-bio {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (hover: hover) {
    .doctor-card--showcase:hover,
    .doctor-card--showcase:focus-within {
        transform: translateY(-8px);
        box-shadow: 0 22px 44px rgba(37, 99, 235, 0.2);
    }

    .doctor-card--showcase:hover .doctor-card-photo-wrap img,
    .doctor-card--showcase:focus-within .doctor-card-photo-wrap img {
        transform: scale(1.05);
    }

    .doctor-card--showcase:hover .doctor-card-hover-panel,
    .doctor-card--showcase:focus-within .doctor-card-hover-panel {
        opacity: 1;
    }

    .doctor-card--showcase:hover .doctor-card-label,
    .doctor-card--showcase:focus-within .doctor-card-label {
        opacity: 0;
        transform: translateY(8px);
    }

    .doctor-card--showcase:hover .doctor-card-qr-badge,
    .doctor-card--showcase:focus-within .doctor-card-qr-badge {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .doctor-card--showcase:hover .doctor-card-qr-expanded,
    .doctor-card--showcase:focus-within .doctor-card-qr-expanded,
    .doctor-card--showcase.doctor-card--qr-open .doctor-card-qr-expanded {
        display: flex;
    }
}

.doctor-card--showcase.doctor-card--qr-open .doctor-card-hover-panel {
    opacity: 1;
    z-index: 11;
    pointer-events: auto;
}

.doctor-card--showcase.doctor-card--qr-open .doctor-card-qr-badge {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.doctor-card--showcase.doctor-card--qr-open .doctor-card-label {
    opacity: 0;
}

@media (hover: none) {
    .doctor-card-hover-panel {
        opacity: 1;
        position: relative;
        inset: auto;
        background: linear-gradient(180deg, #f0fdfa, #e0f2fe);
        color: #334155;
    }

    .doctor-card-hover-panel h3,
    .doctor-card-hover-panel .doctor-designation,
    .doctor-card-hover-panel .doctor-bio {
        color: inherit;
    }

    .doctor-card-hover-panel .doctor-designation {
        color: #0f766e;
    }

    .doctor-card--showcase.doctor-card--qr-open .doctor-card-photo-wrap .doctor-card-hover-panel {
        position: absolute;
        inset: 0;
        z-index: 11;
        justify-content: center;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(15, 118, 110, 0.94));
        color: #ffffff;
    }

    .doctor-card--showcase.doctor-card--qr-open .doctor-card-hover-panel h3,
    .doctor-card--showcase.doctor-card--qr-open .doctor-card-hover-panel .doctor-designation,
    .doctor-card--showcase.doctor-card--qr-open .doctor-card-hover-panel .doctor-bio {
        color: #ffffff;
    }

    .doctor-card--showcase.doctor-card--qr-open .doctor-card-hover-panel .doctor-designation {
        color: #bae6fd;
    }

    .doctor-card--showcase.doctor-card--qr-open .doctor-card-hover-copy {
        display: none;
    }
}

/* Why choose us — numbered steps + image collage */
.choose-us-innovative {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2rem;
    align-items: center;
}

.choose-us-steps {
    position: relative;
}

.choose-us-steps ul,
.choose-us-steps ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: choose-step;
}

.choose-us-steps li {
    position: relative;
    margin: 0 0 1.65rem;
    padding: 0 0 0 3.25rem;
    counter-increment: choose-step;
}

.choose-us-steps li:last-child {
    margin-bottom: 0;
}

.choose-us-steps li::before {
    content: counter(choose-step);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #0f766e);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
    z-index: 2;
}

.choose-us-steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 1.05rem;
    top: 2.45rem;
    bottom: -1.35rem;
    width: 2px;
    background: repeating-linear-gradient(
        180deg,
        #94a3b8 0,
        #94a3b8 5px,
        transparent 5px,
        transparent 10px
    );
    z-index: 1;
}

.choose-us-steps li strong {
    display: block;
    font-size: 1.02rem;
    color: var(--brand-heading, #0b2948);
    margin-bottom: 0.25rem;
}

.choose-us-steps li {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.55;
}

.choose-us-media-collage {
    position: relative;
    min-height: 18rem;
    padding: 0.5rem;
}

.choose-us-media-collage::before {
    content: "";
    position: absolute;
    inset: 8% 5% 5% 12%;
    border-radius: 20px;
    background: linear-gradient(145deg, #dbeafe, #ccfbf1);
    z-index: 0;
}

.choose-us-media-collage img,
.choose-us-media-collage picture img {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-height: none;
    min-height: 16rem;
    margin: 0;
    border-radius: 18px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

/* Stats only on homepage — hide if pasted on inner pages */
.page-inner .stats-band,
.page-inner .inner-highlights .stat-card,
.page-inner .about-pillars .stat-card {
    display: none !important;
}

.page-doctors .doctors-page-intro,
.page-doctors .inner-highlights-section,
.page-doctors .inner-feature-section,
.page-facilities .inner-feature-section {
    display: none !important;
}

.doctors-grid-empty-msg {
    flex: 1 1 100%;
    max-width: 100%;
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 2.5rem 1.5rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    margin: 0;
}

@media (max-width: 1100px) {
    .doctors-showcase-grid > * {
        flex: 1 1 calc(33.333% - 0.9rem);
        max-width: calc(33.333% - 0.9rem);
    }
}

@media (max-width: 800px) {
    .doctors-showcase-grid > * {
        flex: 1 1 calc(50% - 0.68rem);
        max-width: calc(50% - 0.68rem);
    }

    .choose-us-innovative {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .doctors-showcase-grid > * {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* —— Header logo: prominent lockup —— */
.site-header .brand--prominent {
    min-width: 0;
    flex: 0 1 auto;
    max-width: min(100%, 320px);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem 0.4rem 0.45rem;
    border-radius: 14px;
    background: linear-gradient(145deg, #f0fdfa 0%, #e0f2fe 55%, #ffffff 100%);
    border: 1px solid rgba(15, 118, 110, 0.28);
    box-shadow:
        0 4px 18px rgba(15, 118, 110, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.site-header .brand--prominent:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(15, 118, 110, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.site-header .brand--prominent > a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.site-header .brand--prominent > a:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 3px;
    border-radius: 10px;
}

.site-header .brand--prominent img {
    display: block;
    height: 58px !important;
    width: auto !important;
    max-width: min(240px, 42vw) !important;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(11, 41, 72, 0.12));
}

.site-header .nav-wrap {
    min-height: 74px;
    gap: 1rem;
}

.site-header .main-nav {
    margin-left: auto;
}

/* Doctor profile — appointment QR */
.doctor-appointment-qr {
    margin-top: 1.75rem;
    padding: 1.15rem 1.2rem;
    border-radius: 14px;
    border: 1px solid #bae6fd;
    background: linear-gradient(145deg, #f0fdfa 0%, #ffffff 100%);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.08);
    max-width: 16rem;
}

.doctor-appointment-qr__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-heading, #0b2948);
}

.doctor-appointment-qr__lead {
    margin: 0 0 0.85rem;
    font-size: 0.86rem;
    line-height: 1.45;
    color: #64748b;
}

.doctor-appointment-qr__card {
    display: inline-block;
    padding: 0.5rem;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    line-height: 0;
}

.doctor-appointment-qr__card img {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: contain;
}

/* Stat counter animation */
.stat-card .stat-value {
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-value.is-counting {
    opacity: 0.85;
}
