/* ==========================================================================
   MATA CHANDRAKALA HOSPITAL — RESPONSIVE PRO
   Professional polish + 100% mobile/tablet responsive layer.
   IMPORTANT: Ye file sabse LAST me load honi chahiye (baaki CSS ke baad).
   Breakpoints: 1400 / 1199 / 991 / 767 / 575 / 400
   ========================================================================== */

:root {
  --mch-primary: #007CB0;
  --mch-primary-dark: #005c85;
  --mch-accent: #00b3a4;
  --mch-dark: #14324a;
  --mch-muted: #6b7c8c;
  --mch-radius: 12px;
  --mch-shadow: 0 6px 24px rgba(20, 50, 74, .08);
  --mch-shadow-hover: 0 14px 34px rgba(20, 50, 74, .16);
}

/* --------------------------------------------------------------------------
   1. GLOBAL FLUID FOUNDATION  (har device par lagta hai)
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;          /* horizontal scroll / white gap ka fix */
  -webkit-font-smoothing: antialiased;
}

/* Koi bhi element viewport se bahar na jaaye */
img, video, iframe, embed, object, svg, canvas {
  max-width: 100%;
  height: auto;
}

iframe { display: block; border: 0; }

/* Long words/emails mobile par overflow karte the */
p, li, h1, h2, h3, h4, h5, h6, a, span, td, th, label {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Tables ko mobile par scrollable banao */
.table-responsive-auto,
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Touch targets minimum 44px (Google/Apple guideline) */
.btn, button, .nav-link, .page-breadcrumb li a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* iOS input auto-zoom rokta hai */
input, select, textarea {
  font-size: 16px !important;
}

/* --------------------------------------------------------------------------
   2. PROFESSIONAL POLISH  (look & feel upgrade)
   -------------------------------------------------------------------------- */

.btn {
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: .2px;
  padding: 10px 22px;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary,
.btn-danger.text-white {
  background: linear-gradient(135deg, var(--mch-primary), var(--mch-accent));
  border: 0;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--mch-primary-dark), var(--mch-primary));
  box-shadow: 0 10px 22px rgba(0, 124, 176, .3);
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1.5px solid #dfe6ec;
  padding: 11px 14px;
  background: #f8fafb;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--mch-primary);
  box-shadow: 0 0 0 .2rem rgba(0, 124, 176, .14);
  background: #fff;
}

.form-group { margin-bottom: 18px; }

/* Cards / service tiles */
.service-items,
.service-item,
.counter-box,
.gallery-inner-main,
.address-box-section,
.member {
  border-radius: var(--mch-radius);
  transition: transform .25s ease, box-shadow .25s ease;
}

.service-items:hover,
.service-item:hover,
.counter-box:hover,
.member:hover {
  transform: translateY(-6px);
  box-shadow: var(--mch-shadow-hover);
}

.rounded-img, .img-thumbnail, .client-review-img img {
  border-radius: var(--mch-radius);
}

/* Images fill their box nicely instead of stretching */
.gallery-inner-main img,
.overview-image img,
.service-items img {
  width: 100%;
  object-fit: cover;
}

/* Breadcrumb banner */
.service-page-section {
  position: relative;
  background-size: cover;
  background-position: center;
}

.page-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 0;
  list-style: none;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(0, 124, 176, .45);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. FLOATING CALL / WHATSAPP + BACK TO TOP
   -------------------------------------------------------------------------- */

#mchBackToTop {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: 998;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--mch-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .3s ease;
}

#mchBackToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   4. BREAKPOINT: <= 1399px  (small laptops)
   -------------------------------------------------------------------------- */

@media (max-width: 1399px) {
  .service-section h2,
  .testimonial-section h3,
  .facilities-section h4 {
    font-size: clamp(26px, 2.4vw, 38px);
    line-height: 1.3;
  }
}

/* --------------------------------------------------------------------------
   5. BREAKPOINT: <= 1199px  (large tablets / small laptops)
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
  .container { max-width: 100%; padding-left: 20px; padding-right: 20px; }

  .header .menu > ul > li > a { padding: 0 12px; font-size: 14px; }

  .service-section,
  .aboutus-section,
  .facilities-section,
  .overview-section,
  .neurology-service-section,
  .testimonial-section {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .aboutus-section .aboutus-content h3,
  .experienced-doctor-content h3 { font-size: 30px; line-height: 1.35; }

  /* Fixed-width blocks ko fluid banao */
  .service-left-section,
  .service-right-content,
  .overview-image,
  .overview-content { width: 100% !important; max-width: 100% !important; }
}

/* --------------------------------------------------------------------------
   6. BREAKPOINT: <= 991px  (TABLETS — yahan mobile menu on hota hai)
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .header .container,
  header .container { padding: 8px 16px; }

  .header .logo img,
  .logo a img { max-height: 60px; width: auto; }

  /* Top social bar */
  .top-header .top-bg-white { display: none; }

  .top-bg-right { float: none; text-align: center; margin-right: 0; }
  .top-bg-right ul { margin: 0; padding: 6px 0; display: flex; justify-content: center; gap: 6px; }
  .top-bg-right ul li { list-style: none; }

  /* Mobile menu panel readable rahe */
  .header .menu.active { z-index: 1050; }
  .menu-overlay.active { z-index: 1040; }
  .header .menu .menu-main > li > a { padding: 14px 18px; font-size: 16px; }
  .header .menu .sub-menu ul li a { padding: 12px 18px; }

  /* Har 2-column layout stack ho jaaye */
  .service-left-section,
  .service-right-content,
  .aboutus-section .row > [class*="col-"],
  .about-medical .row > [class*="col-"] { margin-bottom: 24px; }

  .about-medical .icon-section .media,
  .facilities-section .media-main {
    border-right: none !important;
    border-bottom: none !important;
    padding-left: 0;
  }

  .my-border { border-bottom: none !important; }

  /* Section padding compress */
  .service-section,
  .aboutus-section,
  .facilities-section,
  .overview-section,
  .neurology-service-section,
  .department-address-section,
  .testimonial-section,
  .service-slider-section {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .heading-main { padding-top: 24px; padding-bottom: 32px; }

  /* Slider height ko viewport ke hisaab se */
  .owl-carousel .item img { width: 100%; height: auto; object-fit: cover; }

  /* Footer stack */
  .footer-section .row > [class*="col-"] { margin-bottom: 28px; }
  .footer-section { margin: 0; }
}

/* --------------------------------------------------------------------------
   7. BREAKPOINT: <= 767px  (BADE PHONES / chote tablets)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  body { font-size: 15px; line-height: 1.65; }

  h1 { font-size: clamp(24px, 6vw, 32px); }
  h2 { font-size: clamp(22px, 5.5vw, 28px); }
  h3 { font-size: clamp(20px, 5vw, 26px); }
  h4 { font-size: clamp(18px, 4.5vw, 22px); }

  .container, .container-fluid { padding-left: 16px; padding-right: 16px; }

  /* Breadcrumb banner */
  .service-page-section { padding: 46px 0; text-align: center; }
  .service-page-section h2 { font-size: 26px !important; left: 0 !important; position: static !important; }
  .page-breadcrumb { justify-content: center; position: static !important; }

  /* Sections */
  .service-section,
  .aboutus-section,
  .facilities-section,
  .overview-section,
  .neurology-service-section,
  .department-address-section,
  .testimonial-section,
  .service-slider-section {
    padding-top: 38px !important;
    padding-bottom: 38px !important;
  }

  .service-section .heading-main h2,
  .service-section h2,
  .testimonial-section h3,
  .facilities-section h4,
  .experienced-doctor-content h3,
  .aboutus-section .aboutus-content h3,
  .about-medical .about-head h4 {
    font-size: 24px !important;
    line-height: 1.35 !important;
    margin-bottom: 16px;
  }

  .about-medical .about-head h4 { margin-bottom: 28px; }
  .about-medical .media-body h5 { font-size: 34px !important; line-height: 1.2 !important; }

  .experienced-doctor-content { padding-left: 0; text-align: left; }
  .experienced-doctor-content p,
  .testimonial-section p { font-size: 16px; }

  .service-section .service-right-content,
  .aboutus-section .aboutus-content { text-align: left; }

  /* Buttons full-width on phone */
  .aboutus-button .btn,
  .doctor-button button,
  .doctor-button .btn,
  form .btn[type="submit"] {
    width: 100%;
    justify-content: center;
  }

  .aboutus-button, .doctor-button { display: block; }

  /* Testimonial */
  .testimonial-section .client-img img { display: none; }

  /* Counters 2-per-row */
  .counter-box { margin-bottom: 22px; text-align: center; }

  /* Gallery grid */
  .gallery-inner-main { margin-bottom: 18px; }

  /* Address / contact boxes */
  .address-box-section { margin-bottom: 18px; padding: 20px; }
  .address-box-section .media { align-items: flex-start; }

  /* Tables horizontally scroll */
  table { display: block; width: 100%; overflow-x: auto; white-space: nowrap; }

  /* Owl nav visible */
  .service-slider-section .owl-nav { display: block; }

  /* Footer */
  .footer-section .col-md-3,
  .footer-section .col-md-4 { padding: 20px 16px; }
  .footer-logo img { margin-top: 0; max-width: 170px; }
  .footer-section .col-md-4 .media img { width: 36px; }
  .last-section p { padding: 10px 0; font-size: 13px; text-align: center; }
  .footer-section .lower-footer .col-md-4 { padding: 12px 16px; }

  /* Floating buttons phone par thoda upar */
  #mchBackToTop { right: 12px; bottom: 76px; width: 42px; height: 42px; }
}

/* --------------------------------------------------------------------------
   8. BREAKPOINT: <= 575px  (standard phones)
   -------------------------------------------------------------------------- */

@media (max-width: 575px) {
  .container, .container-fluid { padding-left: 14px; padding-right: 14px; }

  .header .logo img, .logo a img { max-height: 52px; }
  .header .logo a h2 { font-size: 18px; }
  .header .logo a h4 { font-size: 11px; }

  .service-page-section h2 { font-size: 22px !important; }

  .service-items, .service-item { padding: 20px 16px; margin-bottom: 16px; }

  .icon-service img, .icon-service i { max-width: 52px; }

  .heading-main { padding-bottom: 24px; padding-top: 16px; }

  /* Row gutters kam */
  .row { margin-left: -8px; margin-right: -8px; }
  .row > [class*="col-"] { padding-left: 8px; padding-right: 8px; }

  /* Form rows stack */
  .form-group, .mb-3 { margin-bottom: 14px; }

  /* Counter 1-per-row */
  .counter-box .counter { font-size: 30px; }

  .top-bg-right ul li a { padding: 0 6px; }
}

/* --------------------------------------------------------------------------
   9. BREAKPOINT: <= 400px  (chote phones — iPhone SE etc.)
   -------------------------------------------------------------------------- */

@media (max-width: 400px) {
  body { font-size: 14.5px; }

  .header .logo img, .logo a img { max-height: 46px; }

  .service-page-section h2 { font-size: 20px !important; }

  h2, .service-section h2 { font-size: 21px !important; }

  .btn { padding: 10px 16px; font-size: 14px; }

  .address-box-section { padding: 16px; }

  .footer-section .col-md-3, .footer-section .col-md-4 { padding: 16px 12px; }
}

/* --------------------------------------------------------------------------
   10. LANDSCAPE PHONE (chhoti height)
   -------------------------------------------------------------------------- */

@media (max-height: 500px) and (orientation: landscape) {
  .header .menu.active { overflow-y: auto; }
  .service-page-section { padding: 30px 0; }
}

/* --------------------------------------------------------------------------
   11. PRINT
   -------------------------------------------------------------------------- */

@media print {
  .top-header, header, .footer-section, #mchBackToTop,
  .call-whatapps, .mobile-menu-trigger { display: none !important; }
  body { color: #000; }
}
