/**
 * Global front-site responsive layer (all dynamic themes)
 * Loaded LAST — wins over ai_custom_frontend.css
 */

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden !important; }
img, video, iframe { max-width: 100%; height: auto; }

/* Keep AI triage modal hidden until Bootstrap opens it */
#proAIModal.modal {
  display: none;
}
#proAIModal.modal.in {
  display: block;
}

/* Inner pages — compact banner with hospital image */
.thm-page-banner {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  background: linear-gradient(135deg, #0b1220 0%, #1e3a5f 55%, #2563eb 100%);
  color: #fff;
  margin: 0;
}
.thm-page-banner-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 28%;
  transform: scale(1.02);
}
.thm-page-banner-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 13, 22, .88) 0%, rgba(9, 13, 22, .55) 55%, rgba(37, 99, 235, .35) 100%);
}
.thm-page-banner-inner {
  position: relative;
  z-index: 1;
  padding: 42px 15px 36px;
}
.thm-page-banner-inner h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.thm-page-banner-inner p {
  margin: 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(226, 232, 240, .92);
}

/* Appointment form polish */
.container.spacet50 form.appointment {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 20px 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}
.container.spacet50 form.appointment + h2,
.container.spacet50 > .row > .col-md-12 > h2.text-center {
  margin-top: 0;
  margin-bottom: 18px;
  font-weight: 800;
  color: #0f172a;
}

/* ===== Hero brand showcase (logo + team photo look premium) ===== */
.ld-hero-frame {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, .15), 0 0 0 1px rgba(37, 99, 235, .1);
}
.ld-hero-frame img,
.ld-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
}
.ld-theme-soft_purple .ld-hero-frame {
  border-radius: 28px !important;
  max-width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  margin-left: 0 !important;
}
.ld-theme-soft_purple .ld-hero-frame img {
  min-height: 340px !important;
  height: 100% !important;
}

/* ===== Desktop header base ===== */
.topnews, .top-news {
  overflow: hidden !important;
}
.ai-topbar-flex {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
  min-height: 36px;
}
.ai-topbar-flex > div:first-child {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: hidden !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.ai-news-marquee-wrap,
.ai-news-marquee-wrap {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
}
.ai-top-buttons {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
}
.ai-header-single-line-flex {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 0 !important;
  position: relative !important;
  flex-wrap: nowrap !important;
}
.logo-container {
  flex: 0 0 auto !important;
  max-width: 180px;
}
.logo-container img {
  max-height: 48px !important;
  width: auto !important;
  display: block;
}
.ai-nav-single-line-pills {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 1 1 auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap !important;
  padding: 4px 0 !important;
}
.ai-nav-single-line-pills::-webkit-scrollbar { display: none; }
.ai-nav-pill-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  flex-shrink: 0 !important;
  text-decoration: none !important;
  line-height: 1.2 !important;
}
.thm-book-btn {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  padding: 10px 16px !important;
}
.nav-mobile-toggle {
  display: none !important;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  color: #0f172a !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  margin-left: auto !important;
  cursor: pointer !important;
  z-index: 6 !important;
  padding: 0 !important;
  line-height: 1 !important;
}
.thm-book-btn-mobile { display: none !important; }

/* Landing */
.ld-wrap { overflow-x: hidden; }
.ld-chart-box { position: relative; width: 100%; height: 220px; }

/* ========== TABLET ========== */
@media (max-width: 991px) {
  .ld-title, .ld-hero h1 { font-size: 30px !important; }
  .ld-hero-frame img { height: 260px !important; object-fit: cover; }
  .ai-news-marquee-wrap { max-width: 40%; }
}

/* ========== MOBILE — clean header ========== */
@media (max-width: 767px) {
  .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Top dark bar: hide ticker, keep compact action chips in ONE row */
  .topnews, .top-news {
    padding: 8px 0 !important;
  }
  .ai-topbar-flex {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    height: auto !important;
    min-height: 0 !important;
  }
  /* Hide news ticker completely on phones — keep only portal chips */
  .ai-topbar-flex > div:first-child {
    display: none !important;
  }
  .ai-news-marquee-wrap,
  .ai-topbar-flex marquee,
  .ai-topbar-flex .newscontent,
  .newstab {
    display: none !important;
  }
  .ai-top-buttons {
    flex: 1 1 auto !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ai-top-buttons::-webkit-scrollbar { display: none; }

  .btn-ai-modal-trigger,
  .ai-btn-portal,
  .ai-btn-portal-patient,
  .ai-btn-portal-staff {
    padding: 6px 10px !important;
    font-size: 10px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1.2 !important;
  }
  /* Short labels on very small screens via CSS content is hard;
     keep text but tighter spacing */

  /* Main header: logo LEFT + hamburger RIGHT only */
  .sticky-top2 header {
    padding: 0 !important;
  }
  .ai-header-single-line-flex {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 10px 0 !important;
    min-height: 56px;
  }
  .logo-container {
    max-width: calc(100% - 56px) !important;
    margin: 0 !important;
  }
  .logo-container img {
    max-height: 40px !important;
  }
  .nav-mobile-toggle {
    display: inline-flex !important;
    flex-shrink: 0 !important;
  }

  /* Hide desktop nav + book until menu opens */
  .ai-nav-single-line-pills {
    display: none !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: calc(100% + 4px) !important;
    z-index: 2000 !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16) !important;
    padding: 8px !important;
    margin: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    white-space: normal !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: 70vh !important;
    width: 100% !important;
    order: unset !important;
  }
  .ai-nav-single-line-pills.is-open {
    display: flex !important;
  }
  .ai-nav-pill-item {
    width: 100% !important;
    justify-content: flex-start !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font-size: 14px !important;
    white-space: normal !important;
  }
  .ai-nav-single-line-pills .dropdown {
    width: 100% !important;
    display: block !important;
  }
  .ai-nav-single-line-pills .dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100% !important;
    box-shadow: none !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 0 0 12px !important;
    background: transparent !important;
  }
  .thm-book-btn {
    display: none !important;
  }
  /* Remove top Book Appointment bar — hero image sits here instead */
  .thm-book-btn-mobile {
    display: none !important;
  }

  /* Landing: image stuck to TOP under header */
  .ld-wrap .ld-hero,
  .ld-hero {
    padding: 0 0 12px !important;
    margin-top: 0 !important;
  }
  .ld-wrap .ld-hero > .container,
  .ld-hero > .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 6px !important;
    margin-top: 0 !important;
  }
  .ld-hero-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 !important;
  }
  .ld-wrap .ld-hero-visual,
  .ld-hero-visual {
    display: block !important;
    width: 100% !important;
    order: -1 !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    float: none !important;
  }
  .ld-wrap .ld-hero-copy,
  .ld-hero-copy {
    width: 100% !important;
    order: 2 !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .ld-title, .ld-hero h1 { font-size: 24px !important; line-height: 1.25 !important; }
  .ld-sub { font-size: 14px !important; }
  .ld-cta-group a,
  .ld-cta-group .btn { width: 100%; text-align: center; justify-content: center; }

  /* Premium frame — flush near top */
  .ld-hero-frame {
    position: relative !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 2px solid #fff !important;
    box-shadow:
      0 0 0 1px rgba(37, 99, 235, .10),
      0 10px 28px rgba(15, 23, 42, .12) !important;
    aspect-ratio: 16 / 10 !important;
    height: auto !important;
    max-height: none !important;
    margin-top: 0 !important;
  }
  .ld-hero-frame::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 28%;
    background: linear-gradient(to top, rgba(15, 23, 42, .28), transparent);
    pointer-events: none;
    z-index: 1;
  }
  .ld-hero-frame img,
  .ld-hero-img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 220px !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center 28% !important; /* keep wall logo + faces visible */
    border-radius: 0 !important;
  }
  /* Never crop logo into a circle on mobile */
  .ld-theme-soft_purple .ld-hero-frame,
  .ld-wrap.ld-theme-soft_purple .ld-hero-frame {
    border-radius: 22px !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    aspect-ratio: 16 / 10 !important;
  }
  .ld-hero-fallback {
    display: flex !important;
    min-height: 210px !important;
    height: 100% !important;
    align-items: center;
    justify-content: center;
    font-size: 48px !important;
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  }
  .ld-module-card { min-height: 110px !important; margin-bottom: 10px; }
  .ld-module-card h4 { font-size: 12px !important; }
  .ld-chart-box { height: 200px; }
  /* Footer columns handled in dedicated footer block below */

  /* Forms */
  form .form-group .col-sm-2,
  form .form-group .col-sm-3,
  form .form-group .col-sm-4,
  form .form-group .col-sm-8,
  form .form-group .col-sm-9,
  form .form-group .col-sm-10,
  form .form-group .col-md-2,
  form .form-group .col-md-3,
  form .form-group .col-md-4,
  form .form-group .col-md-8,
  form .form-group .col-md-9,
  form .form-group .col-md-10 {
    width: 100%;
    float: none;
    display: block;
    text-align: left !important;
  }
  form .btn { margin-bottom: 8px; }
  table { display: block; width: 100%; overflow-x: auto; }

  .thm-page-banner { min-height: 140px; }
  .thm-page-banner-inner { padding: 28px 12px 24px; }
  .thm-page-banner-inner h1 { font-size: 24px; }
  .thm-page-banner-inner p { font-size: 13px; }
  .container.spacet50 form.appointment { padding: 16px 12px 8px; border-radius: 12px; }
}

@media (max-width: 480px) {
  .newstab span, .newstab {
    /* keep badge short */
  }
  .btn-ai-modal-trigger,
  .ai-btn-portal,
  .ai-btn-portal-patient,
  .ai-btn-portal-staff {
    padding: 6px 8px !important;
    font-size: 9px !important;
  }
  .ld-title, .ld-hero h1 { font-size: 22px !important; }
  .logo-container img { max-height: 34px !important; }
}

.btn-label-short { display: none; }
.btn-label-full { display: inline; }
@media (max-width: 767px) {
  .btn-label-full { display: none !important; }
  .btn-label-short { display: inline !important; }
  .sticky-top2 { position: sticky; top: 0; z-index: 1040; background: #fff; }
  .sticky-top2 header { position: relative; }

  /* Force hero IMAGE flush to top (beats theme_skin specificity) */
  .ld-wrap .ld-hero,
  section.ld-hero {
    padding-top: 0 !important;
    padding-bottom: 12px !important;
    margin-top: 0 !important;
  }
  .ld-wrap .ld-hero > .container {
    padding-top: 4px !important;
    margin-top: 0 !important;
  }
  .ld-wrap .ld-hero-visual,
  .ld-hero-visual {
    order: -1 !important;
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    padding-top: 0 !important;
  }
  .ld-wrap .ld-hero-copy {
    margin-top: 0 !important;
  }
}


/* =========================================================
   Footer — responsive (all themes)
   ========================================================= */
.ld-footer {
  overflow-x: hidden;
  width: 100%;
}
.ld-footer .container {
  width: 100%;
  max-width: 1170px;
  padding-left: 15px;
  padding-right: 15px;
}
.ld-footer-main {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}
.ld-footer-main > [class*="col-"] {
  float: none;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}
.ld-footer-col {
  margin-bottom: 28px;
  min-width: 0;
}
.ld-footer-brand h3 {
  font-size: 18px;
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.ld-footer-brand p {
  max-width: 100%;
  word-wrap: break-word;
}
.ld-footer-links a,
.ld-footer-contact strong {
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ld-footer-contact li {
  align-items: flex-start;
}
.ld-footer-contact i {
  flex-shrink: 0;
}
.ld-footer-copy {
  padding-left: 12px;
  padding-right: 12px;
}
.ld-footer-copy p {
  word-wrap: break-word;
  line-height: 1.5;
  padding: 0 4px;
}

/* Tablet: brand full width, then 3 equal columns */
@media (max-width: 991px) {
  .ld-footer {
    padding-top: 44px !important;
  }
  .ld-footer-brand {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 22px;
  }
  .ld-footer-links-col,
  .ld-footer-services-col,
  .ld-footer-contact-col {
    width: 33.333333% !important;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .ld-footer h4 {
    font-size: 15px;
    margin-bottom: 12px;
  }
  .ld-footer-links a {
    font-size: 12.5px;
  }
}

/* Mobile: single clean stack */
@media (max-width: 767px) {
  .ld-footer {
    padding-top: 36px !important;
  }
  .ld-footer-main {
    margin-left: 0;
    margin-right: 0;
  }
  .ld-footer-main > [class*="col-"],
  .ld-footer-brand,
  .ld-footer-links-col,
  .ld-footer-services-col,
  .ld-footer-contact-col {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 22px;
  }
  .ld-footer-col:last-child {
    margin-bottom: 8px;
  }
  .ld-footer-brand h3 {
    font-size: 17px;
  }
  .ld-footer-brand p {
    font-size: 13px;
    line-height: 1.65;
    margin-bottom: 14px;
  }
  .ld-footer h4 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .ld-footer-links li {
    margin-bottom: 8px;
  }
  .ld-footer-links a {
    font-size: 13.5px;
    padding: 4px 0;
    min-height: 36px;
  }
  .ld-footer-contact li {
    margin-bottom: 12px;
    gap: 10px;
  }
  .ld-footer-contact i {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
  .ld-footer-contact span {
    font-size: 10px;
  }
  .ld-footer-contact strong {
    font-size: 13px;
  }
  .ld-footer-social {
    justify-content: flex-start;
    gap: 8px;
  }
  .ld-footer-copy {
    margin-top: 20px !important;
    padding: 14px 12px !important;
  }
  .ld-footer-copy p {
    font-size: 12px;
    text-align: center;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .ld-footer .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .ld-footer-brand h3 {
    font-size: 16px;
  }
  .ld-footer-contact strong {
    font-size: 12.5px;
  }
}
