/* 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; }
}

/* 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;
}

/* 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. */
.template-root .btn,
.template-root .btn-2 {
  cursor: pointer;
  text-align: center;
  line-height: 1.5;
  vertical-align: middle;
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none;
}

/* 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;
}

/* Contact page body: vertical breathing room above and below the form.
   The .container inside uses main.css's display:flex, so we switch it to
   block so the .form__block stacks naturally and fills the full width. */
.template-root section.contact-page-body {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(4.5rem, 12vw, 9rem);
}

.template-root section.contact-page-body > .container {
  display: block;
}

.template-root section.contact-page-body .form__block {
  width: 100%;
  max-width: 570px;
  margin-left: auto;
  margin-right: auto;
}

.template-root section.contact-page-body .form__block-input {
  max-width: 100%;
  flex: 0 0 100%;
  box-sizing: border-box;
  width: 100%;
}

/* 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%;
  }
}

/* Home: emergency cards used h1 for styling; headings demoted to h3 for document outline */
.template-root .emergency-call__item > .content h3 {
  color: #333333;
  font-size: 21.5px;
  font-family: "Roboto Bold", sans-serif;
  font-weight: 700;
  margin: 0;
}

@media (max-width: 575px) {
  .template-root .emergency-call__item h3 {
    font-size: 20px;
  }
}

/* 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: template uses 160px vertical padding on department cards — tighten for Next layout */
.template-root section.services-index.departments-3 > .container > .departments-3__item-1 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (min-width: 1200px) {
  .template-root section.services-index.departments-3 > .container > .departments-3__item-1 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}
