/* ==========================================================================
   SAHOTA SUPER SPECIALITY HOSPITAL - COMPREHENSIVE RESPONSIVE STYLES
   Optimized for Mobile, Tablet, and Desktop Viewports
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. GLOBAL MOBILE RESETS & BASE OPTIMIZATIONS
   -------------------------------------------------------------------------- */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    -webkit-tap-highlight-color: transparent;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Fix iOS auto-zoom on input focus by keeping minimum font-size at 16px */
input.form-control,
select.form-select,
textarea.form-control {
    font-size: 16px !important;
}

/* --------------------------------------------------------------------------
   2. DESKTOP & LARGE LAPTOPS (max-width: 1199.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .hero-master-title {
        font-size: 2.75rem;
    }
    .cta-luxury-box {
        padding: 36px 30px;
    }
    .features-strip-card {
        padding: 18px;
    }
    .feature-strip-item {
        gap: 12px;
        padding: 4px 8px;
    }
    .hero-stats-master-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --------------------------------------------------------------------------
   3. TABLETS & SMALL LAPTOPS (max-width: 991.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    /* Topbar with Visible Location on Mobile */
    .topbar {
        padding: 0;
    }
    .topbar-inner {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        min-height: 38px;
    }
    .topbar-left {
        display: flex !important;
        align-items: center;
    }
    .topbar-location {
        color: #FFFFFF !important;
        font-size: 0.76rem !important;
        font-weight: 500;
        letter-spacing: 0.01em;
    }
    .topbar-right {
        margin: 0 0 0 auto !important;
    }
    .topbar-emergency {
        padding: 6px 12px !important;
        font-size: 0.76rem !important;
        height: 38px !important;
    }

    /* Navbar Collapse Mobile Menu */
    .navbar-collapse {
        background: #FFFFFF;
        border-radius: 16px;
        padding: 16px 18px 20px;
        margin-top: 12px;
        box-shadow: 0 16px 36px rgba(1, 48, 110, 0.12);
        border: 1px solid rgba(1, 67, 151, 0.08);
    }
    .navbar-nav {
        gap: 4px;
    }
    .nav-link {
        padding: 10px 14px !important;
        font-size: 0.95rem;
        font-weight: 600;
        color: #041933 !important;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    .nav-link:hover,
    .nav-link.active {
        background: #EDF4FE;
        color: var(--primary) !important;
    }
    .nav-link.active::after {
        display: none;
    }
    .btn-appointment {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 12px 18px;
        border-radius: 12px;
        margin-top: 8px;
        font-size: 0.95rem;
    }

    /* Main Master Hero Section - Fixed Overlay & Background for Phones */
    .sahota-hero-master {
        background-image: linear-gradient(180deg, rgba(237, 244, 254, 0.94) 0%, rgba(237, 244, 254, 0.98) 100%), url('../../images/back.png') !important;
        background-size: cover !important;
        background-position: center center !important;
        min-height: auto !important;
        padding: 32px 0 28px !important;
    }
    .min-hero-master-row {
        min-height: auto !important;
    }
    .hero-master-title {
        font-size: clamp(1.9rem, 5.5vw, 2.45rem);
        line-height: 1.2;
    }
    .hero-master-desc {
        font-size: 0.98rem;
        line-height: 1.6;
        color: #1E293B;
        font-weight: 500;
        max-width: 100%;
        margin-bottom: 22px;
    }
    .hero-trust-pill {
        white-space: nowrap !important;
        flex-wrap: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 5px 12px !important;
        gap: 6px !important;
        font-size: 0.7rem !important;
        max-width: 100% !important;
        border-radius: 50px !important;
    }
    .trust-text {
        font-size: 0.68rem !important;
        letter-spacing: 0.04em !important;
        white-space: nowrap !important;
    }
    .trust-badge-rating {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* About Page Stats Cards Mobile */
    .stat-luxury-card {
        padding: 16px 10px !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 16px rgba(1, 48, 110, 0.06) !important;
        border: 1px solid rgba(1, 67, 151, 0.08) !important;
        text-align: center !important;
    }
    .stat-luxury-num {
        font-size: 1.8rem !important;
        margin-bottom: 2px !important;
    }
    .stat-luxury-card h5 {
        font-size: 0.85rem !important;
        margin-bottom: 2px !important;
    }
    .stat-luxury-card p {
        font-size: 0.72rem !important;
        line-height: 1.3 !important;
    }

    /* Inner Page Hero (Split Hero) */
    .page-hero-split {
        background-image: linear-gradient(180deg, rgba(237, 244, 254, 0.94) 0%, rgba(237, 244, 254, 0.98) 100%), url('../../images/back.png') !important;
        background-size: cover !important;
        background-position: center center !important;
        min-height: auto !important;
        padding: 32px 0 24px !important;
    }
    .page-hero-title {
        font-size: clamp(1.7rem, 5vw, 2.2rem);
        margin-bottom: 8px;
    }
    .page-hero-desc {
        font-size: 0.95rem;
        color: #334155;
        line-height: 1.55;
    }

    /* Features Strip Section */
    .sahota-features-wrapper {
        margin-top: 0 !important;
        padding-top: 20px;
    }
    .sahota-features-card {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 16px 14px !important;
        gap: 10px !important;
        border-radius: 16px;
    }
    .sahota-feature-col {
        flex: 1 1 100% !important;
        padding: 8px 4px !important;
        display: flex;
        align-items: center;
        gap: 14px;
    }
    .feature-col-divider {
        width: 100% !important;
        height: 1px !important;
        background: #E2E8F0 !important;
        margin: 0 !important;
    }
    .feature-icon-circle {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        font-size: 1.1rem !important;
    }

    /* General Section Padding */
    .section-padding {
        padding: 50px 0;
    }
    .section-heading {
        margin-bottom: 32px;
    }
    .section-heading h2 {
        font-size: clamp(1.6rem, 5vw, 2.1rem);
    }
    .section-heading p {
        font-size: 0.92rem;
    }

    /* CTA Luxury Box */
    .cta-luxury-box {
        text-align: center;
        padding: 32px 20px;
        border-radius: 20px;
    }
    .cta-luxury-box h2 {
        font-size: 1.7rem;
    }
    .cta-luxury-box .d-flex {
        justify-content: center !important;
    }
}

/* --------------------------------------------------------------------------
   4. MOBILE PHONES (max-width: 767.98px)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    /* Hero Actions: Full width touch-friendly buttons */
    .hero-master-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 10px !important;
    }
    .hero-master-actions .btn,
    .hero-master-actions button,
    .hero-master-actions a {
        width: 100% !important;
        justify-content: center !important;
        padding: 13px 20px !important;
        font-size: 0.98rem !important;
        border-radius: 50px !important;
    }

    .hero-heartbeat-wrap {
        width: 110px;
    }

    /* Cards Across All Pages */
    .doctor-card {
        border-radius: 18px !important;
        overflow: hidden !important;
        width: 100% !important;
        background: #FFFFFF !important;
        box-shadow: 0 4px 20px rgba(1, 48, 110, 0.07) !important;
    }
    .doctor-image-wrap {
        width: 100% !important;
        aspect-ratio: 1 / 1.12 !important;
        height: auto !important;
        max-width: 100% !important;
        position: relative !important;
        overflow: hidden !important;
        display: block !important;
        background: linear-gradient(180deg, #F4F8FD 0%, #E2ECF8 100%) !important;
    }
    .doctor-image-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }
    .doctor-content {
        padding: 18px 16px 12px !important;
    }
    .doctor-speciality {
        font-size: 0.74rem !important;
        font-weight: 700 !important;
        color: var(--accent) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.04em !important;
        margin-bottom: 4px !important;
        display: block !important;
    }
    .doctor-content h3 {
        font-size: 1.22rem !important;
        font-weight: 800 !important;
        color: #041933 !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }
    .doctor-deg {
        font-size: 0.84rem !important;
        color: #64748B !important;
        margin-bottom: 6px !important;
    }
    .doctor-timing {
        font-size: 0.78rem !important;
        color: #014397 !important;
        font-weight: 600 !important;
        display: inline-flex !important;
        align-items: center !important;
        margin-bottom: 10px !important;
    }
    .doctor-card-footer {
        padding: 0 16px 16px !important;
    }
    .doctor-card-footer .btn {
        padding: 12px 18px !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
    }

    .department-card,
    .blog-card {
        border-radius: 16px;
        overflow: hidden;
    }
    .department-image-wrap {
        height: 180px;
    }
    .department-image-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .department-content,
    .blog-content {
        padding: 16px 14px;
    }

    .service-card {
        padding: 20px 16px;
        border-radius: 16px;
    }
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 12px;
    }

    .testimonial-editorial-card {
        padding: 18px 16px;
        border-radius: 16px;
    }
    .testimonial-quote {
        font-size: 0.9rem;
    }

    /* Founder Desk on About Page */
    .founder-card-wrap {
        margin-bottom: 24px;
    }
    .founder-quote {
        padding: 16px 14px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    /* Gallery Filter & Grid */
    .gallery-filter-buttons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-bottom: 20px;
    }
    .gallery-filter-btn {
        padding: 8px 14px;
        font-size: 0.78rem;
        border-radius: 50px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .gallery-luxury-card {
        height: 230px;
        border-radius: 16px;
    }

    /* FAQ Accordion */
    .accordion-button {
        padding: 14px 16px;
        font-size: 0.94rem;
        line-height: 1.4;
        font-weight: 600;
    }
    .accordion-body {
        padding: 14px 16px;
        font-size: 0.88rem;
        line-height: 1.6;
    }

    /* CTA Section Buttons */
    .cta-luxury-box .d-flex {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .cta-luxury-box .btn {
        width: 100% !important;
        justify-content: center;
        padding: 12px 18px;
    }

    /* Contact Page Quick Cards */
    .contact-quick-card {
        padding: 18px 16px;
        border-radius: 14px;
    }

    /* Appointment Modal */
    .modal-dialog {
        margin: 12px;
        max-width: calc(100% - 24px);
    }
    .modal-content {
        border-radius: 20px;
    }
    .modal-header {
        padding: 16px 18px;
    }
    .modal-body {
        padding: 18px 16px;
        max-height: 80vh;
        overflow-y: auto;
    }

    /* Footer Responsive */
    .site-footer {
        padding: 44px 0 80px; /* Extra bottom space for floating CTA buttons */
    }
    .footer-desc {
        font-size: 0.88rem;
    }
    .footer-links li a {
        font-size: 0.86rem;
    }
    .footer-emergency-box {
        padding: 12px 14px;
        gap: 12px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        font-size: 0.82rem;
    }

    /* Hide standalone bottom-left scroll button on mobile to prevent clutter */
    button.btn.btn-primary.rounded-circle.position-fixed {
        display: none !important;
    }

    /* Floating Hospital Action Icons (Compact & Non-Intrusive) */
    .floating-hospital-actions {
        bottom: 12px !important;
        right: 10px !important;
        gap: 6px !important;
        z-index: 990 !important;
    }
    .fab-pill {
        width: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 50% !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22) !important;
        font-size: 0.95rem !important;
    }
    .fab-pill i {
        font-size: 0.95rem !important;
    }
    .fab-pill .fab-text {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   5. SMALL PHONES (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .section-padding {
        padding: 40px 0;
    }
    .hero-master-title {
        font-size: 1.82rem;
    }
    .page-hero-title {
        font-size: 1.65rem;
    }
    .trust-text {
        font-size: 0.68rem;
    }
    .trust-badge-rating {
        font-size: 0.65rem;
    }
    .topbar-location {
        font-size: 0.72rem !important;
    }
    .topbar-emergency {
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
        height: 36px !important;
    }
    .form-card,
    .info-card {
        padding: 18px 14px;
        border-radius: 14px;
    }
}

/* --------------------------------------------------------------------------
   6. EXTRA SMALL SCREENS (max-width: 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
    .hero-master-title {
        font-size: 1.62rem;
    }
    .hero-trust-pill {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 12px;
    }
    .btn-master-primary,
    .btn-master-secondary {
        font-size: 0.9rem !important;
        padding: 12px 14px !important;
    }
}
