/* ============================================================
   JPIMS — Comprehensive Responsive Stylesheet
   Ensures seamless presentation across desktop, tablets, and phones
   ============================================================ */

/* Global overflow guard */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

/* Large Screens & Desktops (Modern Wide Screen Alignment - Fill Screen & Remove Gaps) */
@media (min-width: 1200px) {
  .container {
    max-width: 95% !important;
    width: 95% !important;
    padding-left: clamp(16px, 2vw, 36px) !important;
    padding-right: clamp(16px, 2vw, 36px) !important;
  }
}
@media (min-width: 1800px) {
  .container {
    max-width: 1840px !important;
    width: 96% !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

/* Tablets and Medium Devices (max-width: 991px) */
@media (max-width: 991px) {
  /* Header & Top Bar */
  .top-header-area {
    display: none; /* Hide cluttered top-bar on mobile */
  }

  /* Navigation */
  .main-menu {
    display: none;
  }
  .mobile-menu {
    display: block !important;
  }

  /* Video Badge on Tablets */
  .jpims-video-badge {
    top: 15px !important;
    left: 15px !important;
    padding: 8px 16px !important;
    max-width: 90% !important;
  }

  .jpims-video-badge-text {
    font-size: 15px !important;
  }

  /* Floating OPD Card adjustment */
  .ksm-floating-card {
    position: static !important;
    margin: 20px auto 0 !important;
    width: 100% !important;
    max-width: 320px !important;
  }

  /* Offcanvas Side Menu */
  .extra-info {
    width: 300px;
    padding: 30px 20px;
  }

  /* Pre-Footer Section */
  .call_area.style_three .footer_logo {
    text-align: center;
    margin-bottom: 20px;
  }

  /* Department Carousel Section */
  section.sectionfive .section_title.home_five h1 {
    font-size: 28px !important;
  }
  #depart5 {
    margin-top: 25px !important;
  }

  .call_social_icon ul {
    justify-content: center !important;
  }

  /* Footer Bottom */
  .footer-bottom-content-copy {
    text-align: center;
    margin-bottom: 12px;
  }

  .footer-bottom-menu ul {
    text-align: center;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* Mobile Devices (max-width: 767px) */
@media (max-width: 767px) {
  /* Headings scale down for mobile */
  h1 { font-size: 26px !important; line-height: 1.25 !important; }
  h2 { font-size: 22px !important; line-height: 1.3 !important; }
  h3 { font-size: 19px !important; line-height: 1.35 !important; }
  h4 { font-size: 17px !important; }

  /* Hero Banner scaling */
  .hero-area, .slider-area {
    padding-top: 10px;
  }

  /* Hospital Service Cards (#services-hospital) */
  #services-hospital .col-lg-3,
  #services-hospital .col-md-6 {
    margin-bottom: 20px;
  }

  /* Video Badge on Mobile */
  .jpims-video-badge {
    top: 10px !important;
    left: 10px !important;
    padding: 6px 12px !important;
    gap: 8px !important;
  }

  .jpims-video-badge-logo {
    width: 34px !important;
    height: 34px !important;
  }

  .jpims-video-badge-text {
    font-size: 13px !important;
    letter-spacing: 0.3px !important;
  }

  .jpims-video-badge-sub {
    font-size: 10px !important;
  }

  /* Marquee news ticker */
  .marquee-item {
    font-size: 13px !important;
    margin-right: 25px !important;
  }

  /* Floating emergency widget on mobile */
  .floating-emergency-badge {
    right: 10px !important;
    bottom: 75px !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  /* Pre-footer Call Social Icons */
  .call_social_icon ul li a {
    width: 42px !important;
    height: 42px !important;
  }

  .call_social_icon ul li a i {
    font-size: 16px !important;
  }
}

/* Extra Small Phones (max-width: 480px) */
@media (max-width: 480px) {
  .logo img {
    max-width: 220px;
    height: auto;
  }

  .jpims-video-badge-text {
    font-size: 11px !important;
  }

  .jpims-video-badge-sub {
    display: none !important; /* Save space on small mobile */
  }

  /* Section Padding */
  section {
    padding: 35px 0 !important;
  }
}
