/* ==========================================================================
   1. ОБНУЛЕНИЕ И БАЗОВЫЕ НАСТРОЙКИ (RESET)
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #121212;
  color: #ffffff;
  font-family: 'Montserrat', 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. СОЛИДНАЯ ШАПКА ДЛЯ ПК (ПО УМОЛЧАНИЮ)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(12px); 
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  height: 140px; /* Массивная премиальная высота для ПК */
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 42px; 
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 35px;
}

.search-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 30px;
  transition: transform 0.2s ease;
}
.search-btn:hover {
  transform: scale(1.1);
}

/* ИКОНКА БУРГЕРА */
.burger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  width: 40px;
  height: 24px;
  z-index: 1001;
}

.burger-menu span {
  display: block;
  width: 100%;
  background-color: #ffffff;
  height: 3px;
  transition: all 0.3s ease;
}

/* Анимация крестика при активации */
.burger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}
.burger-menu.active span:nth-child(2) {
  opacity: 0;
}
.burger-menu.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ==========================================================================
   3. ВЫПАДАЮЩАЯ ПАНЕЛЬ МЕНЮ ДЛЯ ПК (ПО УМОЛЧАНИЮ)
   ========================================================================== */
.mobile-nav {
  position: fixed;
  top: 140px; /* Ровно под линией широкой шапки */
  right: -450px; /* Изначально полностью прячем вправо */
  width: 450px;
  height: calc(100vh - 140px);
  background-color: #161616;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  transition: right 0.4s ease-in-out; /* Анимируем свойство right */
  padding: 60px 40px;
  z-index: 999;
  overflow-y: auto;
}

/* Жесткий класс открытия панели для ПК и мобильных */
.mobile-nav.open {
  right: 0 !important;
}

.nav-links {
  list-style: none;
  margin-bottom: 40px;
}
.nav-links li {
  margin-bottom: 25px;
}
.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 26px;
  font-weight: 500;
  display: block;
  transition: all 0.2s ease;
}
.nav-links a:hover {
  color: #ff9800;
  padding-left: 10px;
}

/* СТИЛИ ВИДЖЕТА С КАТЕГОРИЯМИ */
.widget {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.widget-title {
  color: #ff9800;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.widget-list {
  list-style: none;
}
.widget-list li {
  margin-bottom: 15px;
}

/* ЖЕЛЕЗНО КРАСИМ ССЫЛКИ В БЕЛЫЙ ЦВЕТ ДЛЯ ВСЕХ ЭКРАНОВ */
.widget-list a,
.widget-list a:link,
.widget-list a:visited {
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 18px;
  display: inline-block;
  transition: all 0.2s ease !important;
}
.widget-list a:hover {
  color: #ff9800 !important;
  transform: translateX(5px);
}
.widget-icon-box {
  margin-top: 25px;
}
.widget-icon-box img {
  max-width: 60px;
  height: auto;
  opacity: 0.8;
}

/* ==========================================================================
   4. ГЛАВНЫЙ ЭКРАН (HERO SECTION) ДЛЯ ПК
   ========================================================================== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: 180px; /* Защитный отступ от большой шапки */
  /* ИСПРАВЛЕНО: Убрали IP-адрес, оставили чистый относительный путь от корня */
  background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('/houses/images_house_main/03-25/03-25_main.jpg'); 
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}


.hero-content {
  max-width: 900px;
  text-align: center;
}
.hero-title {
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 25px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  font-size: 52px;
  line-height: 1.2;
}
.hero-subtitle {
  color: #dcdcdc;
  font-weight: 400;
  max-width: 700px;
  margin: 0 auto 45px auto;
  line-height: 1.6;
  font-size: 22px;
}
.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  padding: 14px 32px;
  font-size: 16px;
}
.btn-primary {
  background-color: #ff9800;
  color: #000000;
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.3);
}
.btn-primary:hover {
  background-color: #e68900;
  transform: translateY(-2px);
}
.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ==========================================================================
   5. АДАПТИВНОСТЬ ДЛЯ СМАРТФОНОВ (МОБИЛЬНАЯ ВЕРСИЯ)
   ========================================================================== */
@media (max-width: 767px) {
  .site-header {
    height: 60px; /* Шапка становится компактной на смартфонах */
  }
  .header-container {
    padding: 0 20px;
  }
  .logo {
    font-size: 24px;
  }
  .header-actions {
    gap: 20px;
  }
  .search-btn {
    font-size: 20px;
  }
  .burger-menu {
    width: 26px;
    height: 18px;
  }
  .burger-menu span {
    height: 2px;
  }
  
  /* Пересчет анимации крестика под мобильные размеры */
  .burger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .burger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Пересчет выпадающей панели под мобильный экран */
  .mobile-nav {
    top: 60px;
    right: -100% !important; /* Скрываем на полную ширину экрана смартфона */
    width: 100%;
    height: calc(100vh - 60px);
    padding: 40px 20px;
  }
  
  .mobile-nav.open {
    right: 0 !important;
  }

  .nav-links a {
    font-size: 22px;
  }
  .hero-section {
    padding-top: 100px;
    background-attachment: scroll;
  }
  .hero-title {
    font-size: 28px;
    line-height: 1.3;
  }
  .hero-subtitle {
    font-size: 16px;
    margin-bottom: 35px;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .btn {
    padding: 16px 40px;
    font-size: 18px;
    width: 100%;
  }
}
/* ==========================================================================
   6. СТИЛИ ДЛЯ ВСПЛЫВАЮЩЕГО ОКНА ПОИСКА (SEARCH MODAL)
   ========================================================================== */
/* ==========================================================================
   6. СТИЛИ ДЛЯ ВСПЛЫВАЮЩЕГО ОКНА ПОИСКА (ПЕРВОНАЧАЛЬНЫЙ ВАРИАНТ)
   ========================================================================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(15px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  padding: 20px;
}

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

.search-modal {
  background-color: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 50px 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 650px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(-20px);
  transition: transform 0.3s ease-in-out;
}

.search-overlay.active .search-modal {
  transform: translateY(0);
}

/* КНОПКА ЗАКРЫТИЯ (Позиционируется абсолютно, как вначале) */
.search-close {
  position: absolute;
  /* Калибровка отступов: сдвинули чуть глубже в угол, дав простор заголовку */
  top: 15px;
  right: 22px;
  background: none;
  border: none;
  color: #888;
  font-size: 36px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
}
.search-close:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.search-modal-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
  color: #ffffff;
  font-size: 24px;
}

.search-form {
  display: flex;
  gap: 15px;
  width: 100%;
}

.search-input {
  flex: 1;
  background-color: #262626;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px 20px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 16px;
  outline: none;
}
.search-input:focus {
  border-color: #ff9800;
}

.search-submit-btn {
  background-color: #ff9800;
  color: #000000;
  border: none;
  padding: 15px 35px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.search-submit-btn:hover {
  background-color: #e68900;
}

/* Адаптация под мобильные экраны */
@media (max-width: 768px) {
  .search-modal {
    padding: 40px 20px;
  }
  .search-modal-title {
    font-size: 18px;
  }
  .search-form {
    flex-direction: column;
  }
  .search-submit-btn {
    width: 100%;
  }
}
/* ==========================================================================
   7. СТИЛИ ДЛЯ СТРОИТЕЛЬНОГО КАЛЬКУЛЯТОРА И ТАБЛИЦЫ
   ========================================================================== */
/* ==========================================================================
   7. СТИЛИ ДЛЯ СТРОИТЕЛЬНОГО КАЛЬКУЛЯТОРА И ТАБЛИЦЫ (СТАБИЛЬНЫЕ)
   ========================================================================== */
.calc-card {
  background-color: rgba(26, 26, 26, 0.8); 
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  width: 100%;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.calc-table th {
  background-color: #222222;
  color: #ff9800;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-align: left;
  padding: 15px 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.calc-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 16px;
  color: #e0e0e0;
}

.calc-input {
  width: 100%;
  background-color: #262626;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 15px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}
.calc-input:focus {
  border-color: #ff9800;
}

/* Двухколоночный вывод результатов */
/* Ровный контейнер для вывода результатов */
.calc-output-container {
  display: flex;
  gap: 30px;
  margin-bottom: 35px;
  width: 100%;
  align-items: flex-start; /* ИСПРАВЛЕНО: Элементы не растягиваются по высоте криво */
}

.calc-result {
  flex: 1;
  min-width: 45%; /* ИСПРАВЛЕНО: Текст занимает свою честную половину */
  background-color: rgba(255, 152, 0, 0.03);
  border: 1px solid rgba(255, 152, 0, 0.15);
  border-radius: 8px;
  padding: 25px;
  box-sizing: border-box;
}

.calc-drawing {
  flex: 1;
  min-width: 45%; /* ИСПРАВЛЕНО: Чертеж занимает свою честную половину */
  flex-shrink: 0; /* ЗАПРЕЩАЕМ браузеру сжимать картинку чертежа */
  background-color: #111111;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
}



.blueprint-img {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 4px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  .calc-output-container { flex-direction: column; gap: 20px; }
  .calc-card { padding: 20px; }
  .calc-table thead { display: none; }
  .calc-table tr { display: block; margin-bottom: 15px; }
  .calc-table td { display: block; padding: 10px 0; text-align: left; }
}
/* ==========================================================================
   8. СТИЛИ ДЛЯ ПЕРЕКЛЮЧАТЕЛЯ РЕЖИМОВ (ПРОСТОЙ / ПРОФИ)
   ========================================================================== */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #ffffff;
}

/* Красивый свитч-тумблер */
.switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 28px;
}
.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #262626;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.3s ease;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background-color: #888;
  transition: 0.3s ease;
  border-radius: 50%;
}

/* Состояние при включении (Режим Профи) */
input:checked + .slider {
  background-color: rgba(255, 152, 0, 0.15);
  border-color: #ff9800;
}
input:checked + .slider:before {
  transform: translateX(26px);
  background-color: #ff9800;
}

/* СКРЫВАЕМ СТРОКИ ПРОФИ ПО УМОЛЧАНИЮ */
.pro-row {
  display: none;
}
/* ==========================================================================
   9. СТИЛИ ДЛЯ СТРАНИЦЫ-ХАБА КАЛЬКУЛЯТОРОВ
   ========================================================================== */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  width: 100%;
  margin-top: 20px;
}

.calc-hub-card {
  background-color: rgba(26, 26, 26, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Эффект наведения на карточку */
.calc-hub-card:hover:not(.disabled-card) {
  transform: translateY(-8px);
  border-color: #ff9800;
  box-shadow: 0 15px 40px rgba(255, 152, 0, 0.15);
}

.calc-hub-img-box {
  height: 200px;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
  background-color: #222; /*заглушка если нет картинки*/
}

.calc-hub-card:hover .calc-hub-img-box {
  transform: scale(1.05);
}

.calc-hub-info {
  padding: 25px;
  text-align: left;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.calc-hub-info h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}
.calc-hub-card:hover h3:not(.disabled-card *) { color: #ff9800; }

.calc-hub-info p {
  font-size: 14px;
  color: #aaaaaa;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.calc-hub-btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #ff9800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: letter-spacing 0.3s ease;
}
.calc-hub-card:hover .calc-hub-btn:not(.spec-lock) {
  letter-spacing: 1.5px;
}

/* Стили для закрытых карточек */
.disabled-card {
  cursor: not-allowed;
  opacity: 0.6;
}
.spec-lock {
  color: #666;
}
@media (max-width: 768px) {
  .calc-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
/* ==========================================================================
   10. СТИЛИ ДЛЯ СТРАНИЦЫ ПОРТФОЛИО (НАШИ РАБОТЫ) — АДАПТИРОВАНО СБМО
   ========================================================================== */
.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  background-color: rgba(26, 26, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 12px 24px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #ff9800;
  color: #000000;
  border-color: #ff9800;
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.3);
}

/* Сетка портфолио: на ПК 3 в ряд, на планшетах 2 в ряд */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 30px;
  width: 100%;
}

.portfolio-card {
  background-color: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: #ff9800;
  box-shadow: 0 15px 40px rgba(255, 152, 0, 0.15);
}

.portfolio-img-box {
  position: relative;
  height: 240px;
  overflow: hidden;
  background-color: #222;
}

.portfolio-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 152, 0, 0.3);
  color: #ff9800;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  z-index: 15;
}

.portfolio-info {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.portfolio-info h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: #ffffff;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.portfolio-card:hover .portfolio-info h3 {
  color: #ff9800;
}

.portfolio-info p {
  font-size: 14px;
  color: #aaaaaa;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.portfolio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 15px;
  font-size: 13px;
  color: #888888;
}

.portfolio-meta span strong {
  color: #e0e0e0;
}

.portfolio-meta .meta-icon {
  color: #ff9800;
  margin-right: 4px;
  font-weight: 900;
}

/* ==========================================================================
   11. СЛАЙДЕР ФОТОГРАФИЙ (БАЗОВЫЙ ДЛЯ ПК)
   ========================================================================== */
.portfolio-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slider-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slider-slide {
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Стрелки навигации */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  user-select: none;
  transition: all 0.2s ease;
  z-index: 10;
}
.slider-arrow:hover {
  background-color: #ff9800;
  color: #000000;
  border-color: #ff9800;
}
.arrow-prev { left: 10px; }
.arrow-next { right: 10px; }

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background-color 0.2s;
}
.slider-dot.active {
  background-color: #ff9800;
  width: 18px;
  border-radius: 4px;
}

/* ==========================================================================
   12. ЖЕСТКАЯ МОБИЛЬНАЯ АДАПТАЦИЯ (ДО 767px)
   ========================================================================== */
@media (max-width: 767px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 0 10px;
  }

  .portfolio-img-box {
    height: 230px; /* Фиксированная высота, чтобы не плющило */
  }

  /* Переводим слайдер в режим аппаратного CSS-свайпа */
  .portfolio-slider {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Скрываем полосу прокрутки, чтобы было эстетично */
  .portfolio-slider::-webkit-scrollbar {
    display: none;
  }

  .slider-slides {
    transform: none !important; /* Отключаем JS-трансформацию на смартфонах */
    width: auto;
  }

  /* Каждый слайд строго привязывается к границам экрана и не двоит */
  .slider-slide {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* Стрелки на мобилках скрываем, чтобы не мешали пальцам */
  .slider-arrow {
    display: none !important;
  }

  /* Горизонтальная лента фильтров */
  .portfolio-filters {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 10px 10px 10px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }
  .portfolio-filters::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    width: auto;
    display: inline-block;
    padding: 10px 16px;
    font-size: 13px;
    flex-shrink: 0;
  }
}

/* Крупный режим для вкладок */
.portfolio-grid.large-grid {
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 40px;
}
.portfolio-grid.large-grid .portfolio-img-box {
  height: 380px; 
}
@media (max-width: 767px) {
  .portfolio-grid.large-grid { grid-template-columns: 1fr; gap: 25px; }
  .portfolio-grid.large-grid .portfolio-img-box { height: 230px; }
}


/* ==========================================================================
   СТРАНИЦА КОНТАКТОВ СБМО
   ========================================================================== */
.contacts-main {
    background-color: #121212; 
    min-height: 100vh; 
    padding-top: 180px;
}

.contacts-container {
    max-width: 1400px; 
    margin: 0 auto; 
    width: 100%; 
    padding-bottom: 60px;
}

.contacts-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 40px; 
    padding: 0 20px;
}

.contacts-info-card, .contacts-form-card {
    background-color: rgba(26, 26, 26, 0.8); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    padding: 35px; 
    border-radius: 12px; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.contacts-info-card {
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
}

.contacts-subtitle {
    font-size: 24px; 
    color: #fff; 
    font-weight: 700; 
    margin-bottom: 25px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
    padding-bottom: 15px;
}

.contacts-item {
    margin-bottom: 25px; 
    display: flex; 
    align-items: flex-start; 
    gap: 15px;
}

.contacts-item-icon {
    font-size: 24px; 
    line-height: 1;
}

.contacts-item-label {
    font-size: 12px; 
    color: #ff9800; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 4px;
}

.contacts-phone-link {
    font-size: 20px; 
    font-weight: 800; 
    color: #fff; 
    text-decoration: none; 
    transition: color 0.3s ease;
}

.contacts-phone-link:hover {
    color: #ff9800;
}

.contacts-email-link {
    font-size: 18px; 
    font-weight: 600; 
    color: #fff; 
    text-decoration: none; 
    transition: color 0.3s ease;
}

.contacts-email-link:hover {
    color: #ff9800;
}

.contacts-text {
    font-size: 16px; 
    color: #fff; 
    line-height: 1.5;
}

.contacts-text span {
    color: #888;
}

.contacts-form {
    display: flex; 
    flex-direction: column; 
    gap: 20px;
}

.contacts-form-label {
    color: #ff9800; 
    font-family: 'Montserrat', sans-serif; 
    font-size: 11px; 
    font-weight: 700; 
    display: block; 
    margin-bottom: 8px; 
    text-transform: uppercase;
}

.contacts-form-input, .contacts-form-textarea {
    width: 100%; 
    font-size: 14px; 
    padding: 12px; 
    box-sizing: border-box;
}

.contacts-form-textarea {
    resize: vertical; 
    font-family: inherit;
}

.contacts-logo-bg {
    text-align: right; 
    margin-top: 20px; 
    opacity: 0.15;
}

.contacts-logo-bg img {
    max-height: 50px;
}
/* ==========================================================================
   ОКНО УСПЕШНОЙ ОТПРАВКИ ФОРМЫ СБМО
   ========================================================================== */
.success-page {
    margin: 0;
    padding: 0;
    background-color: #121212;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: #fff;
}

.success-overlay {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-sizing: border-box;
}

.success-icon {
    font-size: 54px;
    color: #ff9800;
    margin-bottom: 20px;
    display: inline-block;
    line-height: 1;
}

.success-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.success-text {
    color: #aaa;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.success-text b {
    color: #fff;
}

.success-btn {
    display: inline-block;
    background-color: #ff9800;
    color: #121212;
    text-decoration: none;
    font-weight: 700;
    padding: 14px 40px;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 13px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.success-btn:hover {
    background-color: #e08600;
    transform: translateY(-2px);
}
/* ==========================================================================
   УМНАЯ ВАЛИДАЦИЯ ФОРМ СБМО (CSS-ONLY)
   ========================================================================== */

/* Если поле заполнено некорректно (например, телефон введен не по шаблону) */
.contacts-form-input:focus:invalid {
    border-color: #ff3333 !important;
    background-color: rgba(255, 51, 51, 0.05) !important;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.2);
}

/* Если поле заполнено абсолютно верно */
.contacts-form-input:focus:valid {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05) !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.2);
}
/* ==========================================================================
   СТРАНИЦА О КОМПАНИИ СБМО (ABOUT)
   ========================================================================== */
.about-main {
    background-color: #121212;
    min-height: 100vh;
    padding-top: 180px;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px 80px 20px;
    box-sizing: border-box;
}

.story-block {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-top: 50px;
}

.story-row {
    display: flex;
    align-items: center;
    gap: 50px;
}

.story-row.reverse {
    flex-direction: row-reverse;
}

.story-content {
    flex: 1;
}

.story-content h2 {
    font-size: 28px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
}

.story-content h2 span {
    color: #ff9800;
}

.story-content p {
    color: #aaa;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.story-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.feature-box {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-number {
    font-size: 42px;
    font-weight: 800;
    color: #ff9800;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.feature-title {
    font-size: 14px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Адаптивность для мобилок */
@media (max-width: 768px) {
    .story-row, .story-row.reverse {
        flex-direction: column;
        gap: 30px;
    }
}
/* ==========================================================================
   СТРАНИЦА УСЛУГ СБМО (SERVICES)
   ========================================================================== */
.services-main {
    background-color: #121212;
    min-height: 100vh;
    padding-top: 180px;
}

.services-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px 80px 20px;
    box-sizing: border-box;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 152, 0, 0.3);
}

.service-icon-box {
    font-size: 40px;
    margin-bottom: 20px;
    line-height: 1;
}

.service-card h2 {
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    margin-bottom: 15px;
}

.service-card h2 span {
    color: #ff9800;
}

.service-card p {
    color: #aaa;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.service-list li {
    color: #ddd;
    font-size: 14px;
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.service-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #ff9800;
    font-weight: bold;
}

.service-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-badge {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

/* ==========================================================================
   ФИКС ОТСТУПА ДЛЯ СБМО: ВЫВОДИМ ФИЛЬТРЫ ИЗ-ПОД ШАПКИ
   ========================================================================== */

/* Опускаем контент на ПК, чтобы кнопки вышли из-под массивного хедера */
.portfolio-section {
  padding: 240px 20px 80px 20px !important;
}

/* На смартфонах возвращаем аккуратный компактный отступ */
@media (max-width: 767px) {
  .portfolio-section {
    padding-top: 100px !important;
    padding-bottom: 40px !important;
  }
}
/* Центрируем заголовок на странице портфолио СБМО */
.portfolio-header {
  text-align: center !important;
  width: 100% !important;
  margin-bottom: 40px !important;
}

.portfolio-header .hero-title {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

