/**
 * Header + hero slider
 */

.gd-header-wrap {
  position: relative;
  z-index: 5000;
  background: var(--gd-color-secondary);
  color: rgba(255, 255, 255, 0.86);
  overflow: visible;
}

/* Main brand row */
.gd-header-main {
  background: var(--gd-color-secondary);
  overflow: visible;
}

.gd-header-main__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: 0;
  padding-block: 0.45rem;
}

.gd-logo__link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--color-text);
}

.gd-logo__link--header {
 /*  background: #000; */
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(186, 167, 140, 0.35);
}

.gd-logo__link--header img,
.gd-logo img,
.gd-logo .custom-logo {
  height: 50px;
  width: auto;
  display: block;
}

.gd-logo__text {
  font-family: var(--font-cormorant);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gd-header-search {
  display: none;
}

.gd-header-contacts {
  flex: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.gd-header-contacts__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  padding: 0 0.9rem;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1.25;
  border-left: 1px solid rgba(186, 167, 140, 0.35);
}

.gd-header-contacts__item:first-child {
  border-left: 0;
  padding-left: 0;
}

.gd-header-contacts__item--address a {
  display: none;
}

.gd-header-contacts__label {
  display: block;
  font-family: var(--font-manrope);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gd-color-accent);
}

.gd-header-contacts__value {
  font-family: var(--font-manrope);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14rem;
}

.gd-header-contacts__item a {
  color: var(--gd-color-accent);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
}

.gd-header-contacts__item a:hover,
.gd-header-contacts__item:hover .gd-header-contacts__value {
  color: var(--gd-color-primary);
}

.gd-header-search__icon {
  color: #999;
  display: inline-flex;
}

.gd-header-search__icon .gd-icon {
  width: 16px;
  height: 16px;
}

.gd-header-search input[type="search"] {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.45rem 0;
  font-size: 0.875rem;
}

.gd-header-search input[type="search"]:focus {
  outline: none;
  box-shadow: none;
}

.gd-header-main__aside {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}

.gd-header-phone {
  position: relative;
}

.gd-header-phone summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-montserrat);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 0.35rem 0.15rem;
}

.gd-header-phone summary::-webkit-details-marker {
  display: none;
}

.gd-header-phone summary::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.4rem;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  vertical-align: middle;
}

.gd-header-phone__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 200px;
  background: #fff;
  border: 1px solid #ebebeb;
  box-shadow: var(--gd-shadow-medium);
  padding: 0.5rem 0;
  z-index: 6000;
}

.gd-header-phone__panel a {
  display: block;
  padding: 0.5rem 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
}

.gd-header-phone__panel a:hover {
  background: #f7f7f7;
}

.gd-header-callback {
  min-width: 0;
  white-space: nowrap;
  padding: 0.55rem 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.2;
}

.gd-header-callback.gd-btn--primary {
 /*  color: var(--gd-color-secondary); */
  color: #fff;
}

.gd-header-city {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--color-text);
  min-width: 44px;
}

.gd-header-city__icon .gd-icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
}

.gd-header-city__name {
  font-family: var(--font-montserrat);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gd-nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid rgba(186, 167, 140, 0.45);
  background: transparent;
  color: #fff;
  border-radius: 4px;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
}

.gd-nav-toggle__bars {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background-color var(--gd-transition);
}

.gd-nav-toggle__bars::before,
.gd-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform var(--gd-transition), top var(--gd-transition);
}

.gd-nav-toggle__bars::before { top: -6px; }
.gd-nav-toggle__bars::after { top: 6px; }

html.gd-nav-is-open .gd-nav-toggle__bars {
  background: transparent;
}

html.gd-nav-is-open .gd-nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

html.gd-nav-is-open .gd-nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.gd-primary-nav__mobile-meta {
  display: none;
}

/* Nav */
.gd-primary-nav {
  background: var(--gd-color-secondary);
  border-top: 1px solid rgba(186, 167, 140, 0.28);
  border-bottom: 1px solid rgba(186, 167, 140, 0.28);
  position: sticky;
  top: 0;
  z-index: 5001;
  overflow: visible;
}

.gd-primary-nav > .gd-container {
  overflow: visible;
  position: static;
}

.gd-primary-nav__list,
.gd-primary-nav > .gd-container > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.gd-primary-nav__list > li,
.gd-primary-nav > .gd-container > ul > li {
  position: relative;
}

.gd-primary-nav__list > li.gd-mega-menu,
.gd-primary-nav > .gd-container > ul > li.gd-mega-menu {
  position: static;
}

.gd-primary-nav__list > li > a,
.gd-primary-nav > .gd-container > ul > li > a {
  display: block;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-manrope);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.88);
  border-bottom: 2px solid transparent;
  transition: color var(--gd-transition), border-color var(--gd-transition);
}

.gd-primary-nav__list > li > a:hover,
.gd-primary-nav .current-menu-item > a,
.gd-primary-nav .current-menu-ancestor > a {
  color: #fff;
  border-bottom-color: var(--gd-color-primary);
}

.gd-primary-nav .sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 240px;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ebebeb;
  box-shadow: var(--gd-shadow-medium);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--gd-transition), transform var(--gd-transition), visibility var(--gd-transition);
  z-index: 6000;
}

.gd-primary-nav__list > li:hover > .sub-menu,
.gd-primary-nav__list > li:focus-within > .sub-menu,
.gd-primary-nav > .gd-container > ul > li:hover > .sub-menu,
.gd-primary-nav > .gd-container > ul > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gd-primary-nav .sub-menu a {
  display: block;
  padding: 0.55rem 1rem;
  font-family: var(--font-manrope);
  font-size: 0.875rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text);
  text-decoration: none;
  border: 0;
}

.gd-primary-nav .sub-menu a:hover {
  background: #f7f7f7;
  color: var(--gd-color-primary-dark);
}

/* Mega menu — services */
.gd-mega-menu {
  position: static;
}

.gd-mega-menu__panel.gd-service-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  width: 100%;
  max-width: none;
  min-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid rgba(186, 167, 140, 0.28);
  box-shadow: 0 28px 48px rgba(20, 24, 18, 0.28);
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity var(--gd-transition), transform var(--gd-transition), visibility var(--gd-transition);
  z-index: 6000;
  overflow: hidden;
  isolation: isolate;
}

.gd-mega-menu.is-open > .gd-service-menu,
.gd-mega-menu:hover > .gd-service-menu,
.gd-mega-menu:focus-within > .gd-service-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.gd-service-menu__inner {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 28rem;
  background: #fff;
}

.gd-service-menu__tabs {
  display: flex;
  flex-direction: column;
  background: var(--gd-color-secondary);
  padding: 1.1rem 0 1.25rem;
}

.gd-service-menu__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gd-service-menu__tab a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.15rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-manrope);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  border-left: 3px solid transparent;
  transition: background-color var(--gd-transition), border-color var(--gd-transition), color var(--gd-transition);
}

.gd-service-menu__tab.is-active a,
.gd-service-menu__tab a:hover {
  background: rgba(186, 167, 140, 0.14);
  border-left-color: var(--gd-color-primary);
  color: #fff;
}

.gd-service-menu__tab-icon {
  display: inline-flex;
  color: var(--gd-color-accent);
  flex-shrink: 0;
}

.gd-service-menu__tab-icon .gd-icon {
  width: 18px;
  height: 18px;
}

.gd-service-menu__all {
  margin: auto 1.15rem 0;
  padding-top: 1rem;
  font-family: var(--font-manrope);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gd-color-accent);
  border-top: 1px solid rgba(186, 167, 140, 0.28);
}

.gd-service-menu__all:hover {
  color: #fff;
}

.gd-service-menu__panels {
  position: relative;
  min-width: 0;
  background: #fff;
}

.gd-service-menu__panel {
  display: none;
  min-width: 0;
}

.gd-service-menu__panel.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  min-height: 28rem;
}

.gd-service-menu__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem 1.75rem 1.6rem;
}

.gd-service-menu__eyebrow {
  margin: 0 0 0.45rem;
  font-family: var(--font-manrope);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gd-color-primary-dark);
}

.gd-service-menu__head {
  margin-bottom: 1.15rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--gd-color-border);
}

.gd-service-menu__head a {
  font-family: var(--font-playfair);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: none;
  text-decoration: none;
  color: var(--gd-color-secondary);
}

.gd-service-menu__head a:hover {
  color: var(--gd-color-primary-dark);
}

.gd-service-menu__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15rem 1.75rem;
  flex: 1;
}

.gd-service-menu__links a {
  display: block;
  padding: 0.5rem 0;
  font-family: var(--font-manrope);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  color: var(--color-text);
  border: 0;
  text-transform: none;
  letter-spacing: 0;
}

.gd-service-menu__links a:hover {
  color: var(--gd-color-primary-dark);
  background: transparent;
}

.gd-service-menu__more {
  margin-top: 1.15rem;
  font-family: var(--font-manrope);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gd-color-primary-dark);
}

.gd-service-menu__more:hover {
  color: var(--gd-color-secondary);
}

.gd-service-menu__media {
  position: relative;
  z-index: 0;
  margin: 0;
  min-width: 0;
  min-height: 28rem;
  overflow: hidden;
  background: var(--gd-color-secondary);
}

.gd-service-menu__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ========== Hero accordion slider ========== */
.gd-hero {
  background: #fff;
  border-bottom: 1px solid #ebebeb;
  position: relative;
  z-index: 0;
}

.gd-hero__track {
  display: flex;
  min-height: clamp(420px, 62vh, 560px);
  width: 100%;
}

.gd-hero__panel {
  flex: 0.85 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  border-right: 1px solid #ebebeb;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: flex-grow 0.45s ease, background-color 0.35s ease;
}

.gd-hero__panel:last-child {
  border-right: 0;
}

.gd-hero__panel.is-active {
  flex: 2.6 1 0;
  background: var(--color-accent);
  cursor: default;
}

.gd-hero__content {
  padding: 2rem 1.35rem 1rem;
  position: relative;
  z-index: 1;
}

.gd-hero__title {
  font-family: var(--font-cormorant);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.8vw, 1.85rem);
  line-height: 1.15;
  color: var(--color-text);
  margin: 0 0 0.65rem;
}

.gd-hero__panel:not(.is-active) .gd-hero__title {
  font-size: clamp(0.95rem, 1.25vw, 1.15rem);
  max-width: 11rem;
}

.gd-hero__panel.is-active .gd-hero__title,
.gd-hero__panel.is-active .gd-hero__subtitle {
  color: #fff;
}

.gd-hero__subtitle {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: #666;
  max-width: 18rem;
}

.gd-hero__panel:not(.is-active) .gd-hero__subtitle,
.gd-hero__panel:not(.is-active) .gd-hero__cta {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

.gd-hero__panel.is-active .gd-hero__subtitle,
.gd-hero__panel.is-active .gd-hero__cta {
  opacity: 1;
  max-height: 8rem;
  pointer-events: auto;
  transition: opacity 0.35s ease;
}

.gd-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border: 1px solid #fff;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-manrope);
  font-weight: 600;
  font-size: 0.8125rem;
  background: transparent;
  transition: background-color var(--gd-transition), color var(--gd-transition);
}

.gd-hero__cta:hover {
  background: #fff;
  color: var(--color-text);
}

.gd-hero__media {
  position: relative;
  height: 48%;
  min-height: 180px;
  margin-top: auto;
}

.gd-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(
    0% 28%,
    6% 18%,
    14% 26%,
    22% 12%,
    32% 22%,
    42% 8%,
    52% 18%,
    62% 6%,
    72% 16%,
    82% 8%,
    92% 18%,
    100% 10%,
    100% 100%,
    0% 100%
  );
}

.gd-hero__wave {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.18) 100%);
  /* Organic top edge (tooth / cloud) */
  clip-path: polygon(
    0% 28%,
    6% 18%,
    14% 26%,
    22% 12%,
    32% 22%,
    42% 8%,
    52% 18%,
    62% 6%,
    72% 16%,
    82% 8%,
    92% 18%,
    100% 10%,
    100% 100%,
    0% 100%
  );
}

.gd-hero__panel--implantation .gd-hero__wave { background: linear-gradient(180deg, rgba(186, 167, 140, 0.2) 0%, rgba(0, 0, 0, 0.25) 100%); }
.gd-hero__panel--therapy .gd-hero__wave { background: linear-gradient(180deg, rgba(213, 216, 210, 0.15) 0%, rgba(0, 0, 0, 0.22) 100%); }
.gd-hero__panel--prosthetics .gd-hero__wave { background: linear-gradient(180deg, rgba(221, 212, 198, 0.15) 0%, rgba(0, 0, 0, 0.22) 100%); }
.gd-hero__panel--surgery .gd-hero__wave { background: linear-gradient(180deg, rgba(210, 208, 204, 0.15) 0%, rgba(0, 0, 0, 0.22) 100%); }

.gd-hero__panel.is-active .gd-hero__wave {
  background: linear-gradient(180deg, rgba(186, 167, 140, 0.12) 0%, rgba(0, 0, 0, 0.28) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .gd-hero__panel {
    transition: none;
  }
}
