:root {
    --primary: #174a72;
    --primary-dark: #103653;
    --medical-teal: #087e8b;
    --medical-light: #e8f7f5;
    --white: #ffffff;
    --background: #f5f9fc;
    --text: #263746;
    --muted: #647789;
    --border: #dce8ef;
    --danger: #d93643;
    --success: #188754;
    --shadow: 0 12px 35px rgba(23, 74, 114, 0.10);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', Arial, sans-serif;
    color: var(--primary);
    line-height: 1.3;
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
}

h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
}

p {
    margin-top: 0;
}

a {
    color: var(--medical-teal);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--primary);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.btn {
    cursor: pointer;
}

.container {
    width: min(1180px, 92%);
    margin-inline: auto;
}

.section {
    padding: 75px 0;
}

.section-light {
    background: var(--background);
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-heading p {
    color: var(--muted);
}

.eyebrow {
    display: inline-block;
    color: var(--medical-teal);
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Top contact strip */

.topbar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 9px 0;
    font-size: 0.88rem;
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar a {
    color: var(--white);
}

/* Main navigation */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 18px rgba(23, 74, 114, 0.06);
    backdrop-filter: blur(12px);
}

.navbar {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--primary);
}

.brand img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-name {
    font-family: 'Poppins', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.35;
}

.brand-name small {
    display: block;
    color: var(--medical-teal);
    font-size: 0.76rem;
    font-weight: 500;
    margin-top: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 22px;
}

.nav-links a {
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--medical-teal);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 23px;
    border: 0;
    border-radius: 9px;
    background: var(--medical-teal);
    color: var(--white);
    font-weight: 700;
    text-align: center;
    box-shadow: 0 5px 14px rgba(8, 126, 139, 0.20);
    transition: transform 0.25s ease,
                box-shadow 0.25s ease,
                background 0.25s ease;
}

.btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 9px 22px rgba(23, 74, 114, 0.20);
}

.btn-primary {
    background: var(--primary);
}

.btn-emergency {
    background: var(--danger);
    box-shadow: 0 5px 14px rgba(217, 54, 67, 0.18);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: none;
}

.btn-outline:hover {
    color: var(--white);
}

/* Homepage hero */

.hero {
    position: relative;
    overflow: hidden;
    padding: 85px 0;
    background: linear-gradient(125deg, #f0fbfa 0%, #f4f8ff 58%, #e4f3f8 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 50px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 span {
    color: var(--medical-teal);
}

.hero-content p {
    max-width: 590px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 28px;
}

.hero-image {
    position: relative;
    animation: gentle-float 5s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero-badge {
    position: absolute;
    left: -18px;
    bottom: 25px;
    max-width: 235px;
    padding: 17px 20px;
    background: var(--white);
    border-radius: 13px;
    box-shadow: var(--shadow);
    font-weight: 700;
}

.hero-badge span {
    display: block;
    color: var(--medical-teal);
    font-size: 0.85rem;
}

/* Emergency strip */

.emergency-strip {
    background: var(--primary);
    color: var(--white);
    padding: 20px 0;
}

.emergency-strip .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.emergency-strip h3,
.emergency-strip p {
    color: var(--white);
    margin-bottom: 0;
}

.pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: #ff626c;
    animation: pulse 1.6s infinite;
}

/* Cards and facilities */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.card {
    height: 100%;
    padding: 27px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(23, 74, 114, 0.04);
    transition: transform 0.3s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: #9ddbd8;
}

.card h3 {
    margin: 17px 0 10px;
    font-size: 1.15rem;
}

.card p {
    color: var(--muted);
    margin-bottom: 0;
}

.medical-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--medical-light);
    color: var(--medical-teal);
    font-size: 1.8rem;
}

/* Doctor cards */

.doctor-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(23, 74, 114, 0.05);
    transition: transform 0.3s ease;
}

.doctor-card:hover {
    transform: translateY(-5px);
}

.doctor-photo {
    width: 100%;
    aspect-ratio: 4 / 4.2;
    object-fit: cover;
    background: var(--medical-light);
}

.doctor-info {
    padding: 21px;
}

.doctor-info h3 {
    margin-bottom: 7px;
}

.doctor-info p {
    color: var(--muted);
    font-size: 0.93rem;
}

/* Notices and highlights */

.notice-card {
    padding: 28px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #e8f7f5, #f2f7ff);
    border: 1px solid #ccebe8;
}

.notice-card h3 {
    margin-bottom: 12px;
}

.notice-card p {
    color: var(--muted);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.feature-list li {
    position: relative;
    padding: 8px 0 8px 30px;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 800;
}

/* Forms */

.form-card {
    padding: 32px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 19px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #cbdbe5;
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
}

.form-control:focus {
    outline: 3px solid rgba(8, 126, 139, 0.14);
    border-color: var(--medical-teal);
}

/* Footer */

.site-footer {
    padding: 55px 0 20px;
    background: #103653;
    color: #e6f0f6;
}

.site-footer h3,
.site-footer h4 {
    color: var(--white);
}

.site-footer a {
    color: #d0e9f2;
}

.site-footer a:hover {
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 35px;
}

.footer-bottom {
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    text-align: center;
    font-size: 0.9rem;
}

/* 3D floating medical action buttons */

.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: var(--white);
    font-size: 1.45rem;
    box-shadow: 0 7px 0 rgba(0, 0, 0, 0.12),
                0 12px 25px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.float-btn:hover {
    color: var(--white);
    transform: translateY(-4px) rotate(-3deg);
    box-shadow: 0 10px 0 rgba(0, 0, 0, 0.09),
                0 16px 28px rgba(0, 0, 0, 0.17);
}

.float-whatsapp {
    background: #168b54;
}

.float-call {
    background: var(--danger);
}

.float-map {
    background: var(--medical-teal);
}

/* Scroll reveal animation */

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 98, 108, 0.65); }
    70% { box-shadow: 0 0 0 10px rgba(255, 98, 108, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 98, 108, 0); }
}

/* Responsive layout */

@media (max-width: 1000px) {
    .nav-links {
        gap: 13px;
    }

    .hero-grid {
        gap: 30px;
    }

    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .container {
        width: 92%;
    }

    .section {
        padding: 52px 0;
    }

    .navbar {
        min-height: 76px;
        gap: 12px;
    }

    .brand img {
        width: 52px;
        height: 52px;
    }

    .brand-name {
        font-size: 0.9rem;
    }

    .brand-name small {
        font-size: 0.68rem;
    }

    .nav-links {
        justify-content: center;
        gap: 10px 16px;
        padding: 0 0 15px;
    }

    .navbar {
        flex-wrap: wrap;
    }

    .hero {
        padding: 55px 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-image {
        margin: 0 0 0 12px;
    }

    .hero-badge {
        left: -10px;
    }

    .grid-3,
    .grid-4,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .emergency-strip .container {
        align-items: flex-start;
    }

    .form-card {
        padding: 22px;
    }

    .floating-actions {
        right: 12px;
        bottom: 14px;
        gap: 10px;
    }

    .float-btn {
        width: 49px;
        height: 49px;
        border-radius: 15px;
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}


/* ==================================================
   SKG VISUAL UPGRADE
   Vibrant colours, heartbeat section accent and 3D gallery
   Appended overrides preserve existing page structures.
   ================================================== */

:root {
    --primary: #123b72;
    --primary-dark: #08264b;
    --medical-teal: #007f8f;
    --medical-light: #e2fbf8;
    --white: #ffffff;
    --background: #f4f7ff;
    --text: #243247;
    --muted: #53677f;
    --border: #d8e2f0;
    --danger: #e52645;
    --success: #13875d;
    --shadow: 0 16px 42px rgba(18, 59, 114, 0.14);
    --radius: 18px;
    --accent-coral: #ff5c70;
    --accent-violet: #7657e8;
    --accent-sky: #28a8e0;
    --accent-amber: #ffb02e;
}

body {
    background: #fbfcff;
}

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

a {
    transition: color .22s ease, opacity .22s ease;
}

.topbar {
    background: linear-gradient(100deg, #08264b 0%, #123b72 55%, #007f8f 100%);
}

.site-header {
    border-bottom-color: rgba(40, 168, 224, .22);
    box-shadow: 0 6px 24px rgba(18, 59, 114, .09);
}

.nav-links a:not(.btn) {
    position: relative;
    transition: color .22s ease;
}

.nav-links a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -7px;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent-coral), var(--accent-amber));
    transition: right .22s ease;
}

.nav-links a:not(.btn):hover::after {
    right: 0;
}

.nav-links a.btn,
.btn {
    background-image: linear-gradient(135deg, #008b98, #0874c9);
    box-shadow: 0 8px 20px rgba(0, 127, 143, .22);
}

.btn-primary {
    background-image: linear-gradient(135deg, #315de8, #7657e8);
}

.btn-emergency {
    background-image: linear-gradient(135deg, #f04458, #c9153b);
    box-shadow: 0 8px 20px rgba(229, 38, 69, .23);
}

.btn-outline {
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(18,59,114,.45);
    color: var(--primary);
}

.btn:hover,
.nav-links a.btn:hover {
    filter: saturate(1.12);
}

.hero {
    background:
        radial-gradient(circle at 12% 12%, rgba(255, 176, 46, .18), transparent 30%),
        radial-gradient(circle at 86% 20%, rgba(118, 87, 232, .15), transparent 30%),
        linear-gradient(125deg, #e9fbff 0%, #f4f2ff 48%, #e5fff6 100%);
}

.hero-content h1 span {
    background: linear-gradient(100deg, #007f8f, #315de8 58%, #e52665);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    color: #007f8f;
}

.emergency-strip {
    background: linear-gradient(105deg, #123b72, #315de8 55%, #7657e8);
}

.card,
.doctor-card,
.form-card {
    border-color: rgba(49, 93, 232, .14);
    box-shadow: 0 9px 28px rgba(18, 59, 114, .07);
}

.card:nth-child(4n + 1) .medical-icon {
    background: #e2fbf8;
    color: #007f8f;
}

.card:nth-child(4n + 2) .medical-icon {
    background: #fff0f2;
    color: #e52645;
}

.card:nth-child(4n + 3) .medical-icon {
    background: #f0edff;
    color: #7657e8;
}

.card:nth-child(4n + 4) .medical-icon {
    background: #fff5df;
    color: #a86600;
}

.medical-icon {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}

.notice-card {
    background:
        radial-gradient(circle at 95% 5%, rgba(255, 176, 46, .18), transparent 28%),
        linear-gradient(130deg, #e4fbf8, #eef1ff 58%, #fff0f2);
    border-color: rgba(118, 87, 232, .18);
}

.section-light {
    background:
        radial-gradient(circle at 4% 20%, rgba(40,168,224,.07), transparent 27%),
        linear-gradient(135deg, #f3f8ff, #fbf8ff 55%, #f0fffb);
}

.site-footer {
    background: linear-gradient(115deg, #071f3e, #123b72 58%, #075c72);
}

.site-footer a:hover {
    color: #ffd16b;
}

.float-whatsapp {
    background: linear-gradient(145deg, #22c76a, #087c48);
}

.float-call {
    background: linear-gradient(145deg, #ff5c70, #c9153b);
}

.float-map {
    background: linear-gradient(145deg, #28a8e0, #315de8);
}

/* Red heartbeat trace, intentionally faint and behind readable content. */
.section,
.hero,
.emergency-strip,
.page-hero,
.cta-banner {
    position: relative;
    isolation: isolate;
}

.section > .container,
.hero > .container,
.emergency-strip > .container,
.page-hero > .container,
.cta-banner > * {
    position: relative;
    z-index: 1;
}

.section::before,
.hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
    left: -110%;
    top: 47%;
    width: 220%;
    height: 82px;
    opacity: .12;
    background: #ed2948;
    clip-path: polygon(
        0 49%, 43% 49%, 44% 44%, 45% 55%, 46% 49%,
        48% 49%, 49% 35%, 50% 68%, 51% 4%, 52% 88%,
        53% 49%, 55% 49%, 56% 42%, 57% 53%, 58% 49%,
        100% 49%, 100% 53%, 58% 53%, 57% 58%, 56% 47%,
        55% 53%, 53% 53%, 52% 100%, 51% 16%, 50% 77%,
        49% 39%, 48% 53%, 46% 53%, 45% 59%, 44% 48%,
        43% 53%, 0 53%
    );
    animation: heartbeat-travel 16s linear infinite;
}

.section:nth-of-type(even)::before {
    animation-duration: 5s;
    opacity: .09;
}

.emergency-strip::before {
    content: "";
    display: block;
    position: absolute;
    z-index: 0;
    pointer-events: none;
    left: -110%;
    top: 50%;
    width: 220%;
    height: 82px;
    transform: translateY(-50%);
    opacity: .17;
    background: #ffb4bd;
    clip-path: polygon(
        0 49%, 43% 49%, 44% 44%, 45% 55%, 46% 49%,
        48% 49%, 49% 35%, 50% 68%, 51% 4%, 52% 88%,
        53% 49%, 55% 49%, 56% 42%, 57% 53%, 58% 49%,
        100% 49%, 100% 53%, 58% 53%, 57% 58%, 56% 47%,
        55% 53%, 53% 53%, 52% 100%, 51% 16%, 50% 77%,
        49% 39%, 48% 53%, 46% 53%, 45% 59%, 44% 48%,
        43% 53%, 0 53%
    );
    animation: heartbeat-travel 13s linear infinite;
}

@keyframes heartbeat-travel {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

/* Full-width 3D hospital slider styles for the homepage. */
.hospital-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: clamp(22px, 4vw, 48px) 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(255,176,46,.22), transparent 25%),
        radial-gradient(circle at 90% 80%, rgba(118,87,232,.20), transparent 30%),
        linear-gradient(115deg, #102f63, #155e85 52%, #087f8f);
    perspective: 1400px;
    isolation: isolate;
}

.hospital-slider::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(5,20,48,.55), transparent 18%, transparent 82%, rgba(5,20,48,.55));
    z-index: 2;
}

.hospital-slider-heading {
    position: relative;
    z-index: 3;
    color: #fff;
    text-align: center;
    padding: 0 4% 20px;
}

.hospital-slider-heading h2,
.hospital-slider-heading p {
    color: #fff;
}

.hospital-slider-heading h2 {
    margin-bottom: 8px;
}

.hospital-slider-track {
    position: relative;
    min-height: clamp(240px, 38vw, 490px);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.hospital-slide {
    position: absolute;
    width: min(68vw, 850px);
    height: clamp(220px, 36vw, 450px);
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.82);
    border-radius: 24px;
    background: #dceaf4;
    box-shadow: 0 22px 55px rgba(0,0,0,.34);
    opacity: 0;
    transform: translateX(0) scale(.72) rotateY(0deg);
    transition:
        transform .85s cubic-bezier(.2,.75,.25,1),
        opacity .85s ease,
        filter .85s ease;
    backface-visibility: hidden;
}

.hospital-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hospital-slide figcaption {
    position: absolute;
    inset: auto 0 0;
    padding: 36px 24px 20px;
    color: #fff;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.35rem);
    background: linear-gradient(transparent, rgba(5,20,48,.82));
}

.hospital-slide.is-active {
    z-index: 1;
    opacity: 1;
    transform: translateX(0) scale(1) rotateY(0deg);
    filter: none;
}

.hospital-slide.is-prev {
    z-index: 0;
    opacity: .55;
    transform: translateX(-54%) scale(.78) rotateY(24deg);
    filter: saturate(.75);
}

.hospital-slide.is-next {
    z-index: 0;
    opacity: .55;
    transform: translateX(54%) scale(.78) rotateY(-24deg);
    filter: saturate(.75);
}

.hospital-slider-controls {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.hospital-slider-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 999px;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background .2s ease, transform .2s ease;
}

.hospital-slider-controls button:hover,
.hospital-slider-controls button:focus-visible {
    background: rgba(255,255,255,.3);
    transform: translateY(-2px);
}

.hospital-slider-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.hospital-slider-dots button {
    width: 12px;
    min-width: 12px;
    height: 12px;
    min-height: 12px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.45);
}

.hospital-slider-dots button[aria-current="true"] {
    background: #ffcf54;
    box-shadow: 0 0 0 4px rgba(255,207,84,.2);
}

@media (max-width: 760px) {
    .hospital-slider-track {
        min-height: 270px;
    }

    .hospital-slide {
        width: 82vw;
        height: 250px;
        border-radius: 17px;
    }

    .hospital-slide.is-prev {
        transform: translateX(-34%) scale(.78) rotateY(16deg);
    }

    .hospital-slide.is-next {
        transform: translateX(34%) scale(.78) rotateY(-16deg);
    }

    .hospital-slide figcaption {
        padding: 28px 15px 14px;
    }

    .hospital-slider::before {
        background: linear-gradient(90deg, rgba(5,20,48,.28), transparent 14%, transparent 86%, rgba(5,20,48,.28));
    }
}

@media (prefers-reduced-motion: reduce) {
    .section::before,
    .hero::before,
    .page-hero::before,
    .emergency-strip::before {
        animation: none;
        left: 0;
        width: 100%;
        opacity: .06;
    }

    .hospital-slide {
        transition: none;
    }
}


/* ==================================================
   HEARTBEAT TRACE UPDATE
   Thin, sharp ECG waveform inspired by the supplied reference image.
   This overrides only the previous heartbeat drawing and animation.
   ================================================== */
:root {
    --heartbeat-trace: #e52323;
}

.section::before,
.hero::before,
.page-hero::before,
.emergency-strip::before {
    content: "";
    position: absolute;
    z-index: 0;
    pointer-events: none;
    left: 0;
    top: 50%;
    width: 100%;
    height: 92px;
    transform: translateY(-50%);
    opacity: .26;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='92' viewBox='0 0 300 92'%3E%3Cpath d='M0 46 H38 L43 46 L48 37 L54 55 L61 46 L67 46 L73 7 L81 88 L91 31 L101 46 H139 L144 46 L149 37 L155 55 L162 46 L168 46 L174 7 L182 88 L192 31 L202 46 H240 L245 46 L250 37 L256 55 L263 46 L269 46 L275 7 L283 88 L293 31 L300 46' fill='none' stroke='%23e52323' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 300px 92px;
    background-position: 0 center;
    clip-path: none;
    animation: heartbeat-trace-left-to-right 8s linear infinite;
}

.emergency-strip::before {
    opacity: .24;
}

@keyframes heartbeat-trace-left-to-right {
    from { background-position: -300px center; }
    to   { background-position: 0 center; }
}

@media (prefers-reduced-motion: reduce) {
    .section::before,
    .hero::before,
    .page-hero::before,
    .emergency-strip::before {
        animation: none;
        background-position: 0 center;
        opacity: .16;
    }
}


/* Department directory cards: shared by homepage and doctors page */
.department-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f4fbff 0%, #f6f4ff 48%, #f0fffb 100%);
}
.department-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.department-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 245px;
    padding: 25px;
    overflow: hidden;
    border: 1px solid rgba(118, 87, 232, .16);
    border-radius: 20px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 10px 28px rgba(18,59,114,.08);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.department-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, #28a8e0, #7657e8, #ff5c70, #ffb02e);
}
.department-card:hover {
    transform: translateY(-7px);
    border-color: rgba(40,168,224,.55);
    box-shadow: 0 18px 38px rgba(18,59,114,.15);
}
.department-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 17px;
    color: #fff;
    font-size: 1.65rem;
    background: linear-gradient(135deg, #007f8f, #28a8e0);
    box-shadow: 0 8px 18px rgba(40,168,224,.23);
}
.department-card:nth-child(3n + 2) .department-icon { background: linear-gradient(135deg, #7657e8, #a17cf5); }
.department-card:nth-child(3n) .department-icon { background: linear-gradient(135deg, #e52645, #ff7b65); }
.department-card h3 { margin: 17px 0 9px; font-size: 1.08rem; }
.department-card p { margin: 0 0 18px; color: var(--muted); font-size: .94rem; line-height: 1.65; }
.department-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-weight: 700;
    color: var(--medical-teal);
}
.department-link span { transition: transform .2s ease; }
.department-link:hover span { transform: translateX(4px); }
.department-footer-action { display: flex; justify-content: center; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.doctor-card[id] { scroll-margin-top: 115px; }
@media (max-width: 900px) { .department-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .department-grid { grid-template-columns: 1fr; } .department-card { min-height: 0; padding: 22px; } .department-footer-action .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .department-card, .department-link span { transition: none; } }
