/* ==========================================================================
   SHE MATTERS Advanced Hospital - Comprehensive Responsive Stylesheet
   Breakpoints: Desktop (1400px+, 1200px), Tablet (992px, 768px), Mobile (480px, 360px)
   ========================================================================== */

/* ==========================================================================
   1. Extra Large Desktops (min-width: 1400px)
   ========================================================================== */
@media (min-width: 1400px) {
  .container {
    max-width: 1360px;
  }

  .hero-title {
    font-size: 3.8rem;
  }
}

/* ==========================================================================
   2. Large Devices / Standard Desktops (1200px to 1399.98px)
   ========================================================================== */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .container {
    max-width: 1180px;
  }

  .hero-title {
    font-size: 3.2rem;
  }

  .hero-main-img-container img {
    height: 440px;
  }
}

/* ==========================================================================
   3. Medium-Large / Laptops (max-width: 1199.98px)
   ========================================================================== */
@media (max-width: 1199.98px) {
  .hero-title {
    font-size: 2.85rem;
  }

  .hero-main-img-container img {
    height: 420px;
  }

  .floating-card-1 {
    bottom: 10px;
    left: -10px;
  }

  .floating-card-2 {
    top: 20px;
    right: -10px;
  }
}

/* ==========================================================================
   4. Medium Devices / Tablets (max-width: 991.98px)
   ========================================================================== */
@media (max-width: 991.98px) {
  html {
    scroll-padding-top: 80px;
  }

  /* Top Ribbon - hide on tablet and mobile for clean focus */
  .top-ribbon {
    display: none !important;
  }

  /* Navigation Collapse Drawer */
  .navbar-collapse {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 15px 35px rgba(24, 9, 39, 0.12);
    border: 1px solid var(--border-color);
  }

  .nav-item {
    margin-bottom: 6px;
  }

  .navbar-collapse .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 18px !important;
    font-size: 0.95rem !important;
  }

  .navbar-collapse .nav-link.active::after {
    left: 24px;
    transform: none;
    width: 24px;
    bottom: 4px;
  }

  .navbar-medicare .navbar-btn-group {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 14px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(230, 0, 103, 0.12) !important;
  }

  .navbar-medicare .nav-btn-book,
  .navbar-medicare .nav-btn-contact {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 18px !important;
    font-size: 0.92rem !important;
  }

  /* Redesigned Hero Section (max-width: 991.98px) - Reduced height */
  .hero-section,
  #home {
    min-height: 440px !important;
    height: auto !important;
    padding: 50px 0 42px !important;
    text-align: left;
  }

  .hero-content.hero-content-left {
    margin: 0;
    max-width: 100%;
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .hero-subtitle {
    margin-left: 0;
    margin-right: auto;
    max-width: 640px;
    white-space: normal !important;
  }

  .hero-cta-group {
    justify-content: flex-start;
  }


  /* Stats Banner */
  .stats-banner-section {
    margin-top: 0;
    margin-bottom: 0;
    padding: 20px 0 50px;
  }

  .stats-card-wrapper {
    padding: 28px 22px;
  }

  .stat-item {
    margin-bottom: 12px;
  }

  /* Department Cards */
  .dept-card {
    padding: 28px 22px;
  }

  /* About Section */
  .about-image-collage {
    margin-bottom: 35px;
  }

  /* Doctors Section */
  .doctor-img-wrap {
    height: 280px;
  }

  /* Appointment Section */
  .appointment-banner-side {
    padding: 38px 28px;
  }

  .appointment-form-side {
    padding: 38px 28px;
  }

  /* Testimonials */
  .testimonial-marquee-item {
    width: 320px;
  }
}

/* ==========================================================================
   5. Small Devices / Phones (max-width: 767.98px)
   ========================================================================== */
@media (max-width: 767.98px) {
  /* Full Width Sections & Viewport Containment on Mobile */
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  section, header, footer, main, nav, .hero-section {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* ==========================================================================
     MOBILE VIEW SECTION SPACING REDUCTION (40-50% TIGHTER VERTICAL GAPS)
     ========================================================================== */
  /* Major page section outer vertical padding */
  section.py-5,
  section[class*="py-"] {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  /* Eliminate stacked container py-4 padding inside sections on mobile */
  section > .container.py-4,
  section > .container.py-5,
  section .container.py-4,
  section .container.py-5 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Redesigned Hero Section Mobile Spacing - Reduced height */
  .hero-section,
  #home {
    min-height: 330px !important;
    height: auto !important;
    padding-top: 34px !important;
    padding-bottom: 28px !important;
  }

  /* Stats Section Spacing Before Footer */
  .stats-banner-section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 15px 0 45px !important;
  }

  /* Centres of Clinical Excellence Section */
  .clinical-excellence-section,
  #departments {
    padding-top: 40px !important;
    padding-bottom: 36px !important;
  }

  /* Video Showcase Section */
  .video-showcase-section,
  #video-tour {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  /* Blog / Medical Insights Section */
  .blog-section,
  #blog {
    padding-top: 40px !important;
    padding-bottom: 36px !important;
  }

  /* Tighter gap between section header and cards */
  section .text-center.mb-5,
  section .mb-5 {
    margin-bottom: 1.75rem !important;
  }

  .container, .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
  }

  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .row > * {
    padding-left: 8px !important;
    padding-right: 8px !important;
    max-width: 100% !important;
  }

  .section-title {
    font-size: 1.85rem !important;
    margin-bottom: 0.75rem;
  }

  .section-subtitle {
    font-size: 0.98rem;
  }

  /* Hero Mobile Typography & CTAs */
  .hero-content.hero-content-left {
    text-align: left;
    margin: 0;
  }

  .hero-title {
    font-size: 2.15rem;
    line-height: 1.2;
    text-align: left;
  }

  .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
    margin-left: 0;
    margin-right: auto;
    white-space: normal !important;
    text-align: left;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-cta-group .btn-hero-primary,
  .hero-cta-group .btn-hero-secondary {
    width: 100%;
    justify-content: center;
  }


  /* Stats Section */
  .stats-card-wrapper {
    padding: 22px 14px;
    border-radius: var(--radius-md);
  }

  .stat-number {
    font-size: 1.95rem;
  }

  .stat-label {
    font-size: 0.82rem;
  }

  .stat-icon {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    margin-bottom: 10px;
  }

  /* Department Cards */
  .dept-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 24px 18px;
    border-radius: var(--radius-md);
  }

  .dept-img-box {
    height: 190px;
    margin-bottom: 18px;
  }

  .dept-title {
    font-size: 1.25rem;
  }

  /* Doctor Cards - Equal Height on Mobile/Tablet */
  .doctor-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .doctor-img-wrap {
    height: 260px;
    flex-shrink: 0 !important;
  }

  .doctor-content {
    padding: 20px 18px;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
  }

  .doctor-content .btn,
  .doctor-content a.btn {
    margin-top: auto !important;
  }

  /* Appointment Booking */
  .appointment-card {
    border-radius: var(--radius-lg);
  }

  .appointment-banner-side {
    padding: 28px 18px;
  }

  .appointment-form-side {
    padding: 28px 18px;
  }

  /* Testimonials */
  .testimonial-marquee-item {
    width: 290px;
  }

  .testimonial-bubble {
    padding: 20px 16px;
  }

  .testimonial-bubble .quote-text {
    font-size: 0.88rem;
    margin-bottom: 14px;
  }

  /* Movable Video Showcase: Mobile Height & Responsive Fix */
  .movable-reel-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px 0 16px !important;
    scroll-snap-type: x mandatory !important;
    box-sizing: border-box !important;
  }

  .movable-reel-track {
    display: flex !important;
    width: max-content !important;
    gap: 14px !important;
    padding: 0 4px !important;
  }

  .video-card-slide {
    width: calc(100vw - 36px) !important;
    max-width: calc(100vw - 36px) !important;
    flex: 0 0 calc(100vw - 36px) !important;
    min-width: 0 !important;
    height: auto !important;
    border-radius: var(--radius-md) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    scroll-snap-align: center !important;
  }

  .video-player-box {
    width: 100% !important;
    height: 195px !important;
    max-height: 195px !important;
    aspect-ratio: auto !important;
    position: relative !important;
    overflow: hidden !important;
  }

  .card-video-element {
    width: 100% !important;
    height: 100% !important;
    max-height: 195px !important;
    object-fit: cover !important;
    display: block !important;
  }

  .card-play-btn {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.15rem !important;
  }

  .video-slide-content {
    padding: 14px !important;
    flex-grow: 1 !important;
  }

  .video-slide-title {
    font-size: 0.94rem !important;
    line-height: 1.35 !important;
    margin-bottom: 6px !important;
  }

  .video-slide-spec {
    font-size: 0.78rem !important;
  }

  /* FAQ Accordion */
  .custom-faq .accordion-button {
    font-size: 0.95rem;
    padding: 15px 16px;
  }

  .custom-faq .accordion-body {
    font-size: 0.9rem;
    padding: 12px 16px 18px;
  }

  /* Footer */
  .footer-medicare {
    padding: 40px 0 20px 0 !important;
  }

  /* Mobile Repositioning: Back to Top moves to bottom-left to avoid dock collision! */
  .back-to-top-btn {
    bottom: 20px;
    left: 20px;
    right: auto;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* Sticky Social Bar: Placed Right Upper-Middle Vertically with margin gap */
  .sticky-social-bar {
    position: fixed !important;
    right: 12px !important;
    left: auto !important;
    top: 35% !important;
    transform: translateY(-35%) !important;
    padding: 9px 6px !important;
    gap: 10px !important;
    border-radius: 28px !important;
    z-index: 1040 !important;
    box-shadow: 0 8px 24px rgba(27, 10, 42, 0.16) !important;
  }

  .social-dock-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.15rem !important;
  }

  .social-dock-tooltip {
    display: none !important;
  }
}

/* ==========================================================================
   6. Extra Small Devices / Micro Phones (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.78rem;
  }

  .hero-pill {
    font-size: 0.74rem;
    padding: 5px 12px;
  }

  .hero-trust-row {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  /* Stats Grid Compact */
  .stats-card-wrapper {
    padding: 16px 8px;
  }

  .stat-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .stat-number {
    font-size: 1.65rem;
  }

  .stat-label {
    font-size: 0.74rem;
  }

  /* About Floating Badge - Graceful stack on small screens */
  .about-badge-floating {
    position: static !important;
    margin: 12px 0 0 0 !important;
    width: 100%;
    border-radius: 14px;
    padding: 12px 14px !important;
  }

  /* Testimonials */
  .testimonial-marquee-item {
    width: 260px;
  }

  .testimonial-bubble .quote-text {
    font-size: 0.83rem;
  }

  /* Video Card Sizing for Extra Small Screens */
  .video-card-slide {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
    flex: 0 0 calc(100vw - 28px) !important;
  }

  .video-player-box {
    height: 175px !important;
    max-height: 175px !important;
  }

  .card-video-element {
    max-height: 175px !important;
  }

  /* Sticky Social Bar */
  .sticky-social-bar {
    right: 10px !important;
    left: auto !important;
    top: 32% !important;
    transform: translateY(-32%) !important;
    padding: 8px 5px !important;
    gap: 9px !important;
    border-radius: 26px !important;
  }

  .social-dock-btn {
    width: 35px !important;
    height: 35px !important;
    font-size: 1.05rem !important;
  }

  /* Brand Logo & Title */
  .brand-logo-img {
    width: 38px;
    height: 38px;
  }

  .footer-brand-logo,
  .footer-logo-img {
    width: 44px;
    height: 44px;
    padding: 2px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-subtitle {
    font-size: 0.62rem;
  }

  .stat-item-box {
    padding: 16px 12px;
  }

  .stat-number {
    font-size: 2rem;
  }


}

/* ==========================================================================
   7. Dedicated iPad Pro & Tablet Optimization (768px to 1024.98px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1024.98px) {
  /* Video Section: Exactly 2 videos per row on iPad Pro / Tablets */
  .movable-reel-container {
    --visible-videos: 2 !important;
    --video-gap: 20px !important;
  }

  /* Navbar on iPad Pro Landscape / 1024px */
  .nav-link {
    padding: 6px 10px !important;
    font-size: 0.88rem !important;
  }

  .navbar-medicare .btn-medicare-glow {
    padding: 10px 18px !important;
    font-size: 0.88rem !important;
  }

  .brand-tagline {
    font-size: 0.62rem !important;
    letter-spacing: 0.18em !important;
  }

  .brand-name {
    font-size: 1.25rem !important;
  }

  /* Hero Section on iPad Pro */
  .hero-title {
    font-size: 2.6rem !important;
    line-height: 1.2 !important;
  }

  .hero-main-img-container img {
    height: 380px !important;
  }

  .floating-card-1 {
    top: 15px !important;
    left: 8px !important;
  }

  .floating-card-2 {
    bottom: 20px !important;
    right: 8px !important;
  }

  /* Stats Banner on iPad Pro */
  .stats-card-wrapper {
    padding: 26px 20px 20px !important;
  }

  .stat-item-box {
    padding: 18px 14px !important;
  }

  .stat-number {
    font-size: 2.3rem !important;
  }

  .stat-label {
    font-size: 0.88rem !important;
  }

  .stat-subtext {
    font-size: 0.76rem !important;
  }

  /* Doctor Cards Equal Height on iPad Pro */
  .doctor-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .doctor-img-wrap {
    height: 280px !important;
    flex-shrink: 0 !important;
  }

  .doctor-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
  }

  .doctor-content .btn,
  .doctor-content a.btn {
    margin-top: auto !important;
  }

  /* Appointment on iPad Pro */
  .appointment-banner-side {
    padding: 35px 25px !important;
  }

  .appointment-form-side {
    padding: 35px 25px !important;
  }

  /* Sticky Social Bar on iPad Pro */
  .sticky-social-bar {
    right: 8px !important;
    padding: 8px 6px !important;
    gap: 8px !important;
  }

  .social-dock-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.1rem !important;
  }
}


