/* Critical UI: nav drawer, social icons, cookie, float button */

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(63, 53, 56, 0.45);
  z-index: 10040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100%;
  background: #FAF7F2;
  z-index: 10050;
  transform: translate3d(100%, 0, 0);
  transition: transform 0.3s ease, visibility 0.3s ease;
  padding: 1.25rem 1.4rem 2rem;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  visibility: hidden;
  pointer-events: none;
}

.nav-drawer.is-open {
  transform: translate3d(0, 0, 0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-drawer__close {
  width: 44px;
  height: 44px;
  border: 0;
  background: #E8DFD8;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #6B4E5C;
}

.nav-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-drawer__link {
  display: block;
  padding: 0.9rem 0.2rem;
  border-bottom: 1px solid rgba(201, 169, 154, 0.35);
  color: #3F3538;
  font-weight: 500;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s ease;
  transition-delay: calc(var(--i, 0) * 40ms);
}

.nav-drawer.is-open .nav-drawer__link {
  opacity: 1;
  transform: none;
}

.nav-drawer__cta {
  margin-top: auto;
}

body.nav-open {
  overflow: hidden;
}

.menu-toggle {
  position: relative;
  z-index: 10060;
  display: inline-flex !important;
}

/* Social icons — exactly 42px */
.social-icon,
.social-icon--lg,
.social-row--footer .social-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  display: inline-grid !important;
  place-items: center;
  background: #E8DFD8;
  color: #6B4E5C;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.social-icon svg,
.social-icon--lg svg {
  width: 22px !important;
  height: 22px !important;
}

.social-icon:hover,
.social-icon--lg:hover {
  background: #C9A99A;
  color: #fff;
  transform: translateY(-2px);
}

.site-footer .social-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #D4A574;
}

.site-footer .social-icon:hover {
  background: #D4A574;
  color: #fff;
}

.social-row--contacts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin: 1.25rem 0 1.5rem;
}

.social-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(201, 169, 154, 0.35);
  color: #3F3538;
  font-size: 0.85rem;
  font-weight: 600;
}

.contact-page {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.contact-phone {
  font-size: 1.15rem;
  margin: 0.5rem 0 0;
  color: #3F3538;
}

.contact-phone a {
  font-weight: 700;
  color: #6B4E5C;
}

.contact-phone span {
  margin-left: 0.35rem;
  font-weight: 500;
  color: #5A5A5A;
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 10070;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__inner {
  max-width: 920px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(201, 169, 154, 0.45);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  padding: 1.1rem 1.25rem;
  display: grid;
  gap: 1rem;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.float-social {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.float-social__btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  background: #C9A99A;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(107, 78, 92, 0.25);
}

.float-social__btn svg {
  width: 26px;
  height: 26px;
}

.float-social__panel {
  width: 200px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(201, 169, 154, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  padding: 0.45rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.float-social__panel.is-open {
  opacity: 1;
  transform: none;
}

.float-social__panel[hidden] {
  display: none !important;
}

.float-social__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 12px 16px;
  border-radius: 8px;
  color: #3F3538;
  font-weight: 500;
}

.float-social__item:hover {
  background: #E8DFD8;
  color: #6B4E5C;
}

.float-social__ico {
  width: 24px;
  height: 24px;
  color: #D4A574;
  display: grid;
  place-items: center;
}

.float-social__ico svg {
  width: 24px;
  height: 24px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li {
  margin-bottom: 0.55rem;
}

.brand--light {
  color: #fff;
}

.site-footer__top {
  margin-bottom: 2rem;
}

.catalog-search {
  display: flex;
  gap: 0.65rem;
  max-width: 600px;
  width: 100%;
  margin-bottom: 1rem;
}

.catalog-search input {
  flex: 1;
  border: 1px solid rgba(201, 169, 154, 0.55);
  border-radius: 8px;
  padding: 0.95rem 1rem;
  font: inherit;
  background: #fff;
}

.page-hero--legal {
  text-align: center;
}

.page-hero--legal h1 {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.legal-doc {
  max-width: 860px;
  line-height: 1.7;
  margin-inline: auto;
}

.legal-contacts {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(201, 169, 154, 0.35);
  border-radius: 12px;
  padding: 1rem 1.2rem;
}

.test-progress {
  height: 8px;
  background: #E8DFD8;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.test-progress__bar {
  height: 100%;
  width: 0;
  background: #C9A99A;
  transition: width 0.3s ease;
}

.test-options {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.test-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 169, 154, 0.45);
  background: #fff;
  cursor: pointer;
  min-height: 44px;
}

@media (max-width: 900px) {
  .contact-page {
    grid-template-columns: 1fr;
  }

  .social-row--contacts {
    grid-template-columns: 1fr 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn {
    width: 100%;
  }

  .float-social__panel {
    width: min(280px, calc(100vw - 2rem));
  }
}
