/* =================================
 1. НОВАЯ ПАЛИТРА И ПЕРЕМЕННЫЕ
================================= */
:root {
  --primary-color: #0E4D3E; /* Глубокий Изумрудный (Основной) */
  --secondary-color: #FFC371; /* Песочный / Золотистый (Акцент) */
  --text-color: #212121; /* Очень темный, почти черный */
  --light-text-color: #F9F9F9; /* Светло-серый, почти белый (Фон) */
  --contrast-color: #FFFFFF; /* Чистый белый */
  --shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* =================================
 2. ОБЩИЕ СТИЛИ И ТИПОГРАФИКА
================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif; /* Современный шрифт */
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-text-color);
  /* ГАРАНТИЯ ОТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА */
  overflow-x: hidden; 
}

.container {
  max-width: 1300px; /* Увеличим ширину контейнера */
  margin: 0 auto;
  padding: 0 30px;
}

/* Стили для заголовков */
h1 {
  font-size: 3.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  font-weight: 700;
  color: var(--primary-color);
}

/* Анимация (оставляем) */
.reveal {
  opacity: 0; /* Установлено 0 для корректной работы JS-анимации */
  transform: translateY(30px);
  transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =================================
 3. ШАПКА САЙТА (HEADER)
================================= */
.header {
  background-color: var(--primary-color);
  padding: 18px 0;
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-size: 26px;
  font-weight: 700;
  color: var(--secondary-color); /* Золотистый логотип */
  letter-spacing: 1px;
}

.nav a {
  color: var(--contrast-color);
  text-decoration: none;
  font-weight: 600;
  margin-left: 35px;
  padding: 5px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}

.nav a:hover {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
}

/* =================================
 4. КНОПКИ (BUTTONS)
================================= */
.btn {
  padding: 14px 35px;
  border-radius: 4px; /* Менее скругленные углы */
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 195, 113, 0.4); /* Акцентная тень */
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--contrast-color);
}

/* =================================
 5. ГЛАВНАЯ СЕКЦИЯ (HERO)
================================= */
.hero {
  height: 100vh; /* Полная высота экрана */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: url('header.jpg') no-repeat center center/cover;
  position: relative;
  padding-top: 100px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(14, 77, 62, 0.65); /* Темный изумрудный оверлей */
}

.hero-content {
  max-width: 900px;
  position: relative; /* Чтобы контент был поверх оверлея */
  color: var(--contrast-color);
  padding: 40px;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 50px;
  font-weight: 400;
}

/* =================================
 6. ОБЩИЕ СЕКЦИИ
================================= */
.section {
  padding: 100px 0; /* Увеличим отступы для "воздуха" */
}

.text-center {
  text-align: center;
}

.intro-text {
  font-size: 1.1rem;
  max-width: 900px;
  margin: 0 auto 50px;
  line-height: 1.8;
}

/* --- СТИЛЬ ДЛЯ КАРТОЧЕК РЕШЕНИЙ (solution-card) --- */
/* Стиль для крупных карточек услуг, если они будут использоваться в других секциях */
.solution-card {
  background-color: var(--contrast-color);
  padding: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-top: 5px solid var(--secondary-color); /* Акцентная линия */
}

.solution-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.solution-card h3 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.solution-card p {
  font-size: 1rem;
  color: #555;
}
/* -------------------------------------------------------- */


/* --- СТИЛЬ ДЛЯ БЛОКА "КОМПЛЕКСНЫЕ РЕШЕНИЯ" (service-item structure) --- */
.service-item {
  display: flex;
  align-items: center;
  gap: 50px; /* Отступ между картинкой и текстом */
  margin-bottom: 70px;
  padding: 30px;
  background-color: var(--contrast-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.service-item:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-item img {
  width: 40%;
  min-width: 300px; /* Минимальная ширина для картинки на больших экранах */
  height: 300px;
  object-fit: cover;
  border-radius: 4px;
}

.service-text {
  width: 60%;
  padding: 20px 0;
}

.service-text h3 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.service-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
}

/* Модификатор для обратного порядка (Image on right) */
.service-item.reverse {
  flex-direction: row-reverse;
}

/* --- НОВЫЙ БЛОК "ОПАСНОСТИ" (dangers-list) --- */
.dangers-list {
    max-width: 950px;
    margin: 0 auto;
    text-align: left;
    padding-left: 0;
    list-style: none; /* Удаляем стандартные точки */
}

.dangers-list li {
    font-size: 1.15rem;
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text-color);
    position: relative;
    padding-left: 35px; /* Отступ для иконки */
}

.dangers-list li::before {
    /* Используем красный крестик для опасности */
    content: '✖'; 
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.3rem;
    color: #D32F2F; /* Красный цвет для опасности */
    font-weight: 700;
}

.dangers-list li strong {
    color: var(--primary-color);
}
/* -------------------------------------------------------- */


/* =================================
 7. СЕКЦИЯ "ПРЕИМУЩЕСТВА" (НОВЫЙ 4-КОЛОНОЧНЫЙ СТИЛЬ)
================================= */
.services-grid {
  /* Сетка на 4 колонки */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-top: 20px;
}

.advantage-card {
  /* Стиль для минималистичной карточки с подчеркиванием */
  background-color: transparent;
  padding: 20px 10px;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}

.advantage-card h3 {
  font-size: 1.15rem;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
  /* Создаем подчеркивание */
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary-color); /* Изумрудная линия */
}

.advantage-card p {
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}


/* =================================
 8. СЕКЦИЯ "ПОРТФОЛИО"
================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.portfolio-grid img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease;
}

.portfolio-grid img:hover {
  transform: scale(1.05);
}


/* =================================
 9. СЕКЦИЯ "СТАТЬИ"
================================= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.article-card {
  background-color: var(--contrast-color);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-align: left;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 0;
}

.article-card-content {
  padding: 20px;
}

.article-card h3 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.article-card p {
  font-size: 0.95rem;
  color: #666;
}

/* =================================
 10. СЕКЦИЯ "ОТЗЫВЫ"
================================= */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.testimonial-card {
  background-color: var(--contrast-color);
  padding: 30px;
  border-left: 4px solid var(--secondary-color);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.testimonial-card p:first-child {
  font-size: 1.05rem;
  margin-bottom: 20px;
  font-style: italic;
  color: #444;
}

.client-name {
  font-weight: 700;
  font-style: normal;
  text-align: right;
  color: var(--primary-color);
  display: block;
  margin-top: 10px;
}

/* =================================
 11. СЕКЦИЯ "ЦЕНЫ"
================================= */
.pricing-table {
  background-color: var(--contrast-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.pricing-table th, .pricing-table td {
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.pricing-table th {
  background-color: var(--primary-color);
  color: var(--contrast-color);
  font-weight: 600;
  text-transform: uppercase;
}
/* Скругление углов для таблицы */
.pricing-table tr:first-child th:first-child { border-top-left-radius: 8px; }
.pricing-table tr:first-child th:last-child { border-top-right-radius: 8px; }
.pricing-table tr:last-child td { border-bottom: none; }


.pricing-note {
  text-align: center;
  margin-top: 30px;
  font-size: 0.95rem;
  color: #666;
}

/* =================================
 12. СЕКЦИЯ "КОНТАКТЫ"
================================= */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.contact-form textarea {
  min-height: 150px;
}

/* =================================
 13. ПОДВАЛ САЙТА (FOOTER)
================================= */
.footer {
  background-color: var(--text-color); /* Очень темный фон */
  color: var(--light-text-color);
  text-align: center;
  padding: 40px 0;
  font-size: 0.9rem;
}

.footer .container p {
  line-height: 1.8;
}

/* Стили для ссылки Политики в подвале */
.footer .privacy-link-container {
    margin-top: 10px;
}
.footer .privacy-link {
    color: var(--light-text-color); 
    font-size: 0.85rem;
    text-decoration: underline;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.footer .privacy-link:hover {
    opacity: 1;
}

/* =================================
 14. СТРАНИЦЫ СТАТЕЙ И ДОКУМЕНТОВ (Policy, Articles)
================================= */
.article-page {
  padding-top: 150px;
  padding-bottom: 80px;
}

.article-page h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  padding-top: 30px; 
}

.article-page h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-top: 40px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color); 
    padding-bottom: 5px;
}

.article-page ol, 
.article-page ul {
    margin-left: 25px;
    margin-bottom: 30px;
}

.article-page .container {
  max-width: 1000px;
}

.article-page p,
.article-page li {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

.article-image {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
}

.back-link {
  margin-top: 40px;
  display: inline-block;
}


/* =================================
 15. СРАВНЕНИЕ (COMPARISON)
================================= */
.comparison-section {
    /* Светлый фон, чтобы выделить секцию */
    background-color: var(--light-text-color); 
}

.comparison-grid {
    display: grid;
    /* Создаем 2 колонки одинаковой ширины */
    grid-template-columns: 1fr 1fr; 
    gap: 30px;
    margin-top: 40px;
}

/* Заголовки колонок */
.comparison-column-header {
    text-align: center;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.service-header {
    background-color: var(--primary-color);
    color: var(--contrast-color);
}

.diy-header {
    /* Очень светлый, нейтрально-предупреждающий цвет */
    background-color: #FCF8E3; 
    color: var(--text-color);
    border: 1px solid #E0A800;
}

/* Элемент сравнения (одна строка) */
.comparison-feature {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 8px;
    align-items: flex-start;
    height: auto; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Легкая тень для объема */
}

/* Стили для колонки "Профессиональная служба" */
.service-item {
    /* Светлый оттенок основного цвета */
    background-color: #E6F3F0; 
    /* Яркая полоса слева для акцента */
    border-left: 5px solid var(--primary-color); 
}

.service-item .icon {
    color: var(--primary-color);
}

.service-item h4 {
    color: var(--primary-color);
}

/* Стили для колонки "Самостоятельная обработка" */
.diy-item {
    /* Светлый оттенок для предупреждения */
    background-color: #F8D7DA; 
    /* Предупреждающая полоса */
    border-left: 5px solid #DC3545; 
}

.diy-item .icon {
    /* Красный для знака "✖" */
    color: #DC3545; 
}

.diy-item h4 {
    /* Заголовок DIY желто-оранжевый */
    color: #DC3545;
}

/* Общие стили для иконок */
.comparison-feature .icon {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1; 
    min-width: 40px; 
    text-align: center;
}

.comparison-feature h4 {
    margin-top: 0;
    font-size: 1.1rem;
}

.comparison-feature p {
    margin-bottom: 0;
    font-size: 0.95rem;
}


/* =================================
 16. ПРЕИМУЩЕСТВА (FEATURES)
================================= */
.features-section {
    /* Фон может быть основным цветом или светлым */
    background-color: var(--contrast-color); 
}

.features-grid {
    display: grid;
    /* Создаем 3 колонки, чтобы было удобно читать */
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--light-text-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    /* Добавляем границу для выделения */
    border-bottom: 5px solid var(--secondary-color); 
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem; /* Размер иконки (эмодзи) */
    margin-bottom: 15px;
    /* Оформление фона для иконки */
    width: 60px;
    height: 60px;
    line-height: 60px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    background-color: rgba(14, 77, 62, 0.1); /* Прозрачный основной цвет */
}

.feature-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--text-color);
}


/* =================================
 17. ГАРАНТИЯ В ДОГОВОРЕ (CONTRACT)
================================= */
.contract-section {
    background-color: var(--light-text-color);
    padding: 70px 0;
}

.contract-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--contrast-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 40px 60px;
    gap: 40px;
}

.contract-content {
    /* Левая часть: текст и кнопка */
    max-width: 50%;
}

.contract-title {
    /* Переопределяем стили h2, чтобы он не был по центру и без больших отступов */
    font-size: 2.5rem;
    text-align: left;
    margin-bottom: 10px;
    color: var(--text-color);
}

.contract-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
}

.btn-contract {
    font-size: 1.1rem;
    padding: 18px 40px;
}

.contract-image {
    /* Правая часть: изображение */
    max-width: 50%;
}

.contract-image img {
    width: 100%;
    height: auto;
    display: block;
}


/* =================================
 18. ВОЗМОЖНЫЕ ВОПРОСЫ (FAQ)
================================= */
.faq-section {
    background-color: var(--light-text-color);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--contrast-color);
    padding: 25px 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--secondary-color); /* Акцентная линия */
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
}

.faq-answer {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Стили для кнопки FAQ */
.btn-faq-contact {
    font-size: 1.1rem;
    padding: 18px 40px;
}

/* =================================
 19. СТРАНИЦА "СПАСИБО" (THANK YOU)
================================= */
.thank-you-page {
    /* Добавляем отступы */
    padding: 150px 0 80px 0; 
    background-color: var(--light-text-color);
}
.thank-you-page .container {
    text-align: center;
    padding: 60px 20px;
    background: var(--contrast-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.thank-you-page h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-top: 0;
    padding-top: 0;
}
.thank-you-page p {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 20px;
}
.thank-you-page .btn {
    margin: 10px;
}


/* =================================
 20. ПЛАВАЮЩАЯ КНОПКА И МОДАЛЬНОЕ ОКНО
================================= */

/* --- 1. Плавающая кнопка (FAB) --- */
.callback-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color); /* Изумрудный фон */
    color: var(--contrast-color);
    border: none;
    border-radius: 8px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1010; /* Выше всего, кроме самого модального окна */
    transition: background-color 0.3s, transform 0.3s;
}

.callback-fab:hover {
    background-color: #0c3e32; /* Темнее при наведении */
    transform: scale(1.05);
}

/* --- 2. Модальное окно (оверлей) --- */
.modal-overlay {
    /* Скрыто по умолчанию */
    visibility: hidden; 
    opacity: 0;
    /* Закреплено на весь экран */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Затемнение фона */
    background-color: rgba(0, 0, 0, 0.7); 
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s, visibility 0.3s;
}

/* Класс для отображения модального окна */
.modal-overlay.open {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: var(--contrast-color);
    border-radius: 12px;
    width: 90%;
    max-width: 400px; /* Фиксированная небольшая ширина */
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow);
    /* Визуальный стиль как на изображении */
    border-top: 5px solid var(--primary-color); 
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
}

.modal-body {
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    line-height: 1.3;
}

/* --- Форма внутри модального окна --- */
.callback-form input[type="tel"] {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
}

.btn-modal {
    width: 100%;
    background-color: var(--primary-color); /* Изумрудный для кнопки в форме */
    color: var(--contrast-color);
    font-size: 1rem;
    padding: 15px 0;
}

.btn-modal:hover {
    background-color: #0c3e32;
    transform: none;
    box-shadow: none;
}

/* --- Дополнительный текст и ссылка --- */
.modal-contact-text {
    margin-top: 30px;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.modal-phone-link {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.modal-phone-link:hover {
    color: var(--secondary-color);
}


/* =================================
 21. СТИЛИ ДЛЯ ВАЛИДАЦИИ ФОРМ
================================= */
/* Группируем input и error-message */
.input-group {
    position: relative;
    margin-bottom: 20px; /* Добавляем отступ, чтобы поместилось сообщение */
}

/* Скрываем сообщение по умолчанию */
.error-message {
    color: #DC3545; /* Красный цвет */
    font-size: 0.85rem;
    display: block;
    margin-top: 5px;
    height: 0;
    overflow: hidden;
    transition: height 0.3s;
}

/* Показываем сообщение, когда оно активно */
.error-message.active {
    height: 20px; /* Высота, достаточная для одной строки */
    margin-bottom: 5px;
}

/* Стиль для поля с ошибкой валидации, добавляется JS */
.input-error {
    border: 2px solid #DC3545 !important; /* Красная рамка */
}
.input-error::placeholder {
    color: #DC3545; /* Красный текст-заглушка */
}

/* Убедимся, что в модальном окне тоже работает */
.callback-form .input-group {
    margin-bottom: 0;
}
.callback-form input[type="tel"] {
    margin-bottom: 0; /* Убираем стандартный отступ, так как он теперь в input-group */
}


/* =================================
 22. МЕДИА-ЗАПРОСЫ
================================= */
@media (max-width: 1200px) {
  /* На больших планшетах делаем 2 колонки для преимуществ */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}

@media (max-width: 992px) {
    /* СТИЛЬ ДЛЯ БЛОКА "КОМПЛЕКСНЫЕ РЕШЕНИЯ" */
    .service-item, .service-item.reverse {
        flex-direction: column; /* Складываем в колонку на мобильных */
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    .service-item img, .service-text {
        width: 100%;
        min-width: auto;
    }
    .service-text h3 {
        font-size: 1.5rem;
    }
    
    /* CONTRACT SECTION */
    .contract-box {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }
    .contract-content {
        max-width: 100%;
    }
    .contract-title {
        text-align: center;
        font-size: 2rem;
    }
    .contract-subtitle {
        font-size: 1.1rem;
    }
    .contract-image {
        max-width: 70%; /* Ограничим ширину картинки на планшетах */
        margin-top: 30px;
    }

    /* FEATURES GRID */
    .features-grid {
        /* На планшетах делаем 2 колонки */
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-content{padding:0;
        
    }
    .header-inner {
        flex-direction: column;
        align-items: center;
    }
    .nav {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav a {
        margin: 0 10px 5px 10px;
        font-size: 0.95rem; /* Немного уменьшим шрифт, чтобы навигация поместилась */
    }
    .hero {
        height: auto;
        padding-top: 150px;
        padding-bottom: 50px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
    h2 {
        font-size: 2rem;
    }
    .section {
        padding: 60px 0;
    }
    /* На мобильных делаем 1 колонку для преимуществ */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* COMPARISON SECTION */
    .comparison-grid {
        /* На мобильных устройствах делаем 1 колонку */
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    /* Скрываем общие заголовки колонок */
    .comparison-column-header {
        display: none;
    }
    /* Добавляем заголовок прямо в блок для мобильных через ::before */
    .service-item::before {
        content: "ПРОФЕССИОНАЛЬНАЯ СЛУЖБА";
        display: block;
        font-weight: 700;
        margin-bottom: 10px;
        color: var(--primary-color);
    }
    .diy-item::before {
        content: "САМОСТОЯТЕЛЬНАЯ ОБРАБОТКА";
        display: block;
        font-weight: 700;
        margin-bottom: 10px;
        color: #DC3545;
    }
    /* Убираем бордюр слева и добавляем разделитель снизу */
    .comparison-feature {
        border-left: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 25px;
    }
    .comparison-feature:last-child {
        border-bottom: none;
    }
    
    /* FAQ SECTION */
    .faq-item {
        padding: 20px;
    }
    .faq-question {
        font-size: 1.1rem;
    }
    .faq-answer {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    /* *** КРИТИЧЕСКАЯ ПРАВКА ДЛЯ OVERFLOW *** */
    .container {
        padding: 0 15px; /* Уменьшаем боковые отступы до 15px */
    }
    
    /* ГАРАНТИЯ ОТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА */
    body {
        overflow-x: hidden;
    }

    /* Общие стили */
    h2 {
        font-size: 1.8rem;
    }
    .btn {
        padding: 12px 25px;
        font-size: 0.8rem;
    }

    /* FEATURES GRID */
    .features-grid {
        /* На мобильных устройствах делаем 1 колонку */
        grid-template-columns: 1fr;
    }

    /* CONTRACT SECTION */
    .contract-box {
        padding: 30px 20px;
    }
    .contract-image {
        max-width: 100%;
    }

    /* Адаптация внутренних страниц (Политика, Спасибо, Статьи) */
    .article-page {
        padding-top: 100px !important; 
        padding-bottom: 50px;
    }
    
    .article-page h1 {
        font-size: 2rem; 
        margin-bottom: 20px;
    }
    
    .article-page h2 {
        font-size: 1.3rem; 
        margin-top: 30px;
    }
    
    .article-page p, 
    .article-page li {
        font-size: 0.95rem; 
        line-height: 1.6;
    }

    /* Адаптация страницы "Спасибо" */
    .thank-you-page {
        padding: 50px 0;
    }
    .thank-you-page .container {
        padding: 30px 15px;
    }
    .thank-you-page h1 {
        font-size: 2rem;
    }
    .thank-you-page p {
        font-size: 1rem;
    }
    .thank-you-page .btn {
        width: 100%;
        margin: 5px 0 !important;
    }
    
    /* МОДАЛЬНОЕ ОКНО */
    .callback-fab {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    .modal-content {
        padding: 20px;
    }
    .modal-title {
        font-size: 1.3rem;
    }
    .modal-phone-link {
        font-size: 1.1rem;
    }
}