/* Сквозные элементы: шапка (sticky + blur) и подвал */

#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(
    135deg,
    rgba(201, 232, 240, 0.94) 0%,
    rgba(158, 212, 232, 0.92) 50%,
    rgba(126, 196, 220, 0.94) 100%
  );
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 24px rgba(42, 85, 128, 0.22);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

#site-header .site-logo-img {
  filter: contrast(1.08) saturate(1.05);
}

#site-header .main-menu.dropdown-menu > .menu-item > .menu-link {
  color: var(--brand-night);
}

#site-header .main-menu.dropdown-menu > .menu-item > .menu-link:hover,
#site-header .main-menu.dropdown-menu > .menu-item > .menu-link:focus-visible,
#site-header .main-menu.dropdown-menu > .menu-item.current-menu-item > .menu-link,
#site-header .main-menu.dropdown-menu > .menu-item.current_page_item > .menu-link {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.55);
}

#site-header .main-menu.dropdown-menu > .menu-item > .menu-link .text-wrap::after {
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--sunny-deep);
}

#site-header .header-cta-phone {
  color: var(--brand-night);
}

#site-header .hamburger-inner,
#site-header .hamburger-inner::before,
#site-header .hamburger-inner::after {
  background-color: var(--brand-night);
}

#site-header.is-scrolled {
  background: linear-gradient(
    135deg,
    rgba(142, 202, 230, 0.97) 0%,
    rgba(74, 155, 196, 0.95) 50%,
    rgba(42, 85, 128, 0.96) 100%
  );
  box-shadow: 0 8px 32px rgba(42, 85, 128, 0.35);
}

#site-header-inner {
  gap: 12px;
}

.header-cta {
  position: absolute;
  right: clamp(14px, 4vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: none;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

.header-cta-phone {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--header-text);
  text-decoration: none !important;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.header-cta-phone:hover {
  color: var(--brand-deep);
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1.15rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  color: var(--brand-night) !important;
  background: linear-gradient(180deg, var(--sunny) 0%, var(--sunny-mid) 100%);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(245, 184, 74, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 184, 74, 0.35);
}

@media (min-width: 768px) {
  .header-cta {
    display: flex;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    justify-self: end;
    align-self: center;
    grid-column: 3;
    z-index: 2;
  }
}

/* Мессенджеры — WhatsApp / Telegram */
.messenger-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.messenger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.65rem;
  padding: 0.4rem 0.95rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  text-decoration: none !important;
  color: #fff !important;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.messenger-btn svg {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.messenger-btn--wa {
  background: linear-gradient(180deg, #5bd066 0%, #25a838 100%);
  box-shadow: 0 4px 14px rgba(37, 168, 56, 0.35);
}

.messenger-btn--tg {
  background: linear-gradient(180deg, #5eb8f0 0%, #2aabee 100%);
  box-shadow: 0 4px 14px rgba(42, 171, 238, 0.35);
}

.messenger-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.messenger-bar--compact .messenger-btn {
  min-height: 2.4rem;
  padding: 0.35rem 0.65rem;
}

@media (min-width: 900px) {
  .messenger-bar--compact .messenger-btn span {
    display: inline;
  }
}

@media (max-width: 899px) {
  .messenger-bar--compact .messenger-btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .messenger-bar--compact .messenger-btn {
    width: 2.5rem;
    padding: 0.35rem;
  }
}

.header-cta-mobile-label {
  margin: 0;
  padding: 14px 22px 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.header-cta-mobile .messenger-bar {
  padding: 0 22px 0.65rem;
  gap: 0.65rem;
}

.header-cta-mobile .messenger-btn {
  flex: 1 1 calc(50% - 0.35rem);
  min-height: 3rem;
  font-size: 0.9rem;
}

.header-cta-mobile .header-cta-phone {
  display: block;
  padding: 0.85rem 22px 1.1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--brand-night) !important;
  text-decoration: none !important;
}

.footer-messengers {
  margin: 0 0 1rem;
}

.footer-messengers .messenger-btn {
  min-height: 2.75rem;
}

.main-menu.dropdown-menu > .menu-item > .menu-link {
  position: relative;
}

.main-menu.dropdown-menu > .menu-item > .menu-link .text-wrap {
  position: relative;
  display: inline-block;
}

.main-menu.dropdown-menu > .menu-item > .menu-link .text-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--header-hover);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.main-menu.dropdown-menu > .menu-item > .menu-link:hover .text-wrap::after,
.main-menu.dropdown-menu > .menu-item > .menu-link:focus-visible .text-wrap::after,
.main-menu.dropdown-menu > .menu-item.current-menu-item > .menu-link .text-wrap::after,
.main-menu.dropdown-menu > .menu-item.current_page_item > .menu-link .text-wrap::after {
  transform: scaleX(1);
}

@media (max-width: 767px) {
  .header-cta-mobile {
    display: block;
    padding: 14px 22px;
    border-top: 1px solid var(--cream-deep);
    background: var(--cream);
  }

  .header-cta-mobile .header-cta-btn {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* Подвал — тёмный, колонки */

#site-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: linear-gradient(165deg, #1e3a52 0%, #243f58 42%, #2a5580 100%);
  color: rgba(255, 255, 255, 0.88);
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 clamp(2rem, 4vw, 2.75rem);
}

#site-footer .footer-wave {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 2.5rem);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(14px, 4vw, 22px);
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .footer-grid {
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 2rem;
  }
}

.footer-col-brand .footer-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none !important;
  margin-bottom: 0.85rem;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 6px 22px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-col-brand .footer-logo:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.4) inset,
    0 10px 28px rgba(0, 0, 0, 0.28);
}

.footer-logo-img {
  display: block;
  width: auto;
  height: clamp(58px, 12vw, 84px);
  max-width: min(280px, 92vw);
  min-height: 52px;
  filter: contrast(1.1) saturate(1.08);
}

@media (min-width: 640px) {
  .footer-logo-img {
    height: 88px;
    max-width: 300px;
  }
}

.footer-col-brand p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  max-width: 22rem;
}

.footer-col-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.footer-nav-list,
.footer-contact-list,
.footer-legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav-list a,
.footer-contact-list a,
.footer-legal-list a {
  display: inline-block;
  padding: 0.28rem 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-nav-list a:hover,
.footer-contact-list a:hover,
.footer-legal-list a:hover {
  color: var(--sunny);
  transform: translateX(3px);
}

.footer-contact-list .footer-contact-phone {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  background: rgba(255, 229, 102, 0.2);
  border-color: rgba(255, 229, 102, 0.45);
  transform: translateY(-3px);
}

.footer-social svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.footer-bottom {
  max-width: var(--shell-max);
  margin: clamp(2rem, 4vw, 2.5rem) auto 0;
  padding: 1.25rem clamp(14px, 4vw, 22px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-bottom-copy {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom-pay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.footer-bottom-pay svg {
  max-height: 28px;
  width: auto;
  opacity: 0.85;
  filter: brightness(1.15);
}

.footer-bottom-yandex iframe {
  border: 0;
  border-radius: 8px;
  opacity: 0.95;
}

.footer-photo-credit {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-photo-credit a {
  color: rgba(184, 223, 242, 0.9);
  font-weight: 600;
}
