/* ================= Базовые настройки ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px; 
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f9f9f9;
    line-height: 1.5;
    overflow-x: hidden; 
}

a {
    text-decoration: none;
}

/* ================= Кнопки ================= */
.btn-orange {
    display: inline-block;
    background-color: #f06a19;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn-orange:hover {
    background-color: #d65912;
}

.btn-large {
    padding: 12px 30px;
    font-size: 15px;
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: #333;
    padding: 9px 15px;
    border-radius: 20px;
    border: 1px solid #ccc;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: #f06a19;
    color: #f06a19;
}

/* ================= Иконки мессенджеров ================= */
.messenger-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.msg-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.msg-icon:hover {
    transform: scale(1.1);
}

/* ================= Шапка ================= */
.site-header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 18px;
    color: #1a4b8c;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* ================= Основной контейнер ================= */
.main-container {
    max-width: 1200px;
    width: 100%; 
    margin: 30px auto;
    padding: 0 20px;
}

/* ================= Герой и Сетка услуг ================= */
.hero-section {
    margin-bottom: 40px;
    text-align: center;
    width: 100%; 
    max-width: 100%;
    overflow-x: hidden; 
}

.main-title {
    font-size: 36px;
    margin-bottom: 10px;
    color: #222;
}

.main-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 25px;
}

/* Стили для адаптивного рекламного баннера */
.hero-banner-link {
    display: block;
    width: 100%; 
    max-width: 800px; 
    margin: 30px auto 0 auto; 
    border-radius: 15px;
    box-sizing: border-box; 
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-banner-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero-banner-img {
    width: 100%; 
    max-width: 100%; 
    height: auto; 
    display: block; 
    border-radius: 15px; 
}

/* Сетка на Flexbox для карточек */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.service-card {
    width: calc(25% - 15px); 
    background: #fff;
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px auto;
    object-fit: contain;
}

.service-title {
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.service-desc {
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
    flex-grow: 1;
}

.service-price {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 15px;
    color: #222;
}

.service-actions {
    display: flex;
    justify-content: center;
    gap: 15px; 
    align-items: center;
}

/* ================= Блок преимуществ ================= */
.advantages-section {
    background-color: #eaf2fa;
    border-radius: 15px;
    padding: 40px;
    display: flex;
    justify-content: center;
    gap: 100px;
}

.adv-title {
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-align: center;
}

.adv-list {
    list-style: none;
}

.adv-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 15px;
}

.adv-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #333;
    font-weight: bold;
}

.separator-main {
    height: 40px;
    margin: 60px 0;
    background: url('/static/img/razd.png') no-repeat center center;
    background-size: contain;
}

/* ================= Секция Подробнее (все блоки в одну колонку) ================= */
.details-section {
    display: flex;
    flex-direction: column;
}

.detail-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-color: #333;
}

.card-full {
    width: 100%;
    min-height: 250px;
}

.card-full::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(40, 55, 75, 0.95) 0%, rgba(40, 55, 75, 0.8) 45%, rgba(40, 55, 75, 0) 80%);
    z-index: 1;
}

.detail-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 40px 50px;
    max-width: 50%;
}

.detail-title {
    font-size: 24px;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.detail-text {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 20px 0; 
    opacity: 0.9;
}

/* Стили для блока "Заказать: [иконки]" */
.detail-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.detail-order-text {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

/* Встроенный рекламный баннер */
.detail-promo-banner {
    display: block;
    margin-top: 25px; /* Отступ от блока с кнопками заказа */
    border-radius: 10px;
    overflow: hidden;
    max-width: 400px; /* Ограничиваем ширину баннера */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-promo-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.detail-promo-img {
    width: 100%;
    height: auto;
    display: block;
}

.separator {
    height: 30px;
    margin: 20px 0;
    background: url('/static/img/razd.png') no-repeat center center;
    background-size: contain;
}

/* Фоновые изображения для всех 11 блоков */
.bg-truck     { background-image: url('/static/img/bg-truck.png'); }
.bg-sewage    { background-image: url('/static/img/bg-sewage.png'); }
.bg-build     { background-image: url('/static/img/bg-build.png'); } 
.bg-trash     { background-image: url('/static/img/bg-trash.png'); }
.bg-worker    { background-image: url('/static/img/bg-worker.png'); }
.bg-health    { background-image: url('/static/img/bg-health.png'); }
.bg-law       { background-image: url('/static/img/bg-law.png'); }
.bg-beauty    { background-image: url('/static/img/bg-beauty.png'); }
.bg-excavator { background-image: url('/static/img/bg-excavator.png'); } 
.bg-taxi      { background-image: url('/static/img/bg-taxi.png'); } 
.bg-delivery  { background-image: url('/static/img/bg-delivery.png'); } 

/* ================= Подвал (Footer) ================= */
.site-footer {
    background-color: #1a2a3a;
    color: #a0b0c0;
    padding: 50px 0;
    margin-top: 60px;
    font-size: 14px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
}

.footer-inner p {
    margin-bottom: 8px;
}

.footer-inner strong {
    color: #fff;
}

/* ================= Адаптивность ================= */
@media (max-width: 992px) {
    .service-card {
        width: calc(50% - 10px); 
    }
    .detail-content {
        max-width: 80%;
    }
    .card-full::before {
        background: linear-gradient(90deg, rgba(40, 55, 75, 0.9) 0%, rgba(40, 55, 75, 0.7) 100%);
    }
}

@media (max-width: 600px) {
    .hero-banner-link {
        margin-top: 20px;
        border-radius: 10px;
    }
    .hero-banner-img {
        border-radius: 10px;
    }
    .service-card {
        width: 100%; 
    }
    .advantages-section {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        text-align: center;
    }
    .detail-content {
        max-width: 100%;
        padding: 30px 20px;
    }
    .detail-promo-banner {
        max-width: 100%; /* На мобилках баннер растягивается на всю доступную ширину */
    }
    .footer-inner {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

/* Основные стили для кликабельного баннера */
.gruz-banner {
    display: block;
    width: 100%;
    max-width: 800px; /* Максимальная ширина баннера */
    margin: 20px auto; /* Центрирование баннера с отступами */
    text-decoration: none; /* Убирает подчеркивание текста в ссылке */
    color: #fff; /* Цвет текста (белый) */
    border-radius: 10px; /* Скругленные углы баннера */
    overflow: hidden; /* Обрезает изображение, чтобы оно не выходило за углы */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* Тень для объема */
    transition: transform 0.3s ease; /* Анимация при наведении */
}

/* Эффект при наведении (увеличение) */
.gruz-banner:hover {
    transform: scale(1.02);
}

/* Контейнер для изображения и текста */
.gruz-banner-content {
    position: relative;
    width: 100%;
    height: auto;
}

/* Стили для анимированного изображения */
.gruz-banner-img {
    width: 100%;
    height: auto;
    display: block; /* Убирает отступы под изображением */
}

/* Контейнер для текста на баннере */
.gruz-banner-text-overlay {
    position: absolute;
    bottom: 20px; /* Отступ текста от нижнего края */
    left: 20px; /* Отступ текста от левого края */
    right: 20px; /* Отступ текста от правого края */
    background: rgba(0,0,0,0.6); /* Полупрозрачный черный фон для читаемости */
    padding: 15px;
    border-radius: 5px;
    text-align: center; /* Текст по центру */
}

/* Стили для верхнего текста */
.gruz-text-top {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1.5vw; /* Размер шрифта в процентах от ширины экрана (адаптивный) */
    margin: 0 0 5px 0; /* Отступ только снизу */
}

/* Стили для номера телефона */
.gruz-text-phone {
    font-family: Arial, sans-serif;
    font-size: 1.2vw; /* Размер шрифта в процентах от ширины экрана (адаптивный) */
    margin: 0;
}

/* Адаптивность для мобильных телефонов */
@media (max-width: 600px) {
    .gruz-text-top {
        font-size: 4vw;
    }
    .gruz-text-phone {
        font-size: 3vw;
    }
    .gruz-banner-text-overlay {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 10px;
    }
}

/* ================= Всплывающие окна (Модалки) ================= */
.modal-overlay {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Темный полупрозрачный фон */
    z-index: 9999; /* Поверх всех элементов */
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.active {
    display: flex; /* Показываем окно при добавлении класса */
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 90vh; /* Защита, если текст очень длинный */
    overflow-y: auto; /* Прокрутка внутри окна, если оно не влезает в экран */
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a4b8c;
    padding-right: 30px; /* Чтобы крестик не перекрывал заголовок */
}

.modal-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #333;
}

.modal-actions {
    margin-top: 25px;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
    .modal-content {
        padding: 20px;
    }
    .modal-title {
        font-size: 20px;
    }
}

