:root {
  --ink: #10292d;
  --teal: #0f7473;
  --teal-dark: #08373b;
  --cream: #f7f6f1;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink);
  font-family: "Noto Sans Georgian", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  /* fallback ძველი ბრაუზერებისთვის — sticky მათზე არ იმუშავებს, სამაგიეროდ
     ჰორიზონტალური სქროლი არ გაჩნდება */
  overflow-x: hidden;
}

/* clip არ ქმნის სქროლ-კონტეინერს — ამიტომ position:sticky მუშაობს */
@supports (overflow: clip) {
  body {
    overflow-x: clip;
  }
}

/* ── მობილურზე ლოგო და მენიუს იკონი სქროლვისას ზემოთ რჩება ──
   header მთლიანად sticky-ა, topbar-ის სიმაღლით ზემოთ აწეული:
   topbar გადაიქროლებს, ლოგოს ზოლი კი ეკრანის თავზე ჩერდება.
   --topbar-h იზომება JS-ით, რადგან წარწერა შეიძლება ორ ხაზად გაიშალოს. */
@media (max-width: 767px) {
  [data-site-header] {
    position: sticky;
    top: calc(var(--topbar-h, 44px) * -1);
    z-index: 55;
  }
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

/* ── მობილურის ქვედა ნავიგაცია ──
   ოთხივე პუნქტი ვიზუალურად თანაბარია — გამოკვეთილი ღილაკის გარეშე */
.mobile-bottom-nav {
  border-top: 1px solid rgba(15, 116, 115, .1);
  box-shadow: 0 -6px 24px rgba(8, 55, 59, .07);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  position: fixed;
}

.mobile-bottom-nav .nav-tab {
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

/* აქტიური გვერდი — მხოლოდ თხელი ხაზი ზემოთ, ფონის ლაქის გარეშე */
.mobile-bottom-nav .nav-tab[aria-current="page"]::before {
  background: #0f7473;
  border-radius: 0 0 999px 999px;
  content: "";
  height: 2.5px;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 26px;
}

.mobile-bottom-nav .nav-tab:active {
  transform: scale(.94);
  transition: transform 120ms ease;
}

.service-card {
  min-width: 0;
}

.service-card::after {
  background: linear-gradient(90deg, #20aaa5, #73d4ce);
  bottom: 0;
  content: "";
  height: 3px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 280ms ease;
  width: 55%;
}

.service-card:hover::after,
.service-card:focus-visible::after {
  transform: translateX(-50%) scaleX(1);
}

::selection {
  background: #bce5e1;
  color: #05292d;
}

:focus-visible {
  outline: 3px solid #2dd4bf;
  outline-offset: 4px;
}

.skip-link {
  left: 1rem;
  position: fixed;
  top: -5rem;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  align-items: center;
  color: #0f7473;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 800;
  gap: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow::before {
  background: #1ca4a0;
  content: "";
  height: 2px;
  width: 2rem;
}

.hero-slide {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transform: scale(1.025);
  transition: opacity 850ms ease, transform 6500ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 1;
}

/* სლაიდერზე ტექსტი აღარ ჩანს — მხოლოდ ფოტოები */

@media (min-width: 1024px) {
  [data-slider] {
    background: #08373b;
    border: 0;
    border-radius: 0;
    box-shadow: 0 24px 65px rgba(8, 55, 59, .13);
    isolation: isolate;
    max-width: none;
    overflow: hidden;
    width: 100%;
  }

  [data-slider]::before {
    display: none;
  }

  .hero-slide .hero-media {
    border-radius: 0;
    box-shadow: none;
    height: 100%;
    inset: 0 auto 0 0;
    object-position: center;
    outline: 0;
    width: 100%;
  }

  .hero-controls {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 999px;
    bottom: 1.75rem;
    left: auto;
    padding: .5rem .55rem .5rem 1.1rem;
    right: 2.5rem;
    width: 13.5rem;
    z-index: 6;
  }

  .hero-controls .hero-dot {
    background: #bfd4d2;
  }

  .hero-controls .hero-dot[aria-current="true"] {
    background: #0f7473;
  }

  .hero-controls .hero-arrows button {
    background: #fff;
    border-color: #d7e7e5;
    box-shadow: 0 5px 16px rgba(8, 55, 59, .08);
    color: #0b5c5d;
    height: 2.6rem;
    width: 2.6rem;
  }

  .hero-controls .hero-arrows button:hover {
    background: #0f7473;
    color: #fff;
  }
}

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

.nav-dropdown {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  visibility: hidden;
}

.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

/* ── გალერეა მობილურზე: ჰორიზონტალური სქროლი ── */
@media (max-width: 639px) {
  .gallery-scroller {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-padding-left: 1rem;
    scrollbar-color: rgba(15, 116, 115, .35) transparent;
    scrollbar-width: thin;
  }

  .gallery-scroller::-webkit-scrollbar {
    height: 4px;
  }

  .gallery-scroller::-webkit-scrollbar-track {
    background: rgba(15, 116, 115, .08);
    border-radius: 999px;
    margin: 0 1rem;
  }

  .gallery-scroller::-webkit-scrollbar-thumb {
    background: rgba(15, 116, 115, .38);
    border-radius: 999px;
  }

  /* სქროლისას ანიმაცია არ უნდა შეაფერხოს ჩვენება */
  .gallery-scroller .reveal {
    opacity: 1;
    transform: none;
  }
}

.gallery-card img {
  transition: transform 650ms cubic-bezier(.2, .75, .25, 1), filter 300ms ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  filter: saturate(1.08);
  transform: scale(1.065);
}

.gallery-card .gallery-overlay {
  opacity: 0;
  transition: opacity 250ms ease;
}

.gallery-card:hover .gallery-overlay,
.gallery-card:focus-visible .gallery-overlay {
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.lightbox-panel {
  opacity: 0;
  transform: scale(.975);
  transition: opacity 220ms ease, transform 220ms ease;
}

#lightbox.is-visible .lightbox-panel {
  opacity: 1;
  transform: scale(1);
}

/* ექიმის ბიოგრაფია — ვიზუალური რედაქტორის შედეგის სტილიზაცია */
.doctor-bio ul {
  display: grid;
  gap: .75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.doctor-bio ol {
  display: grid;
  gap: .75rem;
  margin: 0;
  padding-left: 1.25rem;
}

.doctor-bio ul > li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .875rem;
  line-height: 1.75rem;
  color: #475569;
}

/* მობილურზე უფრო კომპაქტური ტიპოგრაფია */
@media (max-width: 639px) {
  .doctor-bio ul,
  .doctor-bio ol {
    gap: .55rem;
  }

  .doctor-bio ul > li,
  .doctor-bio ol > li,
  .doctor-bio p {
    font-size: .8125rem;
    line-height: 1.55rem;
  }

  .doctor-bio ul > li {
    gap: .6rem;
  }

  .doctor-bio ul > li::before {
    margin-top: .5rem;
  }

  .doctor-bio h3 {
    font-size: .9rem;
    margin: .9rem 0 .35rem;
  }
}

.doctor-bio ul > li::before {
  background: #14b8a6;
  border-radius: 999px;
  content: "";
  flex: none;
  height: .375rem;
  margin-top: .625rem;
  width: .375rem;
}

.doctor-bio ol > li {
  font-size: .875rem;
  line-height: 1.75rem;
  color: #475569;
}

.doctor-bio p {
  font-size: .875rem;
  line-height: 1.75rem;
  color: #475569;
  margin: .5rem 0;
}

.doctor-bio h3 {
  color: #0b5c5d;
  font-size: 1rem;
  font-weight: 800;
  margin: 1.25rem 0 .5rem;
}

.doctor-bio a {
  color: #0b5c5d;
  text-decoration: underline;
  text-decoration-color: #99f6e4;
  text-underline-offset: 2px;
}

.doctor-bio a:hover {
  color: #05292d;
}

.doctor-bio strong { font-weight: 800; color: #0f172a; }
.doctor-bio em { font-style: italic; }

.noise {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}

@media (max-width: 767px) {
  .reveal {
    transform: translateY(14px);
  }

  .eyebrow {
    letter-spacing: .1em;
  }
}

@media (max-width: 639px) {
  /* სლაიდერის წერტილებს დიდი შესახები არე, გარეგნობის შეცვლის გარეშე */
  .hero-dot {
    position: relative;
  }

  .hero-dot::after {
    content: "";
    inset: -14px -7px;
    position: absolute;
  }

  /* სათაურები მობილურზე — თანაბარი, დამშვიდებული სკალა */
  .eyebrow {
    font-size: .62rem;
    gap: .5rem;
  }

  .eyebrow::before {
    width: 1.35rem;
  }

  /* სერვისის ბარათის ქვედა აქცენტი მობილურზე ზედმეტია */
  .service-card::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
