/* Bootstrap .container replacement — main.css only adds flex layout; Bootstrap supplied
   the padding, centering, and responsive max-widths. Without this every section sits
   flush against the viewport edge. */
.template-root .container {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  box-sizing: border-box;
}

@media (min-width: 576px) {
  .template-root .container { max-width: 540px; }
}
@media (min-width: 768px) {
  .template-root .container { max-width: 720px; }
}
@media (min-width: 992px) {
  .template-root .container { max-width: 960px; }
}
@media (min-width: 1200px) {
  .template-root .container { max-width: 1140px; }
}

.template-root {
  overflow-x: clip;
  --section-y: clamp(3.25rem, 5.5vw, 5rem);
  --page-y: clamp(2.25rem, 4.5vw, 3.75rem);
  --about-overlay: 13.75rem;
}

@media (max-width: 1199px) {
  .template-root {
    --about-overlay: 3.25rem;
  }
}

@media (max-width: 991px) {
  .template-root {
    --about-overlay: 23.75rem;
  }
}

@media (max-width: 767px) {
  .template-root {
    --about-overlay: 23.125rem;
  }
}

@media (max-width: 575px) {
  .template-root {
    --about-overlay: 21.25rem;
  }
}

.template-root .site-footer > .container {
  display: block;
  min-width: 0;
}

.template-root .home-screening > .container,
.template-root .home-care-emergency > .container {
  display: block;
  min-width: 0;
}

.template-root .site-page-body > .container:not(.container_right-sidebar):not(.container_left-sidebar) {
  display: block;
  min-width: 0;
  padding-top: var(--page-y);
  padding-bottom: var(--page-y);
}

.template-root .site-page-body > .container.container_right-sidebar,
.template-root .site-page-body > .container.container_left-sidebar {
  padding-top: var(--page-y);
  padding-bottom: var(--page-y);
}

@media (max-width: 1200px) {
  .template-root .container_right-sidebar > .article,
  .template-root .container_left-sidebar > .article {
    margin-bottom: 2.5rem !important;
  }
}

/* After template main.css. Tailwind preflight sets img { max-width: 100% }, so logos
   in wide flex rows can blow up unless height/width are bounded. */
.template-root .header-top__logo,
.template-root .navbar-logo {
  flex-shrink: 0;
  line-height: 0;
}

.template-root .header-top__logo img,
.template-root .navbar-logo img {
  display: block;
  max-height: 36px;
  width: auto !important;
  max-width: min(132px, 34vw) !important;
  height: auto;
  object-fit: contain;
}

/* Legacy template footer (`.footer`) — current site uses `.site-footer` in SiteFooter.tsx */
.template-root .footer__logo img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-height: 48px;
  width: auto !important;
  max-width: min(176px, 52vw) !important;
  height: auto;
  object-fit: contain;
}

/* Inner page hero (header-bottom-4): SCSS omits position on .icon; anchor overlay so title
   and following sections are not covered. Keep hero below sticky chrome. */
.template-root .header-bottom-4 {
  isolation: isolate;
  z-index: 1;
}

.template-root .header-bottom-4__bg > .icon {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.template-root .header-bottom-4 > .container {
  z-index: 6;
}

.template-root .header-bottom-4 > .container > .section-title {
  overflow-wrap: break-word;
}

/* Campaign emails are landscape with copy on the left; zoom to the portrait. */
.template-root .header-bottom-4 > img.header-bottom-4__img--campaign {
  object-fit: cover;
  object-position: 100% 28%;
  width: 230%;
  max-width: none;
  left: auto;
  right: 0;
}

.template-root .departments-3 > .container > .departments-3__item-1 > .item > .img > img.campaign-card-img {
  object-position: top center;
}

@media (max-width: 575px) {
  .template-root .header-bottom-4 > .container > .section-title {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    line-height: 1.2;
  }
}

/* Contact (and similar) body: sit above hero stacking when needed */
.template-root .site-page-body {
  position: relative;
  z-index: 2;
  background-color: #ffffff;
}


/* Bootstrap reboot supplied cursor, line-height, text-align, and user-select for .btn;
   main.css does not. Without these buttons may render with misaligned text.
   Dialogs portal to document.body, so these cannot be scoped to .template-root. */
.btn,
.btn-2 {
  cursor: pointer;
  text-align: center;
  line-height: 1.5;
  vertical-align: middle;
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none;
}

/* Letter-spacing on .btn adds trailing space after the last glyph, so the
   label reads left of center. Match it on the leading side. */
.btn {
  text-indent: 3.1px;
}

/* Appointment dialog portals outside .template-root. Template padding +
   border-box also collapse the content box, so center with flex instead. */
.appointment-dialog-submit.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding-top: 0;
  padding-bottom: 0;
  text-indent: 0;
}

.appointment-dialog-submit.btn > span {
  padding-left: 3.1px;
}

.appointment-date-strip {
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.appointment-date-strip > button {
  scroll-snap-align: start;
}

/* Doctor cards: `.btn-2` hangs off the bottom. Template padding (15px) is shorter than
   the button after line-height 1.5, so it covers the specialty when hours are absent. */
.template-root .specialists__item > .inner-block,
.template-root .specialists-3__item > .inner-block {
  padding-bottom: 44px;
}

.template-root .specialists__item > .inner-block > .proffesia,
.template-root .specialists-3__item > .inner-block > .proffesia {
  padding-left: 12px;
  padding-right: 12px;
}

/* Bootstrap used to style `.breadcrumb` / `.breadcrumb-item`; replicate the essentials. */
.template-root .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.template-root .breadcrumb-item {
  display: flex;
  align-items: center;
}

.template-root .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  display: inline-block;
  padding: 0 0.5rem 0 0.35rem;
  color: #6c757d;
  font-weight: 400;
}

.template-root .breadcrumb-item a {
  text-decoration: none;
}

/* Template $section-space is 160px; unify live sections to --section-y.
   Specificity beats main.css media queries (0,1,0) without !important. */
/* Template centered `.services` with left:50% + translateX(-50%). Any transform
   (Framer Motion reveal, etc.) drops the X offset and the cards hang off the
   right edge while the rest of the page stays in the 1140px container. */
.template-root .services {
  left: 0;
  right: 0;
  width: 100%;
  transform: none;
}

/* Services carousel hangs below the home banner; screening is the next block. */
.template-root .home-screening {
  padding-top: calc(var(--about-overlay) + 2.5rem);
  padding-bottom: var(--section-y);
}

.template-root .about {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.template-root .why-choose-us,
.template-root .appointments,
.template-root .other-services,
.template-root .form,
.template-root .latest-news-4,
.template-root .about-4,
.template-root .medical-center-2 {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.template-root .form > .container {
  padding-bottom: 0;
}

.template-root .faq > .faq__content {
  padding: var(--section-y) clamp(1.25rem, 4vw, 4.375rem);
}

/* Home “How else can we help”: doctor art lives in `.form__bg` (absolute, wide). A flex row with `justify-content:
   flex-end` still lets the 570px form column start where the figure overlaps. Two-column grid: left track stays clear
   for the illustration; `.form__block` is forced into the right column only. */
.template-root section.form > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 570px);
  align-items: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.template-root section.form .form__block {
  grid-column: 2;
  margin-left: 0;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.template-root section.form .form__block > form {
  min-width: 0;
  max-width: 100%;
}

.template-root section.form .form__block textarea,
.template-root section.form .form__block-input {
  min-width: 0;
  max-width: min(276px, calc(50% - 10px));
  box-sizing: border-box;
}

.template-root section.form .form__block > form > textarea {
  max-width: 100% !important;
}

@media only screen and (max-width: 1199.98px) {
  .template-root section.form > .container {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
  }

  .template-root section.form .form__block {
    grid-column: auto;
    flex: 0 1 570px;
    max-width: min(570px, 100%);
  }
}

@media (max-width: 575px) {
  .template-root section.form .form__block textarea,
  .template-root section.form .form__block-input {
    max-width: 100%;
  }
}

/* Banner slide title is a <p> for heading outline; reset default paragraph margin */
.template-root .header-bottom__banner .slide-item__title {
  margin-top: 0;
  margin-bottom: 0;
}

/* FAQ accordion: keep chevron aligned to the right (works on /faqs without .faq__content; fixes long titles) */
.template-root .accardion__item-title.accardion__item-title--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.template-root .accardion__item-title.accardion__item-title--row .accardion__item-title__body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.template-root .faq__content .accardion__item-title.accardion__item-title--row .fa,
.template-root .accardion__item-title.accardion__item-title--row .fa {
  position: static;
  flex-shrink: 0;
  margin-top: 2px;
  top: auto;
  right: auto;
}

/* Service detail: template .faq__content is 50% for home FAQ + image split; use full width here */
.template-root .department-faq--fullwidth .faq__content {
  max-width: 100%;
  flex: none;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 0 40px;
}

@media (min-width: 768px) {
  .template-root .department-faq--fullwidth .faq__content {
    padding-top: 32px;
    padding-bottom: 48px;
  }
}

/* Services index: .site-page-body already provides --page-y; do not stack 160px item padding */
.template-root section.services-index.departments-3 > .container {
  display: block;
  min-width: 0;
}

.template-root section.services-index.departments-3 > .container > .departments-3__item-1 {
  padding-top: 0;
  padding-bottom: 0;
}

.template-root .departments-3 > .container > .departments-3__item-1 > .item > .content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.template-root .departments-3 > .container > .departments-3__item-1 > .item > .content > .departments-3__item-bg-text {
  max-width: calc(100% + 1rem);
  overflow: hidden;
  font-size: clamp(2.75rem, 5.5vw, 4.75rem);
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.template-root .departments-3 > .container > .departments-3__item-1 > .item > .content > .read-more-2 {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-top: auto;
  white-space: nowrap;
  letter-spacing: 0.18em;
}

.template-root section.services-index .my-pagination {
  width: 100%;
  flex-basis: 100%;
}

.template-root .about-4 img,
.template-root .medical-center-2 img,
.template-root .latest-news-4 img {
  max-width: 100%;
  height: auto;
}

.template-root .faqs .appointment-form input,
.template-root .faqs .appointment-form textarea,
.template-root .faqs .appointment-form button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.template-root .doctors-block {
  min-width: 0;
}

.template-root .doctors-block > .content {
  min-width: 0;
  overflow-x: auto;
}

.template-root .doctors-block table {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 767.98px) {
  .template-root .doctors > .container.container_right-sidebar > .article > .doctors-block {
    height: auto;
    flex-direction: column;
  }

  .template-root .doctors > .container.container_right-sidebar > .article > .doctors-block > .img {
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .template-root .doctors > .container.container_right-sidebar > .article > .doctors-block > .content {
    max-width: 100%;
    padding: 1.5rem 0 0;
  }
}

.template-root .contact.site-page-body iframe {
  max-width: 100%;
}
