/* ============================================================
   PUBLIC SITE CSS — Compatible with index.php
   ============================================================ */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary: #198754;
    --accent: #0dcaf0;
    --dark: #1a2035;
    --text: #444;
    --muted: #6c757d;
    --light-bg: #f8f9fa;
}

* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
a { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ── EMERGENCY TICKER ── */
.after-nav-ticker {
    position: relative;
    z-index: 1040;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    min-height: 42px;
    background: #d90429;
    color: #fff;
    border-bottom: 2px solid #ffc107;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
}
.ticker-label {
    position: absolute;
    left: 0;
    z-index: 1;
    padding: 10px 15px;
    background: #fff;
    color: #d90429;
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 3px 0 10px rgba(0,0,0,.2);
    white-space: nowrap;
}
.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll 22s linear infinite;
}
.ticker-item {
    display: inline-block;
    margin-right: 60px;
    font-size: 1rem;
    font-weight: 600;
}
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}
.after-nav-ticker:hover .ticker-content { animation-play-state: paused; }

/* ── NAVBAR ── */
.site-navbar {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 1050;
}
.site-navbar .nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    padding: .5rem 1rem !important;
    transition: color .2s;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active { color: var(--primary) !important; }
.site-navbar .btn-book {
    background: var(--primary);
    color: #fff !important;
    border-radius: 25px;
    padding: .45rem 1.4rem !important;
    font-weight: 600;
    border: none;
}
.site-navbar .btn-book:hover { background: var(--primary-dark); color: #fff !important; }

/* ── MEGA MENU ── */
.site-navbar { position: relative; }
.nav-mega { position: static; }
.mega-menu {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    top: calc(100% + 2px);
    width: 580px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.16);
    z-index: 2000;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.mega-menu.mega-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.mega-inner { padding: 1.2rem 1.4rem 1rem; }
.mega-header {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: #6c757d;
    padding-bottom: .65rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: .75rem;
}
.mega-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .25rem;
}
.mega-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .65rem;
    border-radius: 10px;
    color: var(--dark);
    font-size: .875rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.mega-item:hover { background: #f0f6ff; color: var(--primary); }
.mega-icon {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    transition: transform .15s;
}
.mega-item:hover .mega-icon { transform: scale(1.1); }
.mega-item-emergency { grid-column: span 2; }
.mega-badge {
    margin-left: auto;
    background: #dc3545;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 20px;
    letter-spacing: .04em;
    flex-shrink: 0;
}
.mega-footer {
    border-top: 1px solid #f0f0f0;
    margin-top: .75rem;
    padding-top: .75rem;
    text-align: center;
}
.mega-cta {
    display: inline-block;
    background: var(--primary);
    color: #fff !important;
    border-radius: 20px;
    padding: .42rem 1.5rem;
    font-size: .85rem;
    font-weight: 600;
    transition: background .2s;
}
.mega-cta:hover { background: var(--primary-dark); }
.nav-mega-toggle .bi-chevron-down {
    transition: transform .2s;
    display: inline-block;
    vertical-align: middle;
}
.mega-active .nav-mega-toggle .bi-chevron-down { transform: rotate(180deg); }

@media (min-width: 992px) {
    .nav-mega:hover .mega-menu {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
    .nav-mega:hover .nav-mega-toggle .bi-chevron-down { transform: rotate(180deg); }
}
@media (max-width: 991px) {
    .mega-menu {
        position: static;
        transform: none !important;
        width: 100%;
        box-shadow: none;
        border-radius: 10px;
        border: 1px solid #e9ecef;
        margin-top: .3rem;
        transition: none;
    }
    .mega-menu.mega-open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
    .mega-grid { grid-template-columns: 1fr 1fr; }
    .mega-item-emergency { grid-column: span 2; }
}

/* ── MINI SLIDES ── */
#miniSlider {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: #eee;
}
#miniSlider .mini-slide {
    display: none;
    width: 100%;
    height: 260px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}
#miniSlider .mini-slide.active { display: block; }
.mini-slide-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px 20px;
    background: rgba(43,123,185,.8);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
}
.mini-prev, .mini-next {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.4);
    color: #fff;
    border: none;
    padding: 8px 14px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
}
.mini-prev { left: 10px; }
.mini-next { right: 10px; }
.mini-prev:hover, .mini-next:hover { background: rgba(0,0,0,.7); }
@media (max-width: 576px) {
    #miniSlider, #miniSlider .mini-slide { height: 160px; }
}

/* ── HERO SLIDER ── */
.hero-slider {
    position: relative;
    overflow: hidden;
}
.hero-slider .carousel-item {
    position: relative;
    overflow: hidden;
    height: 88vh;
    min-height: 520px;
}
.hero-slide-img {
    width: 100%;
    height: 88vh;
    min-height: 520px;
    object-fit: cover;
    object-position: center;
    display: block;
}
.hero-slider .carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,20,50,.45) 0%, rgba(10,20,50,.18) 55%, transparent 100%);
    z-index: 1;
}
.hero-slider .carousel-caption {
    position: absolute;
    top: 50%;
    left: 8%;
    transform: translateY(-50%);
    text-align: left;
    max-width: 580px;
    bottom: auto;
    right: auto;
    padding: 0;
    z-index: 11;
}
.hero-caption-h1 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero-caption-p {
    font-size: clamp(.95rem, 1.5vw, 1.15rem);
    color: rgba(255,255,255,.88);
    margin: 1rem 0 1.8rem;
}
.btn-hero {
    background: var(--primary);
    color: #fff !important;
    border-radius: 30px;
    padding: .7rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    transition: all .3s;
    display: inline-flex;
    align-items: center;
}
.btn-hero:hover {
    background: transparent;
    border-color: #fff;
    color: #fff !important;
}
.hero-slider .carousel-indicators [data-bs-target] {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none;
}
.hero-slider .carousel-indicators .active { background: #fff; }
.carousel-control-prev,
.carousel-control-next {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: .85;
}
.carousel-control-prev { left: 16px; }
.carousel-control-next { right: 16px; }

@media (max-width: 991px) {
    .hero-slider .carousel-item,
    .hero-slide-img {
        height: 60vh;
        min-height: 400px;
    }
    .hero-slider .carousel-caption {
        left: 5%;
        right: 5%;
        max-width: 100%;
    }
}
@media (max-width: 575px) {
    .hero-slider .carousel-item,
    .hero-slide-img {
        height: 50vh;
        min-height: 340px;
    }
}

/* ── QUICK STATS ── */
.quick-stats {
    background: var(--primary);
    color: #fff;
    padding: 1.5rem 0;
}
.quick-stats .stat-item {
    text-align: center;
    padding: .5rem;
}
.quick-stats .stat-num {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.quick-stats .stat-lbl {
    font-size: .82rem;
    opacity: .85;
    margin-top: .2rem;
}

/* ── SECTIONS ── */
.section { padding: 5rem 0; }
.section-alt { background: var(--light-bg); }
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
}
.section-title span { color: var(--primary); }
.section-sub {
    color: var(--muted);
    font-size: 1rem;
    margin-top: .5rem;
}
.divider {
    width: 50px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: .8rem 0 1.5rem;
}
.divider.mx-auto { margin-left: auto; margin-right: auto; }

/* ── SERVICES (base — index has richer inline styles that take priority) ── */
.service-card {
    border: none;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all .3s;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    height: 100%;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(13,110,253,.15);
}
.service-card .icon-wrap {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.2rem;
}
.service-card h5 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: .5rem;
}
.service-card p {
    font-size: .88rem;
    color: var(--muted);
    margin: 0;
}

/* ── DOCTOR CARDS ── */
.doctor-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    transition: all .3s;
    background: #fff;
    height: 100%;
}
.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.doctor-card .doc-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: top;
}
.doctor-card .doc-body { padding: 1.2rem; }
.doctor-card .doc-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--dark);
}
.doctor-card .doc-spec {
    color: var(--primary);
    font-size: .85rem;
    font-weight: 500;
}
.doctor-card .doc-dept {
    color: var(--muted);
    font-size: .8rem;
}
.doctor-card .btn-book-doc {
    background: var(--primary);
    color: #fff;
    border-radius: 20px;
    font-size: .85rem;
    padding: .4rem 1.2rem;
    border: none;
    width: 100%;
    margin-top: .8rem;
    transition: background .2s;
    cursor: pointer;
}
.doctor-card .btn-book-doc:hover { background: var(--primary-dark); }

/* ── BOOKING SECTION ── */
.booking-section {
    background: linear-gradient(135deg, var(--dark) 0%, #0d3b8e 100%);
    color: #fff;
    padding: 5rem 0;
}
.booking-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.booking-card .form-control,
.booking-card .form-select {
    border-radius: 10px;
    border: 1.5px solid #dee2e6;
    padding: .65rem 1rem;
    font-size: .9rem;
}
.booking-card .form-control:focus,
.booking-card .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
}
.booking-card .btn-submit {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: .75rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    width: 100%;
    transition: background .2s;
    cursor: pointer;
}
.booking-card .btn-submit:hover:not(:disabled) { background: var(--primary-dark); }
.booking-card .btn-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* OTP digits */
.otp-digit,
.otp-input-group input {
    width: 44px;
    height: 48px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 10px;
    border: 2px solid #dee2e6;
    outline: none;
    transition: border-color .2s;
}
.otp-digit:focus,
.otp-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}

/* Slot buttons */
.slot-btn { min-width: 90px; border-radius: 8px !important; }
.slot-btn.selected,
.slot-btn.btn-primary {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}
.slot-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── WHY CHOOSE US ── */
.why-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.why-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(13,110,253,.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.why-item h6 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: .2rem;
}
.why-item p {
    font-size: .85rem;
    color: var(--muted);
    margin: 0;
}

/* ── TESTIMONIALS ── */
.testimonial-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    height: 100%;
}
.testimonial-card .stars {
    color: #ffc107;
    font-size: 1rem;
    letter-spacing: 2px;
}
.testimonial-card p {
    font-size: .9rem;
    color: #555;
    font-style: italic;
    margin: .8rem 0;
}
.testimonial-card .author {
    font-weight: 700;
    font-size: .88rem;
    color: var(--dark);
}
.testimonial-card .role {
    font-size: .78rem;
    color: var(--muted);
}

/* ── FOOTER ── */
.site-footer {
    background: var(--dark);
    color: #adb5bd;
    padding: 4rem 0 0;
}
.site-footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.2rem;
}
.site-footer a {
    color: #adb5bd;
    transition: color .2s;
}
.site-footer a:hover { color: #fff; }
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 1.2rem 0;
    margin-top: 3rem;
    font-size: .82rem;
}
.site-footer .social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    margin-right: .4rem;
    transition: all .2s;
}
.site-footer .social-links a:hover {
    background: var(--primary);
    color: #fff;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .section { padding: 3rem 0; }
    .booking-card { padding: 1.5rem; }
    .section-title { font-size: 1.7rem; }
    .otp-digit,
    .otp-input-group input {
        width: 38px;
        height: 42px;
        font-size: 1.1rem;
    }
}