/* ==========================================================================
   PRO.КВАДРАТ — Стили сайта (стиль Domeo / премиальный строительный дизайн)
   ========================================================================== */

:root {
  --color-primary: #ea580c;        /* Терракотово-оранжевый Domeo */
  --color-primary-hover: #c2410c;
  --color-primary-light: #ffedd5;
  --color-dark: #0f172a;           /* Глубокий графит */
  --color-dark-muted: #334155;
  --color-gray-light: #f8fafc;
  --color-gray-border: #e2e8f0;
  --color-accent: #f59e0b;         /* Золотистый/янтарный для звезд и бейджей */
  --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-orange: 0 8px 25px rgba(234, 88, 12, 0.28);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  color: var(--color-dark);
  background-color: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Плавный скролл */
html {
  scroll-behavior: smooth;
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

/* Акцентный текст */
.text-orange {
  color: var(--color-primary);
}

/* Кнопки */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-orange);
  text-decoration: none;
  font-size: 16px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.38);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #ffffff;
  color: var(--color-dark);
  border: 1.5px solid var(--color-gray-border);
  font-weight: 700;
  padding: 15px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  font-size: 15px;
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: #fffaf5;
}

/* Бейджи */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
  border-radius: 50px;
  border: 1px solid rgba(234, 88, 12, 0.2);
}

.badge-green {
  background: #dcfce7;
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.15);
}

/* ==========================================================================
   Слайдер До / После (Interactive Before / After)
   ========================================================================== */
.before-after-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 520px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  user-select: none;
  touch-action: pan-y;
  background-color: #0f172a;
}

.before-after-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.before-layer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  will-change: width;
}

.before-layer .before-after-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  left: 0;
  top: 0;
  min-width: 100%;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #ffffff;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 20;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 16px;
  border: 3px solid var(--color-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slider-handle:hover .slider-button,
.slider-handle:active .slider-button {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 22px rgba(234, 88, 12, 0.5);
}

.tag-label {
  position: absolute;
  bottom: 18px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  z-index: 10;
  color: #ffffff;
  pointer-events: none;
  transition: all 0.2s ease;
}

.tag-before {
  left: 18px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tag-after {
  right: 18px;
  background: rgba(234, 88, 12, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Адаптивность слайдера для планшетов и смартфонов */
@media (max-width: 640px) {
  .before-after-container {
    aspect-ratio: 4 / 3;
    max-height: 380px;
    border-radius: var(--radius-md);
  }
  .slider-button {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }
  .tag-label {
    font-size: 10px;
    padding: 4px 8px;
    letter-spacing: 0.02em;
  }
  .tag-before {
    top: 10px;
    bottom: auto;
    left: 10px;
  }
  .tag-after {
    bottom: 10px;
    top: auto;
    right: 10px;
  }
}

/* ==========================================================================
   Квиз-Калькулятор
   ========================================================================== */
.quiz-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.quiz-step-indicator {
  height: 6px;
  background: #f1f5f9;
  width: 100%;
  position: relative;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ea580c, #f97316);
  width: 20%;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option-card {
  border: 2px solid var(--color-gray-border);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  text-align: center;
}

.quiz-option-card:hover {
  border-color: #fdba74;
  background: #fffaf5;
  transform: translateY(-2px);
}

.quiz-option-card.active {
  border-color: var(--color-primary);
  background: #fff7ed;
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.15);
}

.quiz-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  transition: background 0.2s;
}

.quiz-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.4);
  transition: transform 0.15s ease;
}

.quiz-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.quiz-range-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.4);
}

/* ==========================================================================
   Модальные окна
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 36px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 640px) {
  .modal-dialog {
    padding: 24px 18px;
    border-radius: var(--radius-lg);
  }
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* ==========================================================================
   Мобильное выпадающее меню (Mobile Drawer)
   ========================================================================== */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 360px;
  height: 100%;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 9990;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 20px;
  overflow-y: auto;
}

.mobile-menu-drawer.active {
  right: 0;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9989;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Нижняя мобильная панель (Sticky Mobile Bar)
   ========================================================================== */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--color-gray-border);
  padding: 10px 14px;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  z-index: 900;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .mobile-sticky-bar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
  }
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Тост уведомления (Toast)
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #0f172a;
  color: #ffffff;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid var(--color-primary);
}

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

/* ==========================================================================
   FAQ Аккордеон
   ========================================================================== */
.faq-item {
  border-bottom: 1px solid var(--color-gray-border);
  transition: background-color 0.2s ease;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  cursor: pointer;
}

.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  font-weight: bold;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: #ffedd5;
  color: var(--color-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--color-dark-muted);
  font-size: 16px;
  line-height: 1.65;
}

.faq-answer-inner {
  padding-bottom: 22px;
}

/* Интерактивная карта */
#mogilev-map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius-lg);
  z-index: 1;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  #mogilev-map {
    height: 300px;
    border-radius: var(--radius-md);
  }
}

/* ==========================================================================
   СТИЛИ ДЛЯ ОНЛАЙН-КАЛЬКУЛЯТОРА ЦЕН (167 РАБОТ)
   ========================================================================== */

/* Убираем стрелки в инпутах типа number */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Стили скроллбара категорий */
.scrollbar-thin::-webkit-scrollbar {
  height: 6px;
}
.scrollbar-thin::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Активная строка с выбранным количеством */
.calc-row.bg-orange-50\/70 {
  background-color: rgba(255, 247, 237, 0.85) !important;
}

/* Стили плавающей панели */
#calcStickyBar {
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

