/* Mamta Hospital — visitor-first homepage refinements, 15 November 2026
   Only affects the homepage. No changes to D1, appointment APIs or other pages. */

/* Footer navigation: balanced, scannable columns without internal review notes. */
.homepage .home-footer .footer-grid{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) repeat(3,minmax(0,.78fr));
  gap:clamp(18px,3vw,42px);
  align-items:start;
}
.homepage .home-footer .footer-links{min-width:0;gap:11px}
.homepage .home-footer .footer-links b{
  color:#fff;font-size:16px;line-height:1.45;margin:0 0 5px;
}
.homepage .home-footer .footer-links a{
  display:inline-block;width:fit-content;
  font-size:14px;line-height:1.5;color:#d5e5e8;
  text-decoration:none;text-underline-offset:4px;
}
.homepage .home-footer .footer-links a:hover,
.homepage .home-footer .footer-links a:focus-visible{
  color:#fff;text-decoration:underline;
}
.homepage .home-footer .mh-home-legal{align-content:start}
.homepage .home-footer .mh-home-legal a{white-space:normal}

/* Directions and map belong to a dedicated full-width location panel, not the nav grid. */
.homepage .home-footer .mh-home-visit-section{
  display:grid;
  grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);
  gap:clamp(16px,2vw,24px);
  align-items:stretch;
  padding:18px;
  margin-top:34px;
  border:1px solid rgba(213,236,239,.2);
  border-radius:22px;
  background:linear-gradient(115deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
}
.homepage .mh-home-visit-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  padding:clamp(5px,1.2vw,15px);
}
.homepage .mh-home-visit-kicker{
  font-size:11px;letter-spacing:.14em;font-weight:850;color:#efce8f;
}
.homepage .mh-home-visit-copy h2{
  font-family:Georgia,serif;
  font-size:clamp(25px,2.5vw,37px);
  font-weight:600;letter-spacing:-.025em;
  line-height:1.2;color:#fff;margin:13px 0 8px;
}
.homepage .mh-home-visit-copy>p{
  font-size:14px;line-height:1.72;color:#d4e5e8;margin:0;
  max-width:470px;
}
.homepage .mh-home-visit-actions{
  display:flex;align-items:center;flex-wrap:wrap;gap:12px 16px;margin:20px 0 18px;
}
.homepage .mh-home-visit-actions a{
  font-size:13px;font-weight:850;text-underline-offset:4px;
}
.homepage .mh-home-visit-actions .mh-home-directions-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-height:46px;padding:10px 17px;border-radius:11px;
  background:#e7f5f3;color:#125b5f;text-decoration:none;
  box-shadow:0 6px 16px #0b202425;
}
.homepage .mh-home-directions-btn svg{
  width:18px;height:18px;flex:none;
}
.homepage .mh-home-visit-actions .mh-home-directions-btn:hover{
  background:#fff;color:#0c5057;
}
.homepage .mh-home-visit-contact{
  color:#e7f3f4;text-decoration:underline;
}
.homepage .mh-home-visit-copy .mh-home-location-photo{
  display:block;
  width:100%;
  height:clamp(150px,16vw,205px);
  overflow:hidden;border-radius:14px;
  margin-top:auto;
  border:1px solid #ffffff29;
  background:#274f60;
}
.homepage .mh-home-visit-copy .mh-home-location-photo img{
  display:block;width:100%;height:100%;
  object-fit:cover;object-position:center 55%;
}
.homepage .mh-home-visit-section .mh-home-location-map{
  position:relative;
  width:100%;
  height:auto;
  min-height:355px;
  overflow:hidden;
  border-radius:16px;
  border:1px solid #ffffff42;
  background:#dbe9ee;
  box-shadow:0 12px 30px #071d2535;
}
.homepage .mh-home-visit-section .mh-home-location-map iframe{
  display:block!important;width:100%!important;height:100%!important;
  position:absolute;inset:0;
  border:0!important;border-radius:0!important;
  filter:none!important;
}
.homepage .mh-home-visit-actions a:focus-visible,
.homepage .mh-home-visit-section iframe:focus-visible{
  outline:3px solid #f4c96b;outline-offset:3px;
}

/* Mobile speciality cards: shorter, focused, image-conscious. */
.homepage .home-centres .care-grid>a{overflow:hidden}
.homepage .home-centres .care-grid>a .care-photo{
  object-fit:cover;object-position:center;
}
.homepage .home-centres .care-grid>a[href="/services/ent-hearing-care/"] .care-photo{
  object-position:center 28%;
}
.homepage .home-centres .care-grid>a[href="/services/nephrology/"] .care-photo{
  object-position:center 14%;
}
.homepage .home-centres .care-grid>a[href="/services/pediatrics/"] .care-photo{
  object-position:center 45%;
}

/* Comfortable tablet composition. */
@media(max-width:1080px){
  .homepage .home-footer .footer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:26px 38px;
  }
  .homepage .home-footer .mh-home-visit-section{
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  }
}
@media(max-width:800px){
  .homepage .home-centres .care-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
  .homepage .home-centres .care-grid>a.care-with-photo{
    display:flex;flex-direction:column;
    min-height:238px;padding:116px 15px 15px!important;
    border-radius:15px;
  }
  .homepage .home-centres .care-grid>a.care-with-photo .care-photo{
    position:absolute;top:0;left:0;
    width:100%;height:109px;object-fit:cover;
  }
  .homepage .home-centres .care-grid>a.care-with-photo .care-icon{
    width:43px!important;height:43px!important;margin-top:-34px;
    margin-bottom:6px;border-radius:13px!important;
  }
  .homepage .home-centres .care-grid>a.care-with-photo .care-icon svg{
    width:24px;height:24px;
  }
  .homepage .home-centres .care-grid>a.care-with-photo h3{
    font-size:16px;line-height:1.32;margin:2px 0 6px;
  }
  .homepage .home-centres .care-grid>a.care-with-photo p{
    font-size:12px;line-height:1.52;margin:0 0 9px;
    display:-webkit-box;-webkit-box-orient:vertical;
    -webkit-line-clamp:2;overflow:hidden;
  }
  .homepage .home-centres .care-grid>a.care-with-photo span:last-child{
    margin-top:auto;font-size:12px;
  }
  .homepage .home-footer .mh-home-visit-section{
    grid-template-columns:1fr;gap:16px;
  }
  .homepage .mh-home-visit-copy .mh-home-location-photo{
    height:145px;margin-top:9px;
  }
  .homepage .mh-home-visit-section .mh-home-location-map{height:305px;min-height:305px}
}

/* True phone widths: each service is a tidy, accessible image-and-text row. */
@media(max-width:520px){
  .homepage .home-centres{
    padding-top:33px!important;padding-bottom:40px!important;
  }
  .homepage .home-centres .home-title-row{
    display:flex;flex-direction:column;align-items:flex-start;gap:9px;
    margin-bottom:18px;
  }
  .homepage .home-centres .home-title-row h2{
    font-size:clamp(27px,7.2vw,36px);line-height:1.17;
  }
  .homepage .home-centres .care-grid{
    grid-template-columns:1fr;gap:10px;
  }
  .homepage .home-centres .care-grid>a.care-with-photo{
    display:grid;grid-template-columns:96px minmax(0,1fr);
    grid-template-rows:auto auto minmax(0,1fr);
    align-items:start;gap:0 13px;
    min-height:117px;
    padding:11px!important;
    border-radius:14px;
    box-shadow:0 2px 12px #183f4e0b;
  }
  .homepage .home-centres .care-grid>a.care-with-photo .care-photo{
    position:static!important;
    grid-column:1;grid-row:1/span 3;
    width:96px;height:95px;
    max-width:none;
    border-radius:10px;
    object-fit:cover;
  }
  .homepage .home-centres .care-grid>a.care-with-photo .care-icon{
    display:none!important;
  }
  .homepage .home-centres .care-grid>a.care-with-photo h3{
    grid-column:2;grid-row:1;
    font-size:15px;line-height:1.32;
    margin:2px 0 5px;
    letter-spacing:-.01em;
  }
  .homepage .home-centres .care-grid>a.care-with-photo p{
    grid-column:2;grid-row:2;
    font-size:11.5px;line-height:1.42;
    margin:0 0 6px;
    display:-webkit-box;-webkit-box-orient:vertical;
    -webkit-line-clamp:2;overflow:hidden;
  }
  .homepage .home-centres .care-grid>a.care-with-photo span:last-child{
    grid-column:2;grid-row:3;
    align-self:end;margin:0;
    color:#126c72;font-size:12px;font-weight:850;
  }

  /* Keep homepage sections comfortably spaced, not oversized. */
  .homepage .mh-photo-gallery{padding-top:36px;padding-bottom:38px}
  .homepage .mh-hospital-slider .home-slide-grid{
    min-height:0;gap:18px;padding:31px 0 68px;
  }
  .homepage .mh-hospital-slider .home-slide-copy h1,
  .homepage .mh-hospital-slider .home-slide-copy h2{
    font-size:clamp(29px,8vw,39px);letter-spacing:-.035em;
  }
  .homepage .mh-hospital-slider .home-slide-copy p{font-size:14px;line-height:1.55}
  .homepage .mh-hospital-slider .mh-real-hospital-photo{height:205px;border-radius:16px}
  .homepage .mh-hospital-slider .mh-real-hospital-photo>img{object-position:center 40%}
  .homepage .mh-hospital-slider .slider-dots{bottom:16px;gap:7px}
  .homepage .mh-hospital-slider .slider-dots button{width:9px;height:9px}
  .homepage .mh-home-slider-pause{bottom:12px;right:8px;padding:7px 9px;font-size:10px}
  .homepage .home-slider .home-slide:not(.is-active){display:none!important}

  /* Footer: two small link groups per row, map full-width below. */
  .homepage .home-footer{
    padding-top:37px;
  }
  .homepage .home-footer .footer-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:25px 15px;
  }
  .homepage .home-footer .footer-brand{
    grid-column:1/-1;
  }
  .homepage .home-footer .footer-brand p{line-height:1.55}
  .homepage .home-footer .footer-links b{font-size:14px}
  .homepage .home-footer .footer-links a{
    font-size:13px;line-height:1.5;overflow-wrap:anywhere;
  }
  .homepage .home-footer .mh-home-visit-section{
    padding:12px;gap:13px;margin-top:25px;border-radius:17px;
  }
  .homepage .mh-home-visit-copy{padding:5px}
  .homepage .mh-home-visit-copy h2{font-size:28px}
  .homepage .mh-home-visit-copy>p{font-size:13px}
  .homepage .mh-home-visit-actions{gap:12px;margin:16px 0 12px}
  .homepage .mh-home-visit-actions .mh-home-directions-btn{
    padding:11px 14px;min-height:44px;font-size:13px;
  }
  .homepage .mh-home-visit-copy .mh-home-location-photo{
    height:133px;margin-top:6px;
  }
  .homepage .mh-home-visit-section .mh-home-location-map{
    height:245px;min-height:245px;border-radius:12px;
  }
  .homepage .mh-home-all-doctors{margin-top:27px}
  .homepage .mh-home-all-doctors nav{
    grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;
  }
}
@media(max-width:370px){
  .homepage .home-centres .care-grid>a.care-with-photo{
    grid-template-columns:84px minmax(0,1fr);
    gap:0 10px;min-height:104px;padding:9px!important;
  }
  .homepage .home-centres .care-grid>a.care-with-photo .care-photo{
    width:84px;height:87px;
  }
  .homepage .home-centres .care-grid>a.care-with-photo h3{font-size:14px}
  .homepage .home-centres .care-grid>a.care-with-photo p{
    -webkit-line-clamp:2;font-size:11px;
  }
  .homepage .mh-home-visit-section .mh-home-location-map{
    height:220px;min-height:220px;
  }
}
@media(prefers-reduced-motion:reduce){
  .homepage .home-centres .care-grid>a.care-with-photo .care-photo{transition:none!important}
}


/* VISITOR EXPERIENCE V3 — screenshots 15 Nov 2026.
   Avoid giant duplicate portraits in the legacy story and prevent repeated
   or unrelated facility imagery from dominating the page. */
.homepage .hospital-gallery .gallery-surgery img{object-position:center 47%}
.homepage .hospital-gallery .gallery-room img{object-position:center 53%}
.homepage .hospital-gallery .gallery-radiology img{object-position:center 48%}
.homepage .hospital-gallery .gallery-main img{object-position:center 58%}
.homepage .hospital-gallery .gallery-caption b{line-height:1.3}
.homepage .hospital-gallery .gallery-caption span{line-height:1.4}
.homepage .home-centres .care-grid>a[href="/services/ent-hearing-care/"] .care-photo{object-position:center 48%}
.homepage .home-centres .care-grid>a[href="/services/nephrology/"] .care-photo{
  object-fit:contain!important;
  object-position:center 16%;
  background:linear-gradient(135deg,#e9f2f5,#f8fafb);
}

/* Editorial doctor cards on the history section — not another full-size gallery. */
.homepage .legacy-home .legacy-people{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:14px;
}
.homepage .legacy-home .legacy-people>a{
  display:flex;flex-direction:column;
  min-width:0;overflow:hidden;
  border-radius:17px;
}
.homepage .legacy-home .legacy-people>a img{
  display:block;width:100%;height:clamp(200px,22vw,290px);
  object-fit:cover;object-position:center 20%;
  background:#f0f2f0;
}
.homepage .legacy-home .legacy-people>a:first-child img{
  object-fit:contain;object-position:center bottom;
  background:#f3efe8;
}
.homepage .legacy-home .legacy-people>a span{padding:13px 14px 16px}
.homepage .legacy-home .legacy-people>a b{
  font-size:15px;line-height:1.4;color:#183c4b;
}
.homepage .legacy-home .legacy-people>a small{
  font-size:12px;line-height:1.5;
}
.homepage .legacy-home .legacy-people>a:hover{
  border-color:#b8d6d8;
  box-shadow:0 13px 30px #243e5419;
}

/* 7 real facility photos: emergency full-width + three pairs on phones. */
@media(max-width:760px){
  .homepage .home-facilities .hospital-gallery{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:240px repeat(3,160px);
    gap:9px;
  }
  .homepage .hospital-gallery .gallery-tile{min-width:0;border-radius:13px}
  .homepage .hospital-gallery .gallery-main{
    grid-column:1/-1;grid-row:1;
  }
  .homepage .hospital-gallery .gallery-child,
  .homepage .hospital-gallery .gallery-diagnostic,
  .homepage .hospital-gallery .gallery-surgery,
  .homepage .hospital-gallery .gallery-room,
  .homepage .hospital-gallery .gallery-radiology,
  .homepage .hospital-gallery .gallery-pharmacy{
    display:block;grid-column:auto;grid-row:auto;
  }
  .homepage .hospital-gallery .gallery-caption{padding:11px}
  .homepage .hospital-gallery .gallery-caption b{font-size:14px;line-height:1.27}
  .homepage .hospital-gallery .gallery-caption span{font-size:11px}
  .homepage .hospital-gallery .gallery-main .gallery-caption b{font-size:24px}
  .homepage .home-facilities .home-title-row{
    display:flex;align-items:flex-start;flex-direction:column;gap:12px;
  }
  .homepage .home-facilities .home-title-row h2{font-size:clamp(29px,7vw,40px)}
  .homepage .legacy-home .legacy-home-grid{gap:23px}
}
/* Short doctor preview rows on narrow screens, with proper name/role alignment. */
@media(max-width:640px){
  .homepage .legacy-home .legacy-people{
    grid-template-columns:1fr;
    gap:11px;
  }
  .homepage .legacy-home .legacy-people>a{
    display:grid;
    grid-template-columns:120px minmax(0,1fr);
    align-items:center;
    min-height:136px;
    border-radius:14px;
    box-shadow:0 6px 18px #25354a0b;
  }
  .homepage .legacy-home .legacy-people>a img{
    width:120px!important;
    height:136px!important;
    border-radius:0;
    display:block;
    object-fit:cover!important;
    object-position:center 23%!important;
  }
  .homepage .legacy-home .legacy-people>a:first-child img{
    object-fit:contain!important;
    object-position:center bottom!important;
  }
  .homepage .legacy-home .legacy-people>a span{
    padding:13px 14px;
    min-width:0;
  }
  .homepage .legacy-home .legacy-people>a b{
    font-size:16px;line-height:1.35;
  }
  .homepage .legacy-home .legacy-people>a small{
    font-size:12px;line-height:1.48;margin-top:5px;
  }
  /* Reduce the extra gap between leadership and facility sections. */
  .homepage .legacy-home{padding-top:38px!important;padding-bottom:43px!important}
  .homepage .legacy-home .legacy-story>p{font-size:15px;line-height:1.6}
  .homepage .legacy-home .legacy-line{margin:20px 0 24px}
  .homepage .legacy-home .legacy-line div{padding-bottom:15px}
  .homepage .home-facilities .hospital-gallery{
    grid-template-rows:220px repeat(3,135px);
  }
}
/* Compact the old mobile emergency strip without removing emergency contacts. */
@media(max-width:520px){
  .homepage .topbar .topbar-inner{
    min-height:34px;
    padding:5px 0;
  }
  .homepage .topbar .toplinks{
    display:grid;
    grid-template-columns:1fr 1fr;
    align-items:center;
    width:100%;
    gap:6px;
    font-size:10px;
    line-height:1.35;
    text-align:center;
  }
  .homepage .topbar .toplinks a{white-space:normal}
  .homepage .topbar .toplinks a:nth-child(2){display:none}
  .homepage .legacy-home .legacy-people>a{
    grid-template-columns:110px minmax(0,1fr);
    min-height:125px;
  }
  .homepage .legacy-home .legacy-people>a img{
    width:110px!important;
    height:125px!important;
  }
  .homepage .legacy-home .legacy-people>a b{font-size:15px}
  .homepage .home-facilities .hospital-gallery{
    grid-template-rows:195px repeat(3,126px);
    gap:8px;
  }
  .homepage .hospital-gallery .gallery-main .gallery-caption b{font-size:21px}
  .homepage .hospital-gallery .gallery-caption b{font-size:13px}
  .homepage .hospital-gallery .gallery-caption{padding:9px}
  .homepage .hospital-gallery .gallery-caption span{font-size:10px}
}
@media(max-width:360px){
  .homepage .legacy-home .legacy-people>a{
    grid-template-columns:98px minmax(0,1fr);
    min-height:112px;
  }
  .homepage .legacy-home .legacy-people>a img{
    width:98px!important;height:112px!important;
  }
  .homepage .legacy-home .legacy-people>a span{padding:9px}
  .homepage .legacy-home .legacy-people>a b{font-size:14px}
  .homepage .legacy-home .legacy-people>a small{font-size:11px}
  .homepage .home-facilities .hospital-gallery{
    grid-template-rows:175px repeat(3,118px);
  }
}
