/* Language switcher (top-right) */
body.viewer3d .lang-switcher {
  margin-left: auto; /* прижать вправо */
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Extra-small phones */
@media (max-width: 480px) {
  .quote-modal .quote-dialog {
    width: 92vw;
    border-radius: 12px;
    padding: 16px 16px 14px;
    max-height: calc(100vh - 24px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 auto; /* устранить возможные смещения от внешних margin */
    right: auto; /* сбросить right, если он где-то задан */
    box-sizing: border-box;
  }
  .quote-modal h3#quote-title { font-size: 22px; line-height: 1.2; }
  .quote-modal .btn { min-height: 48px; }
  .quote-modal input[type="text"],
  .quote-modal input[type="email"],
  .quote-modal input[type="tel"],
  .quote-modal input[type="date"],
  .quote-modal select,
  .quote-modal textarea {
    font-size: 16px; /* предотвратить авто‑зум в iOS */
    padding: 14px 16px;
  }
}

/* Safe area padding for iOS */
@supports (padding: max(0px)) {
  .quote-modal .quote-dialog { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}
body.viewer3d .lang-switcher a,
body.viewer3d .lang-switcher .sep {
  color: #e5e7eb;
  text-decoration: none;
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
}
body.viewer3d .lang-switcher a {
  padding: 6px 8px;
  border-radius: 8px;
  transition: color .2s ease, background-color .2s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1;
}
body.viewer3d .lang-switcher a:hover,
body.viewer3d .lang-switcher a.active,
body.viewer3d .lang-switcher a[aria-current="true"] {
  background-color: #ffd21f;
  color: #0b0b0b;
}
body.viewer3d .lang-switcher a .label { font-size: 13px; font-weight: 600; }
body.viewer3d .lang-switcher a .flag { font-size: 12px; opacity: .95; transform: translateY(1px); }
body.viewer3d .lang-switcher .sep { opacity: .5; padding: 0 2px; }

/* Use PNG flags from flagcdn for broad compatibility */
body.viewer3d .lang-switcher a .flag-img {
  width: 20px;
  height: 14px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.25);
}
body.viewer3d .lang-switcher a[data-lang="fr"] .flag-img { background-image: url("https://flagcdn.com/w20/fr.png"); }
body.viewer3d .lang-switcher a[data-lang="en"] .flag-img { background-image: url("https://flagcdn.com/w20/gb.png"); }
body.viewer3d .lang-switcher a[data-lang="ru"] .flag-img { background-image: url("https://flagcdn.com/w20/ru.png"); }
body.viewer3d .lang-switcher a[data-lang="ua"] .flag-img { background-image: url("https://flagcdn.com/w20/ua.png"); }
/* =========================
   3D Viewer (index2.html)
   Scoped under body.viewer3d to avoid affecting other pages
   ========================= */
html,
body.viewer3d {
  height: 100%;
}
html { 
  scroll-behavior: smooth; 
  overflow-x: hidden; /* предотвращаем горизонтальный скролл */
}
body.viewer3d {
  margin: 0;
  background: #000; /* чистый фон без градиентов */
  color: #e5e7eb;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */
  scroll-padding-top: 72px; /* отступ для фиксированного хедера */
}
/* Header (fixed over video) */
body.viewer3d .site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  /* Убрали backdrop-filter: дорогой при скролле поверх видео */
  background: rgba(10, 10, 10, 0.6);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transform: translateZ(0);                   /* GPU слой для фиксированного хедера */
}
body.viewer3d .site-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
}
body.viewer3d .site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
body.viewer3d .site-header .logo {
  width: 40px;
  height: 40px;
  border-radius: 50%; /* круглое лого */
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
body.viewer3d .site-header .brand-name {
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 14px;
}
body.viewer3d .main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 18px;
}
body.viewer3d .main-nav a {
  display: inline-block;
  padding: 8px 10px;
  color: #e5e7eb;
  text-decoration: none;
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;   /* было 14px */
  font-weight: 600;  /* чуть жирнее для выразительности */
  border-radius: 8px;
  transition: color .2s ease, background-color .2s ease, filter .2s ease;
}
body.viewer3d .main-nav a:hover {
  background-color: #ffd21f;
  color: #0b0b0b;
}
body.viewer3d .main-nav a.active,
body.viewer3d .main-nav a[aria-current="page"] {
  background-color: #ffd21f;
  color: #0b0b0b;
}
@media (max-width: 720px) {
  body.viewer3d .site-header .container {
    gap: 10px;
  }
  body.viewer3d .site-header .brand-name {
    display: none; /* экономим место на мобильных */
  }
  body.viewer3d .main-nav ul {
    gap: 10px;
  }
  body.viewer3d .site-header .logo {
    width: 34px; height: 34px;
  }
}
body.viewer3d .wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
}
body.viewer3d #stage {
  position: relative;     /* обычная секция героя */
  width: 100vw;           /* полная ширина */
  height: 100vh;          /* полная высота экрана */
  overflow: hidden;
  border-radius: 0;       /* без скруглений на фулскрине */
  background: none;       /* фон задаётся видео внутри #stage */
  box-shadow: none;
}

/* Легкая виньетка снизу/по краям, чтобы модель выделялась на дороге */
body.viewer3d #stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none; /* убрать виньетку */
  pointer-events: none;
}

/* Лёгкое свечение неба сверху для глубины */
body.viewer3d #stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: none; /* убрать верхний градиент */
  pointer-events: none;
}
body.viewer3d canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1; /* поверх видео */
}

/* Видео-фон внутри сцены */
body.viewer3d #stage .bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;               /* заполнить весь экран */
  object-position: center 80%;     /* смещение к дороге, если нужно */
  z-index: 0;
  pointer-events: none;           /* чтобы не блокировало взаимодействие */
}

/* --- Split layout --- */
body.viewer3d #stage .hero-left {
  position: absolute;
  top: 0; left: 0;
  width: 40vw; height: 100vh;
  z-index: 2; /* над видео */
  display: flex;              /* вертикальное центрирование лого */
  flex-direction: column;     /* лого сверху, кнопка ниже */
  align-items: center;        /* центр по горизонтали */
  justify-content: center;    /* центр по вертикали */
  gap: 0;                     /* отступ зададим у кнопки */
  padding: 0 24px 24px;       /* максимально подняли */
  box-sizing: border-box;
}
body.viewer3d #stage #viewport {
  position: absolute;
  top: 0; right: 0;
  width: 60vw; height: 100vh;
  z-index: 1; /* под шапкой, над видео */
}

/* Hero content */
body.viewer3d .hero-left .hero-logo {
  width: min(320px, 52%);
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
  display: block;
  margin-top: 0;         /* центрируем без дополнительного сдвига */
}
body.viewer3d .hero-left .btn.cta {
  margin-top: 20px; /* чуть ниже логотипа */
}

/* Global CTA button style (used in hero and sections) */
.btn.cta {
  display: inline-block;
  padding: 14px 24px;
  font-weight: 700;
  letter-spacing: .04em;
  font-size: 16px;
  text-decoration: none;
  color: #0b0b0b;
  background: #ffd21f; /* единый жёлтый */
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease, filter .15s ease;
}
.btn.cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  background-color: #ffc400; /* чуть темнее на hover */
  box-shadow: 0 12px 30px rgba(0,0,0,.26);
}
.btn.cta:active { transform: translateY(0); filter: brightness(0.98); }

/* Contact info between logo and button печать */
body.viewer3d #slogan {
  position: absolute;
  left: 40vw; right: 0; bottom: 24px;
  margin: 0 auto;
  max-width: 60vw;
  padding: 10px 14px;
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(12px, 1.1vw, 20px);
  line-height: 1.25;
  color: #ffd21f;
  text-align: center;
  letter-spacing: 0.15px;
  /* Упростили фон вместо прозрачного градиента над видео */
  background: rgba(0,0,0,0.35);
  border-radius: 12px;
  /* Чуть легче тень, чтобы уменьшить стоимость отрисовки */
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  z-index: 3; /* above #viewport (z-index:1) */
}

/* Scroll indicator (mouse) */
body.viewer3d .scroll-indicator {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  width: 24px; height: 40px;
  border: 2px solid rgba(255,255,255,0.95);
  border-radius: 14px;
  z-index: 20; /* above video, below header */
  opacity: 0.9;
  transition: opacity .35s ease, transform .35s ease;
}
body.viewer3d .scroll-indicator::before {
  content: "";
  position: absolute;
  top: 10px; left: 50%;
  width: 4px; height: 4px;
  background: #ffffff;
  border-radius: 50%;
  transform: translateX(-50%);
  animation: wheel 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.25));
}
@keyframes wheel {
  0% { transform: translate(-50%, 0); opacity: 1; }
  60% { transform: translate(-50%, 12px); opacity: .4; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}
/* Hide after the user scrolls */
body.viewer3d.scrolled .scroll-indicator,
body.scrolled .scroll-indicator {
  opacity: 0;
  transform: translate(-50%, 6px);
  pointer-events: none;
}
@media (max-width: 720px) {
  body.viewer3d .scroll-indicator { bottom: 12px; opacity: .85; }
}
body.viewer3d .hero-left .contact-info {
  margin-top: 14px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
body.viewer3d .hero-left .contact-info a {
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .02em;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 8px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  transition: background-color .2s ease, color .2s ease, transform .15s ease;
}
body.viewer3d .hero-left .contact-info a:hover {
  background: rgba(255,210,31,0.15);
  color: #fff;
  transform: translateY(-1px);
}
body.viewer3d .hero-left .contact-info .phone::before {
  content: "📞 ";
}
body.viewer3d .hero-left .contact-info .email::before {
  content: "✉️ ";
}

/* Ensure header overlays both panels */
body.viewer3d .site-header { z-index: 10; }

/* Responsive: stack on small screens */
@media (max-width: 900px) {
  body.viewer3d #stage .hero-left { width: 100vw; height: 40vh; padding-top: 240px; justify-content: center; padding-bottom: 0; position: relative; }
  /* Чуть ниже опускаем модель и уменьшаем её высоту */
  body.viewer3d #stage #viewport { top: 52vh; left: 0; right: 0; width: 100vw; height: 48vh; }
  body.viewer3d .hero-left .hero-logo { width: 42vw; max-width: 260px; }
  body.viewer3d .hero-left .contact-info { margin-top: 10px; gap: 6px; }
  body.viewer3d .hero-left .contact-info a { padding: 10px 14px; font-size: 18px; }
  /* Чуть выше поднимаем кнопку, чтобы не соприкасалась с моделью */
  body.viewer3d .hero-left .btn.cta { margin-top: 16px; position: static; left: auto; bottom: auto; transform: none; }
}

/* Very small screens */
@media (max-width: 480px) {
  /* Keep background video visible on mobile */
  body.viewer3d #stage .bg-video { display: block; }

  /* Larger tap targets but compact text */
  body.viewer3d .main-nav a { font-size: 15px; padding: 10px 12px; }
  body.viewer3d .lang-switcher a .label { font-size: 12px; }
  body.viewer3d .lang-switcher a .flag-img { width: 18px; height: 12px; }

  /* Lower entire hero block further on very small screens */
  body.viewer3d #stage .hero-left { padding-top: 260px; }
  /* Ещё ниже опускаем 3D viewport и чуть уменьшаем */
  body.viewer3d #stage #viewport { top: 58vh; height: 40vh; }

  /* Hero sizing */
  body.viewer3d .hero-left .hero-logo { width: 56vw; max-width: 220px; }
  body.viewer3d .hero-left .contact-info { margin-top: 8px; gap: 6px; }
  body.viewer3d .hero-left .contact-info a { padding: 12px 16px; font-size: 20px; }
  /* Ещё поднять кнопку для маленьких экранов */
  body.viewer3d .hero-left .btn.cta { width: min(260px, 80vw); text-align: center; margin-top: 10px; }
}

/* Respect reduced motion: remove background video */
@media (prefers-reduced-motion: reduce) {
  body.viewer3d #stage .bg-video { display: none; }
}

/* ---------------- Mobile hamburger menu ---------------- */
/* Button */
body.viewer3d .hamburger {
  display: none;
  margin-left: 8px;
  width: 40px; height: 36px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(20,20,20,0.5);
  border-radius: 8px;
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; /* stack bars vertically */
  gap: 4px;               /* spacing between bars */
}
body.viewer3d .hamburger span {
  display: block; width: 22px; height: 2px; background: #e5e7eb; border-radius: 2px;
}
body.viewer3d .hamburger span + span { margin-top: 0; }

@media (max-width: 900px) {
  body.viewer3d .hamburger { display: inline-flex; margin-left: auto; }
  /* Collapse primary nav to popup */
  body.viewer3d .main-nav { display: none; }
  body.viewer3d .main-nav ul { flex-direction: column; gap: 10px; }
  body.viewer3d .main-nav a { display: block; }

  /* Center language switcher (labels + flags) relative to screen */
  body.viewer3d .site-header .container { position: relative; }
  body.viewer3d .lang-switcher {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    margin: 0;
  }

  body.viewer3d.mobile-nav-open .main-nav {
    display: block;
    position: fixed;
    top: 60px; right: 12px; left: auto;
    background: rgba(15,15,15,0.95);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 10px;
    z-index: 20;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  }
}

/* --- Content sections below hero --- */
body.viewer3d #home,
body.viewer3d .site-section { scroll-margin-top: 72px; }

body.viewer3d .site-section {
  padding: 80px 20px;
  background: #0b0b0b;
  color: #e5e7eb;
  border-top: 1px solid rgba(255,255,255,0.06);
}
body.viewer3d .site-section:nth-of-type(even) { background: #111; }
body.viewer3d .section-container {
  max-width: 1100px;
  margin: 0 auto;
}
body.viewer3d .site-section h2 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 700;
  color: #ffd21f;
}
@media (max-width: 768px) { body.viewer3d .site-section h2 { text-align: center; } }
@media (max-width: 480px) { body.viewer3d .site-section h2 { text-align: center; } }
body.viewer3d .features {
  margin: 0; padding-left: 18px;
  display: grid; gap: 6px;
}

/* =========================
   Services card grid
   ========================= */
body.viewer3d .services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px; /* 1100px container -> (1100 - 3*24)/4 = 257px (целое), картинка не мылится */
  margin-top: 16px;
}
@media (max-width: 1100px) {
  body.viewer3d .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body.viewer3d .services-grid { grid-template-columns: 1fr; }
}

body.viewer3d .service-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 26px rgba(0,0,0,.26), inset 0 0 0 1px rgba(255,255,255,0.02);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  will-change: transform; /* GPU ускорение для анимаций */
}
body.viewer3d .service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,.32), inset 0 0 0 1px rgba(255,255,255,0.03);
  border-color: rgba(255,210,31,0.25);
}

body.viewer3d .service-media { position: relative; background: #0f0f10; aspect-ratio: 4 / 3; }
body.viewer3d .service-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block;
  image-rendering: auto;                      /* доверяем нативному алгоритму */
  transform: translateZ(0);                   /* GPU слой для плавности */
}

/* Только для 3-й карточки (img/5.png): увеличить высоту */
body.viewer3d .services-grid .service-card:nth-child(3) .service-media {
  height: 260px;              /* больше высота только для 3-й карточки */
  overflow: hidden;           
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
body.viewer3d .services-grid .service-card:nth-child(3) .service-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
  image-rendering: auto;                      /* четкое изображение как у остальных */
}

/* removed targeted overrides for 3rd card to keep all cards identical */

/* =========================
   Reviews Section Styles
   ========================= */

/* Add Review Button */
.add-review-section {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem 0;
}

.add-review-btn {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-review-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
  background: linear-gradient(135deg, #0056b3, #004085);
}

.add-review-btn .icon {
  font-size: 1.2em;
}
body.viewer3d .reviews-header {
  text-align: center;
  margin-bottom: 32px;
}

body.viewer3d .rating-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 32px;
  background: linear-gradient(180deg, rgba(255,210,31,0.12), rgba(255,210,31,0.06));
  border: 1px solid rgba(255,210,31,0.35);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}

body.viewer3d .rating-text {
  font-size: 24px;
  font-weight: 700;
  color: #ffd21f;
  letter-spacing: .08em;
}

body.viewer3d .stars {
  font-size: 20px;
  line-height: 1;
}

body.viewer3d .review-count {
  font-size: 14px;
  color: #e5e7eb;
  opacity: 0.9;
}

body.viewer3d .reviews-carousel {
  overflow: hidden;
  margin-top: 32px;
  position: relative;
}

body.viewer3d .reviews-track {
  display: flex;
  gap: 24px;
  /* управляемая скорость через CSS-переменную */
  animation-name: scroll-reviews;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  /* Медленнее в 10 раз от текущего: ~300s на десктопе */
  --scroll-duration: 1500s;
  animation-duration: var(--scroll-duration, 600s);
  will-change: transform;
  transition: transform .35s ease; /* smooth arrow navigation */
}

/* Hide mobile nav arrows by default (desktop) */
.reviews-nav { display: none; }

@keyframes scroll-reviews {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    /* Используем переменную для точного пиксельного смещения базы */
    transform: translate3d(calc(-1 * var(--scroll-distance, 50%)), 0, 0);
  }
}

body.viewer3d .reviews-track:hover {
  animation-play-state: paused;
}

body.viewer3d .review-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,.20), inset 0 0 0 1px rgba(255,255,255,0.02);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  will-change: transform;
  flex-shrink: 0;
  width: 380px;
  display: flex;
  gap: 16px;
}

body.viewer3d .review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,0.03);
  border-color: rgba(255,210,31,0.25);
}

body.viewer3d .reviewer-avatar {
  flex-shrink: 0;
}

body.viewer3d .reviewer-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,210,31,0.3);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

body.viewer3d .review-content {
  flex: 1;
  min-width: 0;
}

body.viewer3d .review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

body.viewer3d .reviewer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.viewer3d .reviewer-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffd21f;
}

body.viewer3d .review-date {
  font-size: 12px;
  color: #b8b9bb;
  opacity: 0.8;
}

body.viewer3d .review-stars {
  font-size: 16px;
  line-height: 1;
  color: #ffd21f; /* gold like other stars */
  letter-spacing: 1px; /* match visual spacing */
}

body.viewer3d .review-text {
  margin: 0;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.5;
}

/* Reviews tools (export/import/reset) */
.reviews-tools {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.reviews-tool-btn {
  background: #1a1a1c;
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .15s ease, border-color .2s ease;
}
.reviews-tool-btn:hover {
  background: rgba(255,210,31,0.15);
  color: #fff;
  transform: translateY(-1px);
  border-color: rgba(255,210,31,0.35);
}
.btn-danger { border-color: rgba(255,93,93,0.4); color: #ffd0d0; }
.btn-danger:hover { background: rgba(255,93,93,0.18); color: #fff; border-color: rgba(255,93,93,0.6); }

@media (max-width: 768px) {
  body.viewer3d .review-card {
    width: 320px;
  }
  
  body.viewer3d .rating-badge {
    padding: 16px 24px;
  }
  
  body.viewer3d .rating-text {
    font-size: 20px;
  }
  
  body.viewer3d .reviews-track {
    /* мобильная скорость: 1500s как на десктопе */
    --scroll-duration: 1500s;
  }
}

/* =========================
   Mobile: manual swipe for reviews
   ========================= */
@media (max-width: 900px) {
  /* Arrow-based navigation, no horizontal swipe; allow vertical scrolling */
  body.viewer3d .reviews-carousel {
    overflow: hidden !important;
    touch-action: pan-y !important; /* vertical gestures pass through */
  }
  body.viewer3d .reviews-track {
    display: flex;
    gap: 16px;
    animation: none !important; /* disable auto-scroll */
    will-change: transform;
    padding: 4px 12px;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    position: relative;
    transform: translate3d(0,0,0); /* baseline for JS translateX */
  }
  body.viewer3d .review-card {
    flex: 0 0 auto;
    min-width: 280px;
    max-width: 320px;
  }

  /* Mobile arrow buttons */
  .reviews-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; /* larger tap target */
    height: 48px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: inline-flex !important; /* force visibility */
    align-items: center;
    justify-content: center;
    z-index: 1000; /* ensure on top of any overlays */
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    backdrop-filter: blur(2px);
    pointer-events: auto !important; /* ensure button captures taps */
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation; /* hint for iOS */
  }
  
  /* Hide arrows on iOS */
  html.ios-autoscroll .reviews-nav {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  .reviews-prev { left: 16px; }
  .reviews-next { right: 16px; }
  /* Mobile carousel fallback safeguards (before JS attaches) */
  .reviews-carousel { 
    overscroll-behavior-x: contain; /* reduce back-swipe/scroll chaining */
    touch-action: pan-y; /* prefer vertical scroll */
    overflow: hidden;
  }
  .reviews-track {
    will-change: transform;
  }
  /* iOS: keep arrows visible */
  /* Re-enable animation on iOS mobile despite generic mobile disabling it */
  html.ios-autoscroll body.viewer3d .reviews-track {
    animation-name: scroll-reviews !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
    animation-duration: 60s !important; /* Very fast auto-scroll for iOS */
    animation-play-state: running !important;
  }
}

/* Уважение prefers-reduced-motion: отключаем анимацию */
@media (prefers-reduced-motion: reduce) {
  .reviews-track { animation: none !important; }
}

/* Предотвращаем авто-зум на iOS при фокусе на инпутах: шрифт >=16px */
@media (max-width: 900px) {
  .contact-card.contact-form input,
  .contact-card.contact-form textarea,
  .contact-card.contact-form select,
  .contact-card.contact-form button,
  .quote-modal input,
  .quote-modal textarea,
  .quote-modal select,
  .quote-modal button {
    font-size: 16px !important;
    line-height: 1.4;
  }
}

body.viewer3d .service-title {
  margin: 12px 12px 6px;
  color: #ffd21f;
  font-size: 20px;
  font-weight: 700;
}
body.viewer3d .service-text {
  margin: 0 12px 16px;
  color: #e5e7eb;
  font-size: 16px;
  line-height: 1.6;
}

/* =========================
   About Us enhanced layout
   ========================= */
body.viewer3d .about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  align-items: stretch;
}
@media (max-width: 900px) {
  body.viewer3d .about-grid { grid-template-columns: 1fr; }
}

body.viewer3d .about-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,0.02);
}
@media (max-width: 600px) {
  body.viewer3d .about-card { grid-template-columns: 1fr; text-align: center; }
}

body.viewer3d .about-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}
body.viewer3d .about-photo img {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,210,31,0.6);
  box-shadow: 0 14px 36px rgba(0,0,0,.35);
}
@media (max-width: 600px) {
  body.viewer3d .about-photo img { width: 140px; height: 140px; }
}

body.viewer3d .about-content { align-self: center; }
body.viewer3d .about-subtitle {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #ffd21f;
}
body.viewer3d .about-text {
  margin: 0 0 10px;
  color: #e5e7eb;
  line-height: 1.6;
}
body.viewer3d .about-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid; gap: 6px;
}

body.viewer3d .about-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
body.viewer3d .about-badges .badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,210,31,0.35);
  background: rgba(255,210,31,0.12);
  color: #ffd21f;
  font-weight: 600;
  letter-spacing: .02em;
}

/* =========================
   Contact section (3 columns)
   ========================= */
body.viewer3d .contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.1fr;
  gap: 24px;
  margin-top: 16px;
}
@media (max-width: 1024px) { body.viewer3d .contact-grid { grid-template-columns: 1fr; } }

body.viewer3d .contact-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(0,0,0,.26), inset 0 0 0 1px rgba(255,255,255,0.02);
}
body.viewer3d .contact-subtitle { margin: 0 0 10px; color: #ffd21f; font-size: 20px; font-weight: 700; }

body.viewer3d .contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
body.viewer3d .contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; }
body.viewer3d .contact-list .label { color: #b8b9bb; font-weight: 600; }
body.viewer3d .contact-list .value { color: #e5e7eb; text-decoration: none; }
body.viewer3d .contact-list .value:hover { color: #fff; }
body.viewer3d .contact-list .work-hours .value { white-space: nowrap; }

body.viewer3d .contact-card.contact-info { display: flex; flex-direction: column; min-height: 350px; }
body.viewer3d .contact-card.contact-info .contact-subtitle { margin-bottom: 14px; }
body.viewer3d .contact-card.contact-info .contact-list { display: flex; flex-direction: column; flex: 1 1 auto; justify-content: space-between; gap: 0; padding: 4px 0; }
body.viewer3d .contact-card.contact-info .contact-list li { align-items: center; padding: 12px 0; grid-template-columns: 28px 1fr; }
body.viewer3d .contact-card.contact-info .contact-list li + li { border-top: 1px solid rgba(255,255,255,0.06); }
/* Yellow badge labels */
/* Icon-only labels (yellow round icons) */
body.viewer3d .contact-card.contact-info .contact-list .label {
  position: relative;
  color: transparent; /* скрываем текст, оставляя для доступности */
}
body.viewer3d .contact-card.contact-info .contact-list .label::before {
  display: inline-block;
  font-size: 20px;
  line-height: 1;
  color: #ffd21f; /* жёлтый символ без фона */
  text-shadow: 0 0 6px rgba(255,210,31,.35);
  vertical-align: middle;
  transform: translateY(5px); /* слегка ниже */
}
body.viewer3d .contact-card.contact-info .contact-list .label[data-i18n="contact.phone_label"]::before { content: "📞"; }
body.viewer3d .contact-card.contact-info .contact-list .label[data-i18n="contact.email_label"]::before { content: "✉️"; }
body.viewer3d .contact-card.contact-info .contact-list .label[data-i18n="contact.address_label"]::before { content: "📍"; }
body.viewer3d .contact-card.contact-info .contact-list .label[data-i18n="contact.hours_label"]::before { content: "⏰"; }
body.viewer3d .contact-card.contact-info .contact-list .value { color: #f1f3f5; font-weight: 600; }

body.viewer3d .map-embed { position: relative; width: 100%; height: 350px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08); }
body.viewer3d .map-embed iframe { width: 100%; height: 100%; border: 0; filter: saturate(0.9) contrast(1.05) brightness(0.95); }

/* Section CTA centered button */
.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

/* Contact form styles reuse modal styles where possible */
body.viewer3d #contact-form .form-row { margin-bottom: 12px; }
body.viewer3d #contact-form label { display: block; margin: 0 0 6px; color: #e5e7eb; font-weight: 600; font-size: 14px; }
body.viewer3d #contact-form input,
body.viewer3d #contact-form textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(255,210,31,0.35); background: #1c1c1f; color: #e5e7eb; outline: none;
}
body.viewer3d #contact-form textarea { resize: vertical; min-height: 110px; }
body.viewer3d #contact-form input:focus,
body.viewer3d #contact-form textarea:focus { border-color: #ffd21f; box-shadow: 0 0 0 3px rgba(255,210,31,0.12); }
body.viewer3d #contact-form .actions { display: flex; justify-content: flex-start; }
body.viewer3d #contact-form .btn.submit {
  background: #ffd21f;
  color: #151518;
  border: 1px solid rgba(255,210,31,0.9);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
body.viewer3d #contact-form .btn.submit:hover {
  background: #ffde58;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255,210,31,.25);
}
body.viewer3d #contact-form .btn.submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,210,31,.35);
}

/* =========================
   Quote Modal (Get Free Quote)
   ========================= */
body.modal-open { overflow: hidden; }

.quote-modal[aria-hidden="true"] { display: none; }
.quote-modal[aria-hidden="false"] { display: block; }

.quote-modal .quote-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(2px);
}

.quote-modal .quote-dialog {
  position: fixed; z-index: 1001;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin-left: auto;
  margin-right: auto;
  width: min(520px, 92vw);
  background: #0f0f10;
  border: 1px solid rgba(255,210,31,0.35);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,0.03);
  padding: 22px 22px 18px;
  box-sizing: border-box;
  max-height: min(680px, calc(100vh - 48px));
  height: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Убрать лишнее пустое пространство снизу модалки */
.quote-modal .quote-dialog { padding-bottom: 12px; }
.quote-modal .quote-dialog > *:last-child { margin-bottom: 0 !important; }
.quote-modal form { margin: 0; }
.quote-modal .actions { margin-top: 12px; margin-bottom: 0; }
.quote-modal .form-note { margin-top: 8px; min-height: 0; }
.quote-modal .form-note:empty { display: none; }

.quote-modal .quote-close {
  position: absolute; top: 10px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(30,30,30,0.7);
  color: #e5e7eb;
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
.quote-modal .quote-close:hover { background: rgba(255,210,31,0.15); color: #fff; }

.quote-modal h3#quote-title {
  margin: 0 0 12px;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #ffd21f;
}
.quote-modal .quote-dialog::before {
  content: "";
  display: block;
  height: 1px;
  margin: 8px 0 18px;
  background: linear-gradient(90deg, rgba(255,210,31,0.0), rgba(255,210,31,0.45), rgba(255,210,31,0.0));
}

.quote-modal .form-row { margin-bottom: 14px; }
.quote-modal .form-row label,
.quote-modal fieldset legend {
  display: block;
  margin: 0 0 6px;
  color: #e5e7eb;
  font-weight: 600;
  font-size: 14px;
}

.quote-modal input[type="text"],
.quote-modal input[type="email"],
.quote-modal input[type="tel"],
.quote-modal input[type="date"],
.quote-modal select {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,210,31,0.35);
  background: #1c1c1f;
  color: #e5e7eb;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.quote-modal select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 44px; /* space for arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffd21f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
/* Hide default arrow in old IE/Edge */
.quote-modal select::-ms-expand { display: none; }
.quote-modal input::placeholder { color: #b8b9bb; }
.quote-modal input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px; /* space for calendar icon */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffd21f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
/* Keep native picker clickable (WebKit) */
.quote-modal input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; }
.quote-modal input:focus,
.quote-modal select:focus { border-color: #ffd21f; box-shadow: 0 0 0 3px rgba(255,210,31,0.15); }
.quote-modal input.invalid,
.quote-modal select.invalid { border-color: #ff5d5d; box-shadow: 0 0 0 3px rgba(255,93,93,0.12); }

.quote-modal fieldset { border: none; padding: 0; margin: 0 0 8px; }
.quote-modal .bedrooms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quote-modal .bedrooms label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: #1a1a1c;
  border-radius: 10px;
  border: 1px solid rgba(255,210,31,0.25);
  cursor: pointer;
}
.quote-modal .bedrooms input[type="radio"] { accent-color: #ffd21f; }

.quote-modal .actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 10px; }
.quote-modal .btn.submit {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  background: #ffd21f; color: #0b0b0b;
  border: 1px solid rgba(0,0,0,0.1);
  font-weight: 700; letter-spacing: .04em;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.quote-modal .btn.submit:hover { transform: translateY(-1px); filter: brightness(1.02); box-shadow: 0 12px 30px rgba(0,0,0,.26); }
.quote-modal .btn.submit:active { transform: translateY(0); filter: brightness(0.98); }

/* Back button as secondary */
.quote-modal .btn.back-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: transparent; color: #e5e7eb;
  border: 1px solid rgba(0,0,0,0.1);
  font-weight: 600; font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quote-modal .form-note {
  margin-top: 8px;
  font-size: 14px;
  color: #888;
  text-align: center;
  min-height: 0;
}

/* Цвета статусов сообщения в модалке */
.quote-modal .form-note.success { color: #22c55e; } /* зелёный */
.quote-modal .form-note.error { color: #ff5d5d; }

/* Сообщение статуса для контактной формы */
.contact-note {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: #888;
}
.contact-note.success { color: #22c55e; }
.contact-note.error { color: #ff5d5d; }

/* Review Modal Styles */
.review-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.review-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.review-dialog {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.review-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.review-close:hover {
  background: #f0f0f0;
  color: #333;
}

.review-modal h3 {
  margin: 0 0 1.5rem 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
}

.review-modal .form-group {
  margin-bottom: 1.5rem;
}

.review-modal .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 500;
}

.review-modal .form-group input[type="text"],
.review-modal .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.review-modal .form-group input[type="text"]:focus,
.review-modal .form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.avatar-upload {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-upload input[type="file"] {
  display: none;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border: 2px dashed #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
}

.avatar-preview:hover {
  border-color: #007bff;
  background: #f8f9fa;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.upload-placeholder {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

.star-rating {
  display: flex;
  flex-direction: row;
  gap: 4px;
  justify-content: flex-start;
}

.star-rating input[type="radio"] {
  display: none;
}

.star-rating label {
  font-size: 2rem;
  color: #ddd !important;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.star-rating label:hover {
  color: #ffd700 !important;
  transform: scale(1.1);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-primary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-1px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .quote-modal .quote-dialog {
    margin: 20px;
    padding: 24px;
    max-height: calc(100vh - 40px);
  }
  
  .quote-modal .step-content {
    gap: 16px;
  }
  
  .quote-modal .form-row {
    flex-direction: column;
  }
  
  .quote-modal .form-group {
    margin-bottom: 16px;
  }
  
  .quote-modal .actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .quote-modal .btn {
    width: 100%;
    justify-content: center;
  }
  
  .review-dialog {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .star-rating label {
    font-size: 1.5rem;
  }
}

/* Toast notifications */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none; /* allow clicks through */
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 90vw;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0f5132;
  background: #d1e7dd; /* light green */
  border: 1px solid #95cfb9;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast-success {
  color: #0f5132;
  background: #d1e7dd;
  border-color: #95cfb9;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.hide {
  transform: translateY(-10px);
  opacity: 0;
}

@media (max-width: 480px) {
  #toast-container {
    left: 12px;
    right: 12px;
    top: 12px;
  }
  .toast {
    min-width: unset;
  }
}

/* =====================
   Footer
   ===================== */
body.viewer3d .site-footer {
  background: #0e0e10;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #bfc3c9;
}
body.viewer3d .site-footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
body.viewer3d .site-footer a { color: #ffd21f; text-decoration: none; }
body.viewer3d .site-footer a:hover { text-decoration: underline; }
body.viewer3d .site-footer .dev { color: #d3d6db; }

@media (max-width: 640px) {
  body.viewer3d .site-footer .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================
   Floating Social FAB
   ========================= */
.social-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 1200;
}
.social-fab .fab-toggle {
  width: 56px; height: 56px;
  border: none; border-radius: 50%;
  background: #8b5cf6; /* violet */
  color: #fff; font-size: 22px;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.social-fab .fab-toggle i { font-size: 22px; line-height: 1; }
.social-fab[aria-expanded="true"] .fab-toggle { filter: brightness(1.05); box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.social-fab .fab-toggle:active { transform: translateY(1px); }

.social-fab .fab-menu {
  list-style: none; margin: 0; padding: 0;
  position: absolute; right: 0; bottom: 68px; /* над кнопкой */
  display: grid; gap: 10px;
  pointer-events: none; /* скрыто по умолчанию */
}
.social-fab[aria-expanded="true"] .fab-menu { pointer-events: auto; }

.social-fab .fab-item {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; text-decoration: none;
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
  transform: translateY(10px) scale(.9);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease, box-shadow .2s ease, filter .2s ease;
}
.social-fab .fab-item i { font-size: 18px; line-height: 1; }
.social-fab[aria-expanded="true"] .fab-item { transform: translateY(0) scale(1); opacity: 1; }

/* stagger animation */
.social-fab .fab-menu li:nth-child(1) .fab-item { transition-delay: 0ms; }
.social-fab .fab-menu li:nth-child(2) .fab-item { transition-delay: 40ms; }
.social-fab .fab-menu li:nth-child(3) .fab-item { transition-delay: 80ms; }
.social-fab .fab-menu li:nth-child(4) .fab-item { transition-delay: 120ms; }
.social-fab .fab-menu li:nth-child(5) .fab-item { transition-delay: 160ms; }
.social-fab .fab-menu li:nth-child(6) .fab-item { transition-delay: 200ms; }

/* brand colors */
.social-fab .fab-item.wa { background: #25D366; }
.social-fab .fab-item.fb { background: #1877F2; }
.social-fab .fab-item.ig { background: radial-gradient(circle at 30% 110%, #feda75, #d62976 45%, #962fbf 60%, #4f5bd5); }
.social-fab .fab-item.tk { background: #000; }
.social-fab .fab-item.ph { background: #10b981; }
.social-fab .fab-item.em { background: #f59e0b; }
.social-fab .fab-item:hover { filter: brightness(1.07); box-shadow: 0 12px 22px rgba(0,0,0,.28); }

@media (max-width: 480px) {
  .social-fab .fab-toggle { width: 54px; height: 54px; font-size: 20px; }
  .social-fab .fab-item { width: 44px; height: 44px; }
}

/* Utility: visually hide content but keep it accessible for screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
