/* =====================================================================
   Niramoi Premium Hospital Micro-site — Base Theme
   Every color below is a CSS variable. The admin panel writes the
   hospital's chosen hex values into a <style> block in the page
   <head> (see views/frontend/layout/header.php) — this file never
   hard-codes a hospital's colors, so ONE stylesheet re-skins every
   micro-site instantly.
   ===================================================================== */

:root {
    --primary:    #E2211B;   /* default: Life Line red    — overridden per hospital */
    --secondary:  #00A551;   /* default: Life Line green  — overridden per hospital */
    --accent:     #29ABE2;   /* default: Life Line sky blue */
    --dark:       #1A1A1A;
    --light-bg:   #F0F9FF;
    --white:      #FFFFFF;
    --gray-100:   #F5F6F7;
    --gray-300:   #DDE2E6;
    --gray-600:   #5B6570;
    --radius:     10px;
    --font-head:  'Hind Siliguri', 'Segoe UI', sans-serif;
    --font-body:  'Hind Siliguri', 'Segoe UI', sans-serif;
    --shadow: 0 4px 18px rgba(20, 30, 40, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--dark);
    background: var(--white);
    margin: 0;
    line-height: 1.65;
}
h1, h2, h3, h4, .brand-font {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 .5em;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--light-bg); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 26px; border-radius: var(--radius);
    font-weight: 600; font-size: 15px; border: 2px solid transparent;
    cursor: pointer; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }
.btn-ghost { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--primary); color: var(--white); }

/* ---------- Top utility bar ---------- */
.topbar {
    background: var(--dark); color: #eee; font-size: 13.5px;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #eee; }
.topbar .emergency { color: var(--white); background: var(--primary); padding: 3px 12px; border-radius: 20px; font-weight: 600; }
.topbar .socials a { margin-left: 12px; opacity: .85; }
.topbar .socials a:hover { opacity: 1; }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: var(--shadow); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 52px; width: auto; }
.brand .name { font-size: 19px; font-weight: 700; color: var(--primary); }
.brand .tagline { font-size: 12.5px; color: var(--secondary); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > li { position: relative; list-style: none; }
.main-nav > li > a {
    display: block; padding: 12px 16px; font-weight: 600; font-size: 15px;
    border-bottom: 3px solid transparent; color: var(--dark);
}
.main-nav > li > a:hover, .main-nav > li.active > a { color: var(--primary); border-bottom-color: var(--primary); }
.main-nav ul { list-style: none; }

.has-dropdown { position: relative; }
.dropdown {
    position: absolute; top: 100%; left: 0; min-width: 220px;
    background: var(--white); box-shadow: var(--shadow); border-radius: var(--radius);
    padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: all .15s ease; list-style: none;
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a { display: block; padding: 10px 14px; border-radius: 6px; font-weight: 500; font-size: 14.5px; }
.dropdown li a:hover { background: var(--light-bg); color: var(--primary); }

.nav-menu-toggle { display: none; }

/* ---------- Hero / Slider ---------- */
.hero-slider {
    position: relative; overflow: hidden; color: var(--white);
    border-radius: var(--radius); box-shadow: var(--shadow);
    aspect-ratio: 21 / 8; /* consistent contained banner shape regardless of the uploaded image's own ratio */
    min-height: 300px;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
    position: absolute; inset: 0; display: flex; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 1.1s ease;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }
/* Ken Burns: the image itself slowly zooms while its slide is active, giving the banner motion without ever feeling busy */
.hero-slide-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transform: scale(1); transition: transform 7s ease-out;
}
.hero-slide.active .hero-slide-bg { transform: scale(1.09); }
.hero-slide-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.66), rgba(0,0,0,.28)); }
.hero-slide-content {
    position: relative; z-index: 2; max-width: 560px; padding: 0 44px;
    opacity: 0; transform: translateY(16px); transition: opacity .7s ease .3s, transform .7s ease .3s;
}
.hero-slide.active .hero-slide-content { opacity: 1; transform: translateY(0); }
.hero-slide-content h1 { font-size: 32px; margin-bottom: 12px; }
.hero-slide-content p { font-size: 16px; margin-bottom: 22px; opacity: .95; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4);
    background: rgba(255,255,255,.12); color: var(--white); font-size: 16px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}
.hero-arrow:hover { background: rgba(255,255,255,.28); transform: translateY(-50%) scale(1.06); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }

.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 8px; }
.hero-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); cursor: pointer; transition: all .25s ease; }
.hero-dot.active { width: 26px; border-radius: 5px; background: var(--white); }

.hero-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--primary); z-index: 5; }

/* ---------- Section headings ---------- */
.section-head { max-width: 620px; margin: 0 0 36px; }
.section-head .kicker { color: var(--secondary); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.section-head h2 { font-size: 30px; color: var(--dark); }
.section-head p { color: var(--gray-600); margin: 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Cards ---------- */
.card {
    display: block;
    background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius);
    overflow: hidden; transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--primary); transform: translateY(-3px); }
.card .body { padding: 20px; }
.card .thumb { aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* service card */
.service-card { padding: 26px 22px; border-left: 4px solid var(--secondary); background: var(--gray-100); border-radius: var(--radius); }
.service-card .icon { font-size: 30px; color: var(--primary); margin-bottom: 12px; }
.service-card h3 { font-size: 18px; }

/* doctor card */
.doctor-card .thumb { aspect-ratio: 3/4; object-fit: cover; }
.doctor-card h3 { font-size: 16.5px; margin-bottom: 2px; }
.doctor-card .role { color: var(--secondary); font-weight: 600; font-size: 13.5px; }
.doctor-card .dept { color: var(--gray-600); font-size: 13px; }

/* stats strip */
.stats-strip { background: var(--primary); color: var(--white); }
.stats-strip .grid { text-align: center; }
.stats-strip .num { font-size: 34px; font-weight: 700; }
.stats-strip .label { font-size: 13.5px; opacity: .9; }

/* testimonial */
.testimonial { background: var(--light-bg); border-radius: var(--radius); padding: 26px; }
.testimonial .stars { color: #f5a623; margin-bottom: 10px; }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.testimonial .who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* ---------- Tests list ---------- */
.test-table { width: 100%; border-collapse: collapse; }
.test-table th { text-align: left; background: var(--dark); color: var(--white); padding: 12px 16px; font-size: 14px; }
.test-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-300); font-size: 14.5px; }
.test-table tr:hover td { background: var(--light-bg); }
.test-category-title { background: var(--secondary); color: var(--white); padding: 10px 16px; border-radius: 6px; margin: 30px 0 10px; font-size: 16px; }

/* ---------- Contact ---------- */
.contact-box { background: var(--gray-100); border-radius: var(--radius); padding: 28px; }
.form-control { width: 100%; padding: 12px 14px; border: 1px solid var(--gray-300); border-radius: 8px; font-family: var(--font-body); font-size: 14.5px; margin-bottom: 14px; }
.form-control:focus { outline: none; border-color: var(--primary); }
.map-embed iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radius); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #cfd3d6; padding: 56px 0 0; }
.site-footer h4 { color: var(--white); font-size: 16px; margin-bottom: 16px; }
.site-footer a { color: #cfd3d6; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; font-size: 14.5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding: 18px 0; text-align: center; font-size: 13px; color: #9aa0a6; }
.footer-bottom a { color: #cfd3d6; font-weight: 600; }

/* ---------- Alerts / flash ---------- */
.alert { padding: 12px 18px; border-radius: 8px; margin-bottom: 18px; font-size: 14.5px; }
.alert-success { background: #e4f7ea; color: #1c7a3d; border: 1px solid #b9e6c8; }
.alert-error   { background: #fdecec; color: #b3261e; border: 1px solid #f6c6c3; }

/* ---------- Breadcrumb / page header ---------- */
.page-header { background: var(--dark); color: var(--white); padding: 54px 0; text-align: center; }
.page-header h1 { font-size: 30px; margin-bottom: 6px; }
.page-header .crumb { color: rgba(255,255,255,.75); font-size: 14px; }
.page-header .crumb a { color: var(--white); font-weight: 600; }

/* ---------- Doctor detail page ---------- */
.doctor-hero {
    background: linear-gradient(120deg, var(--dark) 0%, var(--primary) 140%);
    color: var(--white);
    padding: 48px 0;
}
.doctor-hero .container { display: flex; gap: 34px; align-items: flex-start; flex-wrap: wrap; }
.doctor-hero .photo-frame { height: 240px; border-radius: 14px; overflow: hidden;
    border: 3px solid rgba(255,255,255,.25); flex-shrink: 0; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.doctor-hero .photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.doctor-hero .badge-speciality {
    display: inline-block; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
    padding: 5px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.doctor-hero h1 { font-size: 28px; margin-bottom: 8px; }
.doctor-hero .degrees { font-size: 14.5px; opacity: .9; margin-bottom: 6px; }
.doctor-hero .designation { font-size: 15.5px; font-weight: 600; opacity: .95; }
.doctor-hero .org { font-size: 14px; opacity: .85; display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.doctor-hero .stat-pills { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.doctor-hero .stat-pill { background: rgba(255,255,255,.14); padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }

.doctor-detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
.detail-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius); padding: 26px; margin-bottom: 22px; }
.detail-card h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.detail-card h3 i { color: var(--primary); }
/* Shared typography for ANY CKEditor-produced content, wherever it's
   rendered on the public site — About sections, service descriptions,
   test notes, staff bios, administration messages, doctor biography. */
.rich-content { font-size: 14.5px; color: #333; line-height: 1.8; }
.rich-content p { margin: 0 0 14px; }
.rich-content h1, .rich-content h2, .rich-content h3, .rich-content h4 { color: var(--dark); font-family: var(--font-head); margin: 22px 0 10px; line-height: 1.35; }
.rich-content h1 { font-size: 26px; }
.rich-content h2 { font-size: 22px; }
.rich-content h3 { font-size: 18px; }
.rich-content h4 { font-size: 16px; }
.rich-content ul, .rich-content ol { margin: 0 0 14px; padding-left: 22px; }
.rich-content li { margin-bottom: 6px; }
.rich-content a { color: var(--primary); text-decoration: underline; }
.rich-content strong, .rich-content b { color: var(--dark); }
.rich-content blockquote { border-left: 3px solid var(--secondary); padding: 4px 16px; margin: 16px 0; color: var(--gray-600); font-style: italic; }
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 14px 0; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.rich-content table td, .rich-content table th { border: 1px solid var(--gray-300); padding: 8px 10px; }

.treatment-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.treatment-tags .tag { background: var(--light-bg); color: var(--dark); border: 1px solid var(--gray-300); padding: 6px 13px; border-radius: 20px; font-size: 13px; }

.chamber-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius); overflow: hidden; position: sticky; top: 92px; }
.chamber-card .head { background: var(--dark); color: var(--white); padding: 16px 20px; }
.chamber-card .head strong { display: block; font-size: 15px; }
.chamber-card .head span { font-size: 13px; opacity: .8; }
.chamber-card .body { padding: 20px; }
.chamber-card .row { display: flex; gap: 10px; font-size: 14px; margin-bottom: 14px; color: #333; }
.chamber-card .row i { color: var(--primary); margin-top: 2px; }
.chamber-card .visiting-hours { background: var(--light-bg); border-radius: 8px; padding: 12px 14px; font-size: 13.5px; white-space: pre-line; margin-bottom: 12px; }
.chamber-card .off-days { color: var(--primary); font-size: 13px; font-weight: 600; margin-bottom: 14px; display: flex; gap: 6px; align-items: center; }
.chamber-card .btn { width: 100%; justify-content: center; }
.chamber-card .phone-buttons { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 860px) {
    .doctor-detail-grid { grid-template-columns: 1fr; }
    .chamber-card { position: static; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .main-nav { position: fixed; top: 0; right: -280px; width: 280px; height: 100vh;
        background: var(--white); flex-direction: column; align-items: stretch;
        box-shadow: -6px 0 20px rgba(0,0,0,.15); transition: right .2s ease; padding: 70px 10px 20px; overflow-y: auto; }
    .main-nav.open { right: 0; }
    .main-nav > li > a { border-bottom: 1px solid var(--gray-100); }
    .dropdown { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; padding-left: 12px; }
    .has-dropdown.open .dropdown { display: block; }
    .nav-menu-toggle { display: block; font-size: 24px; background: none; border: 0; cursor: pointer; color: var(--primary); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero-slider { aspect-ratio: auto; min-height: 420px; }
    .hero-slide-content { padding: 0 22px; max-width: 100%; }
    .hero-slide-content h1 { font-size: 24px; }
    .hero-slide-content p { font-size: 14.5px; }
    .hero-arrow { width: 36px; height: 36px; font-size: 15px; }
}