/* Site-specific enhancements. The original photos, colors and section layout remain intact. */
:root {
  --site-accent: #886a5f;
  --site-header-offset: 92px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--site-header-offset);
}

[hidden] {
  display: none !important;
}

section[id], .tab-pane[id], .doctor-profile[id] {
  scroll-margin-top: var(--site-header-offset);
}

img {
  max-width: 100%;
}

#header #logo img {
  width: auto;
  height: 28px;
  max-width: 100%;
}

/* Keep the original booking-button ratio when HTML reserves the source size. */
#company .company-box img {
  width: auto;
  height: 63px;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #695044 !important;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1100;
  transform: translateY(-150%);
  padding: 12px 20px;
  background: #fff;
  color: #222;
  border: 2px solid var(--site-accent);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only, .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Content is readable even when optional animation or JavaScript is unavailable. */
.wow, .animate-box, [data-aos] {
  visibility: visible !important;
  opacity: 1;
}

.tab-content > .tab-pane {
  display: block;
}

.tab-content > .tab-pane + .tab-pane:not([hidden]) {
  margin-top: 48px;
}

.site-ready .tab-content > .tab-pane {
  margin-top: 0;
}

/* Semantic heading changes must not change the original title appearance. */
.section-header :is(h1, h2, h3) {
  font-size: 2.286em;
  color: #111;
  text-transform: uppercase;
  text-align: center;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.section-header :is(h1, h2, h3)::before {
  content: "";
  position: absolute;
  display: block;
  width: 120px;
  height: 1px;
  background: #ddd;
  bottom: 1px;
  left: calc(50% - 60px);
}

.section-header :is(h1, h2, h3)::after {
  content: "";
  position: absolute;
  display: block;
  width: 40px;
  height: 3px;
  background: #8c6d60;
  bottom: 0;
  left: calc(50% - 20px);
}

.features .nav-link :is(h3, h4, span), .features .nav-link .tab-label {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}

.features .nav-link.active, .features .nav-link.active :is(h3, h4, span) {
  color: #fff;
}

.doctor-profile + .doctor-profile {
  margin-top: 64px;
}

.doctor-profile .about-descr ul {
  padding-left: 18px;
  list-style: disc;
}

.doctor-profile .about-descr ul li {
  font-size: 14px;
  line-height: 1.75;
  padding-bottom: 5px;
}

.doctor-profile .about-descr .p-heading {
  font-size: 28px;
  font-weight: 400;
}

#time .time-box :is(h3, h4, h5) {
  display: inline-block;
  width: 13%;
  font-size: 1.25rem;
}

#company .company-box .title, #contact .contact-box2 .title {
  font-size: 1.5rem;
}

.source-h4 { font-size: 1.5rem; }
.source-h5 { font-size: 1.25rem; }
.source-h6 { font-size: 1rem; }
.source-h3, .source-h4, .source-h5, .source-h6 {
  margin-top: 0;
  margin-bottom: .5rem;
}

/* Promoting an original paragraph to a heading must not make it bolder or tighter. */
.source-p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 400;
  color: #444;
  line-height: 1.5;
  letter-spacing: inherit;
}

#map {
  min-height: 320px;
  display: flex;
  align-items: stretch;
}

.map-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 320px;
  padding: 32px 24px;
  text-align: center;
  background: #efebe6;
  border: 1px solid #ded5cb;
}

.map-fallback h3 { margin-bottom: 16px; font-size: 23px; }
.map-fallback p { max-width: 360px; line-height: 1.7; }
.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  background: #886a5f;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
}
.map-link:hover, .map-link:focus { color: #fff; background: #71564c; }

/* The carousel uses the existing four image backgrounds without third-party scripts. */
#intro .carousel-inner {
  position: relative;
}

#intro .carousel-item.active {
  display: block;
  opacity: 1;
  animation: site-slide-in 450ms ease;
}

#intro .carousel-control-prev, #intro .carousel-control-next {
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
  min-width: 44px;
  padding: 0;
}

.site-chevron {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.site-chevron--previous {
  transform: rotate(-135deg);
}

#intro .site-chevron {
  width: 21px;
  height: 21px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .65));
}

#intro .carousel-indicators {
  align-items: center;
  gap: 2px;
  margin-bottom: 15px;
  z-index: 4;
}

#intro .carousel-indicators li {
  width: auto;
  height: auto;
  margin: 0;
  text-indent: 0;
  background: transparent;
}

#intro .carousel-indicators li::before, #intro .carousel-indicators li::after {
  display: none;
}

.hero-dot {
  width: 34px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.hero-dot::after {
  content: "";
  width: 24px;
  height: 3px;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

.hero-dot[aria-current="true"]::after {
  background: #fff;
}

.hero-pause {
  position: absolute;
  right: 18px;
  bottom: 17px;
  z-index: 5;
  padding: 10px 13px;
  min-height: 44px;
  color: #fff;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

@keyframes site-slide-in {
  from { opacity: .3; }
  to { opacity: 1; }
}

/* Native horizontal scrolling keeps touch/swipe functional without Owl Carousel. */
#gallery .gallery-carousel {
  --gallery-columns: 2;
  display: flex;
  gap: 4px;
  width: 100%;
  margin-top: 30px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

#gallery .gallery-carousel > * {
  flex: 0 0 calc((100% - (var(--gallery-columns) - 1) * 4px) / var(--gallery-columns));
  min-width: 0;
  scroll-snap-align: start;
}

#gallery .gallery-carousel img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery-controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}

.gallery-control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d4c8c1;
  border-radius: 50%;
  background: #fff;
  color: #695044;
  cursor: pointer;
}

.gallery-control:hover {
  background: #f3efec;
}

.gallery-counter {
  min-width: 76px;
  text-align: center;
  font-size: 14px;
  color: #444;
  font-variant-numeric: tabular-nums;
}

.back-to-top.is-visible {
  display: grid;
  place-items: center;
}

.back-to-top .site-chevron {
  transform: rotate(-45deg) translate(-2px, 2px);
  width: 11px;
  height: 11px;
}

/* The closed mobile menu is hidden and inert, not merely moved off screen. */
#mobile-nav-toggle {
  z-index: 1002;
  width: 44px;
  height: 44px;
  margin: 16px 16px 0 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: #333;
  background: rgba(255, 255, 255, .86);
  border-radius: 4px;
}

.menu-symbol, .menu-symbol::before, .menu-symbol::after {
  display: block;
  width: 23px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.menu-symbol::before, .menu-symbol::after {
  content: "";
  position: absolute;
}

.menu-symbol::before { top: -7px; }
.menu-symbol::after { top: 7px; }

[aria-expanded="true"] .menu-symbol { background: transparent; }
[aria-expanded="true"] .menu-symbol::before { top: 0; transform: rotate(45deg); }
[aria-expanded="true"] .menu-symbol::after { top: 0; transform: rotate(-45deg); }

#mobile-nav {
  z-index: 1001;
  left: 0;
  width: min(300px, 80vw);
  padding-top: 26px;
  background: #f4f1ed;
  box-shadow: 10px 0 40px rgba(0, 0, 0, .14);
  transition: none;
}

#mobile-nav ul li a {
  min-height: 48px;
  padding: 14px 24px;
  font-size: 16px;
}

#mobile-body-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .3);
}

@media (max-width: 991px) {
  .site-ready #nav-menu-container { display: none; }
  #mobile-nav-toggle { display: flex; }
  html:not(.site-ready) #header { position: relative; height: auto; background: #f4f1ed; }
  html:not(.site-ready) #header .container-fluid { display: flex; flex-wrap: wrap; gap: 18px; }
  html:not(.site-ready) #nav-menu-container { display: block; float: none; }
  html:not(.site-ready) .nav-menu { display: flex; flex-wrap: wrap; }
  html:not(.site-ready) .nav-menu > li { float: none; margin: 0 10px 0 0; }

  .doctor-profile .div-img-bg .about-img img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    margin: 0 auto;
  }

  .doctor-profile .about-descr .separator { max-width: none; }
}

@media (max-width: 768px) {
  :root { --site-header-offset: 80px; }

  #intro {
    display: block;
    height: auto;
    background: #ede9e1;
  }

  #intro .carousel-item {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 2133;
  }

  #intro .intro {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }

  #intro .site-chevron { width: 14px; height: 14px; }
  #intro .carousel-indicators { margin-bottom: 6px; }
  .hero-pause { bottom: 8px; right: 9px; padding: 8px 10px; }
  #gallery .gallery-carousel { --gallery-columns: 1; }
  .features .nav-link { min-height: 70px; padding: 12px 6px; }
  .features .nav-link :is(h3, h4, span), .features .nav-link .tab-label { font-size: 16px; text-align: center; padding: 0; }
  .doctor-profile .about-descr .p-heading { font-size: 25px; line-height: 1.45; }
  #time .time-box :is(h3, h4, h5) { display: block; width: 100%; }
  #map { height: auto !important; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #gallery .gallery-carousel { --gallery-columns: 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
