* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #1e293b;
    background: #ffffff;
    line-height: 1.6;
}

.container {
    width: min(1140px, 92%);
    margin: 0 auto;
}

a {
    color: #1d4ed8;
}

.content-prose h1,
.content-prose h2,
.content-prose h3,
.content-prose h4 {
    color: #0b3a5b;
    margin-top: 0;
}

.content-prose p {
    margin: 0 0 0.85rem;
}

.content-prose ul {
    padding-left: 1.2rem;
}

.flash-wrap {
    margin-top: 1rem;
}

.flash {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.6rem;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.flash.error {
    background: #fee2e2;
    border-color: #fca5a5;
}

.top-bar {
    background: #047a78;
    color: #e2e8f0;
    font-size: 0.82rem;
}

.top-bar-wrap {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #dbe5ef;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 62px;
    gap: 1.2rem;
}

.brand a {
    color: #0b3a5b;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
}

.brand p,
.brand h1,
.brand h2,
.brand h3 {
    display: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 180px;
    flex-shrink: 0;
}

.brand img {
    display: block;
    height: 48px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
}

.brand-fallback {
    white-space: nowrap;
}

.main-nav {
    margin-left: 0.45rem;
}

/* Robust menu reset for django CMS output in edit/preview/live modes */
.site-header .main-nav ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.site-header .main-nav > ul,
.site-header .main-nav > ul.menu-root,
.site-header .main-nav > div > ul,
.site-header .main-nav > div > div > ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
}

.site-header .main-nav li {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.main-nav a {
    color: #0f172a;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    padding: 0.45rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
}

.main-nav a:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.site-header .main-nav > ul > li > a,
.site-header .main-nav > ul.menu-root > li > a,
.site-header .main-nav > div > ul > li > a,
.site-header .main-nav > div > div > ul > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
}

.site-header .main-nav li.selected > a,
.site-header .main-nav li.ancestor > a {
    background: #0f766e;
    color: #ffffff;
}

/* Dropdown styling for children pages if used */
.site-header .main-nav li ul {
    display: none !important;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 210px;
    background: #ffffff;
    border: 1px solid #dbe5ef;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    padding: 0.35rem !important;
    margin: 0 !important;
    z-index: 20;
}

.site-header .main-nav li:hover > ul {
    display: block !important;
}

.site-header .main-nav li ul ul {
    left: calc(100% + 8px);
    top: 0;
}

.site-header .main-nav li ul li {
    list-style: none !important;
}

.site-header .main-nav li ul a {
    display: block;
    border-radius: 4px;
}

.hero {
    padding: 0;
}

.hero-copy h1,
.hero-copy h2 {
    color: #ffffff;
    margin-top: 0;
}

.hero-media img,
.hero-media iframe,
.hero-media video {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    min-height: 420px;
    max-height: 520px;
    object-fit: cover;
}

.hero-cta p {
    margin: 0.8rem 0 0;
}

.hero-media.has-slider {
    position: relative;
}

.hero-media-slides > * {
    margin: 0;
}

.hero-media-wrap {
    position: relative;
    background: #0f172a;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.58) 0%, rgba(15, 23, 42, 0.36) 35%, rgba(15, 23, 42, 0.15) 100%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2.2rem;
    z-index: 2;
}

.hero-copy {
    max-width: 540px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
}

.hero-copy .content-prose p,
.hero-copy .content-prose li,
.hero-copy .content-prose a {
    color: #ecfeff;
}

.hero-copy .content-prose h1,
.hero-copy .content-prose h2,
.hero-copy .content-prose h3 {
    color: #ffffff !important;
    text-shadow: none;
}

.hero-copy .btn-primary {
    background: #0f766e;
    border: 1px solid rgba(236, 254, 255, 0.6);
}

.hero-slider-controls {
    position: absolute;
    inset: 50% 0 auto 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 0.9rem;
    pointer-events: none;
    z-index: 3;
}

.hero-slider-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(15, 23, 42, 0.45);
    color: #ffffff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
}

.hero-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    z-index: 3;
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
}

.hero-slider-dot.active {
    background: #ffffff;
}

/* Ensure header always stays above hero slider overlays */
.site-header {
    position: sticky;
    top: 0 !important;
    z-index: 10000 !important;
    background: #ffffff !important;
}

.hero-media-wrap {
    position: relative;
    z-index: 0;
}

.inner-hero {
    background: linear-gradient(rgba(6, 95, 70, 0.82), rgba(6, 95, 70, 0.82)),
        linear-gradient(120deg, #0f766e, #0b3a5b);
    color: #ecfeff;
    padding: 2.3rem 0;
}

.inner-hero .section-head {
    max-width: 780px;
}

.inner-hero h1,
.inner-hero h2,
.inner-hero h3,
.inner-hero p {
    color: #ecfeff;
    margin: 0;
}

.section-tight .content-prose p:last-child {
    margin-bottom: 0;
}

.section {
    padding: 4rem 0;
}

.section-tight {
    padding: 2rem 0;
}

.section.alt {
    background: #f8fafc;
}

.section-head h1,
.section-head h2,
.section-head h3 {
    margin-top: 0;
    color: #ffffff;
}

.stats-band {
    background: #0b3a5b;
    color: #f8fafc;
}

.departments {
    background: #ffffff;
}

.choose-us {
    background: #ffffff;
}

.grid-2,
.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.appointment-box {
    background: #0f766e;
    color: #ecfeff;
    border-radius: 16px;
    padding: 1.5rem 2rem;
}

.appointment-box > * {
    max-width: 720px;
}

.appointment-box h2,
.appointment-box h3,
.appointment-box h4,
.appointment-box p,
.appointment-box li,
.appointment-box a {
    color: #ecfeff !important;
}

.appointment-box div,
.appointment-box span,
.appointment-box p,
.appointment-box li,
.appointment-box h1,
.appointment-box h2,
.appointment-box h3,
.appointment-box h4,
.appointment-box h5,
.appointment-box h6 {
    background: transparent !important;
    border-color: transparent !important;
    color: #ecfeff !important;
}

.appointment-box h2,
.appointment-box h3,
.appointment-box h4 {
    margin: 0 0 0.55rem;
}

.appointment-box p {
    margin: 0 0 0.7rem;
    font-size: 0.95rem;
}

/* Normalize pasted/inline editor styles inside CTA block */
.appointment-box span,
.appointment-box strong,
.appointment-box em {
    background: transparent !important;
    color: inherit !important;
}

.appointment-box .btn-primary {
    background: #ffffff;
    color: #0f766e !important;
    font-weight: 600;
}

.appointment-box .btn-primary:hover {
    background: #e6fffb;
}

.site-footer {
    background: #047a78;
    color: #e5f8f7;
    padding: 2.2rem 0 1rem;
}

.footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;
    gap: 1.6rem;
    margin-bottom: 1rem;
}

.footer-grid h1,
.footer-grid h2,
.footer-grid h3,
.footer-grid h4 {
    color: #ffffff;
    font-size: 0.95rem;
    margin: 0 0 0.45rem;
}

.footer-grid p,
.footer-grid li,
.footer-grid a {
    color: #eaf8f7;
    font-size: 0.78rem;
    line-height: 1.7;
    text-decoration: none;
}

.footer-grid ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.footer-menu-auto ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-menu-auto li {
    list-style: none;
}

.footer-menu-list a {
    display: inline-block;
    padding: 0.05rem 0;
}

.social-links,
.footer-col-social,
.footer-col-social > div {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    flex-wrap: wrap;
}

.social-links a,
.footer-social-link {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.social-links a:hover,
.footer-social-link:hover {
    background: rgba(255, 255, 255, 0.14);
    text-decoration: none;
}

.footer-grid a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(224, 255, 252, 0.45);
    padding-top: 1rem;
    font-size: 0.75rem;
    color: #d7f3f1;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom > * {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.auto-grid {
    display: grid;
    gap: 1.25rem;
}

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

.auto-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.auto-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.85rem;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.05);
}

.auto-card img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 0.55rem;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Stat cards: default for light backgrounds (inner pages, alt sections) */
.stat-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #0f766e;
}

.stat-card .stat-label {
    font-size: 0.95rem;
    color: #334155;
}

/* Homepage stats strip only: light text on dark band */
.stats-band .stat-card {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #f8fafc;
}

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

.stats-band .stat-card .stat-label {
    color: rgba(248, 250, 252, 0.92);
}

.department-card h3,
.doctor-card h3,
.news-card h3 {
    margin: 0.1rem 0 0.2rem;
    color: #0b3a5b;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.testimonial-card blockquote {
    margin: 0 0 1rem;
    font-style: italic;
    color: #0f172a;
}

.testimonial-card h4 {
    margin: 0;
}

.news-card .meta {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.muted {
    color: #64748b;
}

.btn-link {
    font-weight: 600;
    text-decoration: none;
}

.btn-primary {
    display: inline-block;
    background: #0f766e;
    color: #ffffff;
    padding: 0.62rem 1rem;
    border-radius: 4px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
}

aside .auto-card,
aside .content-prose {
    margin-bottom: 1rem;
}

.hospital-contact-form {
    display: grid;
    gap: 0.45rem;
}

.hospital-contact-form input,
.hospital-contact-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    padding: 0.5rem 0.6rem;
    font: inherit;
}

.hospital-contact-form label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}

.contact-layout aside {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
}

.doctor-profile-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 1.8rem;
    align-items: start;
}

.doctor-profile-photo img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #0f766e;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.25);
}

.doctor-profile-content h2,
.doctor-profile-content h3 {
    margin-top: 0;
}

/* Modern theme refresh + inner banner polish */
:root {
    --brand-primary: #0f766e;
    --brand-primary-dark: #0b5e58;
    --brand-accent: #2563eb;
    --brand-ink: #0f172a;
    --brand-heading: #0b2948;
    --surface-soft: #f3f8ff;
    --surface-soft-2: #eef5ff;
}

body {
    color: #1e293b;
    background: #f8fbff;
}

a {
    color: var(--brand-accent);
}

.top-bar {
    background: linear-gradient(90deg, #0d9488, #0f766e);
    color: #ecfeff;
}

.site-header {
    border-bottom: 1px solid #d6e3f5;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.brand a,
.brand p,
.brand h1,
.brand h2,
.brand h3 {
    color: var(--brand-heading);
}

.main-nav a:hover {
    background: #e8f1ff;
    color: #1d4ed8;
}

.site-header .main-nav li.selected > a,
.site-header .main-nav li.ancestor > a {
    background: var(--brand-primary);
    color: #ffffff;
}

.inner-hero {
    background: linear-gradient(90deg, #0d9488 0%, #0f766e 100%);
    color: #f8fffe;
    padding: 2.2rem 0;
}

.inner-hero h1,
.inner-hero h2,
.inner-hero h3,
.inner-hero p,
.inner-hero li,
.inner-hero a,
.inner-hero .content-prose h1,
.inner-hero .content-prose h2,
.inner-hero .content-prose h3,
.inner-hero .content-prose p,
.inner-hero .content-prose li,
.inner-hero .content-prose a {
    color: #f8fffe;
    font-weight: 500;
}

/* Force readability for CMS-generated inner banner content */
.inner-hero .content-prose,
.inner-hero .content-prose * {
    color: #f8fffe !important;
    text-shadow: none;
}

.inner-hero .content-prose a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.inner-hero h1 {
    font-size: clamp(1.9rem, 2.8vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}


.section.alt {
    background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-2));
}

.section-head h1,
.section-head h2,
.section-head h3,
.content-prose h1,
.content-prose h2,
.content-prose h3,
.content-prose h4 {
    color: var(--brand-heading);
}

.stats-band {
    background: linear-gradient(90deg, #0b2948, #0f3f6b);
}

.appointment-box {
    background: linear-gradient(120deg, var(--brand-primary-dark), var(--brand-primary));
}

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

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

.auto-card {
    border: 1px solid #d7e4f5;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.site-footer {
    background: linear-gradient(120deg, #0b2948, #0f766e);
    color: #e6fffb;
}

@media (max-width: 900px) {
    .site-header {
        top: 0;
    }

    .top-bar {
        display: none;
    }

    .grid-2,
    .doctor-profile-grid,
    .auto-grid.cols-2,
    .auto-grid.cols-3,
    .auto-grid.cols-4 {
        grid-template-columns: 1fr;
    }

    .hero-media img,
    .hero-media iframe,
    .hero-media video {
        min-height: 320px;
    }

    .hero-overlay {
        align-items: flex-end;
        padding-bottom: 1.2rem;
    }

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

    .site-header .main-nav > ul,
    .site-header .main-nav > ul.menu-root,
    .site-header .main-nav > div > ul,
    .site-header .main-nav > div > div > ul {
        justify-content: flex-end;
    }

    .site-header .main-nav li ul {
        position: static;
        box-shadow: none;
        border: 1px dashed #cbd5e1;
        margin-top: 0.25rem !important;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom > * {
        justify-content: center;
        text-align: center;
    }
}
