/* ============================================================
   SERVEU-HEALTH ---- Medical Tourism
   ============================================================ */
:root {
    --primary: #2f4da6;          /* ServeU royal blue (from logo mark) */
    --primary-dark: #24397e;
    --primary-light: #e3eaff;
    --navy: #181818;             /* ServeU charcoal (logo text) */
    --heading: #1c2333;
    --accent: #ff8a00;           /* CTA orange — high contrast with royal blue */
    --accent-dark: #e67c00;
    --bg-soft: #f5f7fc;
    --text: #3b4252;
    --radius: 14px;
}

body { font-family: 'Inter', system-ui, sans-serif; color: var(--text); }
h1, h2, h3, h4, h5, .navbar-brand { font-family: 'Inter', sans-serif; font-weight: 700; color: var(--heading); }

.btn-accent { background: var(--accent); color: #fff; font-weight: 600; border: none; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-primary { background: var(--primary); border-color: var(--primary); font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.text-primary { color: var(--primary) !important; }
.bg-soft { background: var(--bg-soft); }

.section { padding: 70px 0; }
.section-title { font-size: 2rem; margin-bottom: .5rem; }
.section-sub { color: #64748b; max-width: 640px; margin: 0 auto 2.5rem; }

/* ---------- Topbar ---------- */
.topbar { background: #14151a; color: #c7cbd6; font-size: .85rem; padding: 7px 0; }
.topbar a { color: #c7cbd6; text-decoration: none; }
.topbar a:hover { color: #fff; }

/* ---------- Navbar ---------- */
.navbar-main { background: #fff; box-shadow: 0 2px 12px rgba(24,24,24,.08); padding: 12px 0; }
.navbar-main .nav-link { color: #1c2333; font-weight: 600; margin: 0 6px; }
.navbar-main .nav-link:hover, .navbar-main .nav-link.active { color: var(--primary); }
.navbar-main .navbar-brand img { max-height: 52px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(120deg, #14151a 0%, #1d2b5c 55%, var(--primary) 100%); color: #fff; overflow: hidden; }
.hero::after { content:''; position: absolute; inset: 0; background: url('') center/cover; opacity: .18; }
.hero .container { position: relative; z-index: 2; }
.hero h1 { color: #fff; font-size: 2.6rem; line-height: 1.2; }
.hero .lead { color: #d5ddf3; }
.hero-badges .badge-item { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 10px 16px; font-size: .85rem; }
.hero-slide { min-height: 480px; display: flex; align-items: center; padding: 60px 0; }
.hero-slide-bg { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; opacity: .22; }

/* Inquiry card in hero */
.inquiry-card { background: #fff; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(20,21,26,.4); padding: 26px; color: var(--text); }
.inquiry-card h5 { color: var(--heading); }

/* ---------- Counters ---------- */
.counter-strip { background: var(--primary); color: #fff; }
.counter-strip .num { font-size: 2.2rem; font-weight: 800; }
.counter-strip .label { font-size: .9rem; opacity: .9; }

/* ---------- Cards ---------- */
.icon-card, .pkg-card, .hospital-card, .blog-card, .service-card {
    border: 1px solid #e7eaf3; border-radius: var(--radius); background: #fff;
    transition: transform .25s ease, box-shadow .25s ease; height: 100%;
}
.icon-card:hover, .pkg-card:hover, .hospital-card:hover, .blog-card:hover, .service-card:hover {
    transform: translateY(-6px); box-shadow: 0 16px 34px rgba(47,77,166,.14);
}
.service-card img { height: 170px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.service-card .icon-bubble, .dept-bubble {
    width: 56px; height: 56px; border-radius: 50%; background: var(--primary-light);
    color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}

/* Packages */
.pkg-card img { height: 160px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.pkg-price { color: var(--primary-dark); font-weight: 700; }

/* Hospitals */
.hospital-card img.banner { height: 150px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.hospital-card img.logo { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid #e7eaf3; border-radius: 12px; margin-top: -32px; padding: 6px; }

/* How it works */
.step-card { text-align: center; padding: 24px 18px; }
.step-num { width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }

/* Testimonials */
.testimonial-card { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: 0 8px 24px rgba(24,24,24,.08); }
.testimonial-card .stars { color: #f5b301; }
.testimonial-card img { width: 62px; height: 62px; object-fit: cover; border-radius: 50%; }

/* Blog */
/*.blog-card img { height: 180px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }*/
.blog-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius) var(--radius) 0 0;
}
.blog-card .date { font-size: .8rem; color: #94a3b8; }

/* ---------- Footer ---------- */
.footer { background: #14151a; color: #b3b8c4; padding: 60px 0 0; }
.footer h5 { color: #fff; margin-bottom: 18px; font-size: 1.05rem; }
.footer a { color: #b3b8c4; text-decoration: none; display: block; margin-bottom: 9px; }
.footer a:hover { color: #fff; }
.footer .social a { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); align-items: center; justify-content: center; margin-right: 8px; }
.footer .social a:hover { background: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding: 18px 0; font-size: .85rem; }

/* Newsletter */
.newsletter-box { background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%); border-radius: var(--radius); padding: 40px; color: #fff; }

/* Floating buttons */
.float-btns { position: fixed; right: 18px; bottom: 18px; z-index: 1050; display: flex; flex-direction: column; gap: 10px; }
.float-btns a, .float-btns button { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; border: none; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.float-whatsapp { background: #25d366; }
.float-appointment { background: var(--accent); }

/* Responsive */
@media (max-width: 991px) {
    .hero h1 { font-size: 1.9rem; }
    .hero-slide { min-height: auto; }
    .section { padding: 50px 0; }
}

/* ============================================================
   Inner Pages (Phase 3 Part 2)
   ============================================================ */
.page-hero {
    background: linear-gradient(120deg, #14151a 0%, #1d2b5c 55%, var(--primary) 100%);
    color: #fff; padding: 60px 0 50px;
}
.page-hero h1 { color: #fff; font-size: 2.1rem; margin-bottom: 8px; }

.sidebar-card {
    background: #fff; border: 1px solid #e7eaf3; border-radius: var(--radius); padding: 24px;
}
.sidebar-link {
    display: block; padding: 10px 0; border-bottom: 1px dashed #e7eaf3;
    color: var(--text); text-decoration: none; font-size: .93rem;
}
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover { color: var(--primary); padding-left: 4px; transition: all .2s; }

.content-body { line-height: 1.85; }
.content-body img { max-width: 100%; height: auto; border-radius: 10px; }
.content-body h2, .content-body h3 { margin-top: 1.6rem; }
.content-body table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.content-body table td, .content-body table th { border: 1px solid #e7eaf3; padding: 10px; }

/* Hospital detail hero */
.hospital-hero {
    position: relative; background: linear-gradient(120deg, #14151a, #2f4da6);
    background-size: cover; background-position: center;
    padding: 110px 0 34px;
}
.hospital-hero .overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20,21,26,.88), rgba(20,21,26,.35)); }
.hospital-hero-logo {
    width: 96px; height: 96px; object-fit: contain; background: #fff;
    border-radius: 16px; padding: 10px; position: relative;
}

/* Bootstrap pagination theme */
.pagination .page-link { color: var(--primary); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

@media (max-width: 767px) {
    .page-hero { padding: 42px 0 36px; }
    .page-hero h1 { font-size: 1.6rem; }
}

/* ============================================================
   Active nav underline indicator
   ============================================================ */
.navbar-main .nav-link { position: relative; }
.navbar-main .nav-link.active::after {
    content: '';
    position: absolute;
    left: 8px; right: 8px; bottom: -4px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary);
}
/* ============================================================
   Mobile Responsiveness Fixes — APPEND to public/css/frontend.css
   ============================================================ */

/* Kill horizontal overflow globally (safety net) */
/*html, body { overflow-x: hidden; max-width: 100%; }*/

html, body {
    max-width: 100%;
}

/* Guard against horizontal overflow WITHOUT touching <body> —
   applied only to the wrapper around <main>, which sits AFTER
   the sticky nav in the DOM, so the nav's containing block
   (the viewport, via body) stays unclipped. */
.overflow-guard {
    overflow-x: hidden;
    width: 100%;
}


/* Counter strip: allow wrapping, center rows */
.counter-strip .row { justify-content: center; }

@media (max-width: 767px) {
    /* Tighter section rhythm on phones */
    .section { padding: 44px 0; }
    .section-title { font-size: 1.45rem; }
    .section-sub { font-size: .92rem; margin-bottom: 1.8rem; }

    /* Hero */
    .hero-slide { padding: 42px 0; }
    .hero h1 { font-size: 1.65rem; }
    .hero .lead { font-size: .95rem; }
    .hero-badges .badge-item { padding: 8px 12px; font-size: .78rem; }
    .inquiry-card { padding: 20px; }

    /* Counters */
    .counter-strip .num { font-size: 1.55rem; }
    .counter-strip .label { font-size: .8rem; }

    /* Department / specialty cards: smaller bubble + text */
    .dept-bubble { width: 44px; height: 44px; font-size: 1.1rem; }
    .icon-card.p-3 { padding: .8rem !important; }
    .icon-card h6 { font-size: .88rem; }

    /* Service cards */
    .service-card .icon-bubble { width: 46px; height: 46px; font-size: 1.2rem; }
    .service-card h6 { font-size: .95rem; }

    /* Package & hospital & blog cards: slightly smaller media */
    .pkg-card img { height: 130px; }
    .blog-card img { height: 150px; }
    .hospital-card img.banner { height: 120px; }

    /* Step cards */
    .step-card { padding: 18px 12px; }
    .step-num { width: 44px; height: 44px; font-size: 1.05rem; }

    /* Floating buttons: smaller, don't cover content */
    .float-btns { right: 12px; bottom: 12px; gap: 8px; }
    .float-btns a, .float-btns button { width: 46px; height: 46px; font-size: 1.25rem; }

    /* Testimonials */
    .testimonial-card { padding: 20px; }

    /* Newsletter box */
    .newsletter-box { padding: 24px; }

    /* Page hero (inner pages) */
    .page-hero h1 { font-size: 1.45rem; }
}

/* Very small phones */
@media (max-width: 400px) {
    .hero h1 { font-size: 1.45rem; }
    .counter-strip .num { font-size: 1.3rem; }
}

/* ============================================================
   Fix: .row.g-5 bleeds 12px past the container each side, causing
   horizontal overflow. Cap horizontal gutter, keep g-5 vertical.
   ============================================================ */
.row.g-5 {
    --bs-gutter-x: 1.5rem;
}
/* ============================================================
   Hero Rotating Slider — APPEND to public/css/frontend.css
   ============================================================ */

/* Background images: stacked, fade between slides */
.hero-slide-bg {
    opacity: 0;
    transition: opacity .9s ease;
}
.hero-slide-bg.show {
    opacity: .22;
}

/* Text slides: smooth fade instead of Bootstrap's horizontal push */
#heroCarousel .carousel-item {
    transition: opacity .7s ease !important;
    transform: none !important;
}
#heroCarousel .carousel-item:not(.active) { opacity: 0; }
#heroCarousel .carousel-item.active { opacity: 1; }
#heroCarousel .carousel-inner { min-height: 320px; }

/* Slide indicator dots */
.hero-dots { display: flex; gap: 8px; }
.hero-dots button {
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.7);
    background: transparent; padding: 0;
    transition: all .25s;
}
.hero-dots button.active {
    background: var(--accent);
    border-color: var(--accent);
    width: 28px; border-radius: 8px;
}

@media (max-width: 767px) {
    #heroCarousel .carousel-inner { min-height: 300px; }
}

/* ============================================================
   Sanitize pasted rich-text content (TinyMCE from external sites)
   Applies to doctor bios, hospital/service/package descriptions,
   blog posts, dynamic pages — anything rendered in .content-body
   ============================================================ */
.content-body {
    overflow: hidden;              /* contain floats */
}
.content-body::after {
    content: ""; display: table; clear: both;
}
.content-body * {
    position: static !important;   /* kill absolute/fixed positioning from pasted HTML */
    max-width: 100% !important;
    float: none !important;
}
.content-body [style*="height"] { height: auto !important; }
.content-body img { height: auto !important; width: auto; }
.content-body table { table-layout: auto !important; }



/* ============================================================
   Doctor Detail Page — Redesign (v4)
   APPEND to public/css/frontend.css
   ============================================================ */

.doctor-hero {
    background: linear-gradient(120deg, #14151a 0%, #1d2b5c 55%, var(--primary) 100%);
    padding: 130px 0 50px;
}


.doctor-chip {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
}
.doctor-chip:hover { background: rgba(255,255,255,.2); color: #fff; }

.doctor-panel {
    background: #fff;
    border: 1px solid #e7eaf3;
    border-radius: var(--radius);
    padding: 28px;
}

.doctor-info-card {
    background: #fff;
    border: 1px solid #e7eaf3;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
}
.doctor-info-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.doctor-sticky { position: sticky; top: 90px; }

.related-doctor-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed #e7eaf3;
    text-decoration: none;
    color: var(--text);
}
.related-doctor-link:last-child { border-bottom: none; }
.related-doctor-link:hover { color: var(--primary); }
.related-doctor-link img {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.related-doctor-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; flex-shrink: 0;
}


/* ============================================================
   Doctor Hero Photo — size fix (append AFTER doctor-page-css.css,
   or replace the existing .doctor-hero-photo rule with this one)
   ============================================================ */
.doctor-hero-photo {
    width: 140px !important;
    height: 140px !important;
    min-width: 140px;
    max-width: 140px;
    border-radius: 20px;
    object-fit: cover;
    object-position: top center;
    border: 4px solid rgba(255,255,255,.25);
    flex-shrink: 0;
    display: block;
}

@media (max-width: 767px) {
    .doctor-hero-photo {
        width: 100px !important;
        height: 100px !important;
        min-width: 100px;
        max-width: 100px;
    }
}

/* ============================================================
   Packages — Redesign (v2)
   APPEND to public/css/frontend.css
   ============================================================ */

.pkg-card-v2 {
    background: #fff;
    border: 1px solid #e7eaf3;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.pkg-card-v2:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(47,77,166,.14);
}

.pkg-card-v2-img {
    position: relative;
    height: 170px;
    overflow: hidden;
}
.pkg-card-v2-img img {
    width: 100%; height: 100%; object-fit: cover;
}
.pkg-card-v2-placeholder {
    width: 100%; height: 100%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}
.pkg-discount-badge {
    position: absolute; top: 10px; right: 10px;
    background: var(--accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.pkg-price {
    color: var(--primary);
    font-weight: 800;
}

/* Route the old .pkg-card (still used on homepage) toward the same visual language */
.pkg-card { transition: transform .25s ease, box-shadow .25s ease; }
.pkg-card:hover { transform: translateY(-6px); }

/* ============================================================
   Doctors Listing — 2-per-row mobile grid tuning (v8)
   APPEND to public/css/frontend.css
   ============================================================ */
/* Base size for all screens ≥768px (this was missing — the bug) */
.doctor-card-photo {
    width: 110px !important;
    height: 110px !important;
    object-fit: cover;
    display: flex;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile: smaller photo for the 2-per-row grid */
@media (max-width: 767px) {
    .doctor-card-photo {
        width: 70px !important;
        height: 70px !important;
    }
    .doctor-card-sm.p-4 { padding: 1rem !important; }
    .doctor-card-sm h6 { font-size: .85rem; margin-bottom: 4px !important; }
    .doctor-card-sm .small { font-size: .72rem; }
    .doctor-card-sm .badge { font-size: .65rem; padding: 4px 8px; }
}

/* Pagination icon buttons — consistent size */
.pagination .page-link {
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ============================================================
   Mega Menu Dropdowns — Services / Hospitals / Doctors (v12)
   APPEND to public/css/frontend.css
   ============================================================ */

.mega-dropdown {
    position: relative;
}

.mega-caret {
    font-size: .65rem;
    margin-left: 3px;
    transition: transform .2s ease;
    vertical-align: middle;
}
.mega-dropdown:hover .mega-caret {
    transform: rotate(180deg);
}

.mega-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(24,24,24,.14);
    border: 1px solid #eef0f6;
    padding: 20px;
    min-width: 420px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 1050;
}

.mega-panel-sm { min-width: 280px; }

/* Hover bridge so the panel doesn't close in the gap between link and panel */
.mega-dropdown::after {
    content: '';
    position: absolute;
    top: 100%; left: 0; right: 0;
    height: 14px;
}

.mega-dropdown:hover .mega-panel,
.mega-panel:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Services grid: 2 columns of icon + label */
.mega-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 18px;
}
.mega-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.mega-link i {
    color: var(--primary);
    font-size: 1.05rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.mega-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Hospitals / Doctors: vertical list with counts */
.mega-panel-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mega-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.mega-link-row i { color: var(--primary); }
.mega-link-row:hover {
    background: var(--primary-light);
    color: var(--primary);
}
.mega-count {
    background: #f1f3f9;
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
}
.mega-link-row:hover .mega-count {
    background: #fff;
    color: var(--primary);
}

.mega-panel-footer {
    border-top: 1px solid #eef0f6;
    margin-top: 14px;
    padding-top: 12px;
    text-align: center;
}
.mega-panel-footer a {
    color: var(--primary);
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
}
.mega-panel-footer a:hover { text-decoration: underline; }

/* Mega panels are desktop-only — mobile uses the offcanvas menu */
@media (max-width: 991px) {
    .mega-panel { display: none !important; }
}




