/* ==========================================================================
   ОБНУЛЕНИЕ СТИЛЕЙ И НАСТРОЙКА СКРОЛЛА
   ========================================================================== */
html {
    overflow-x: hidden; 
    width: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ОБЩИЕ СТИЛИ ДЛЯ САЙТА (ЧЕРНЫЙ ФОН И БЕЛЫЙ ТЕКСТ) */
body {
    background-color: #0a0a0a; /* Глубокий черный */
    color: #ffffff; /* Белый текст */
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* Стили для букв VK и TG под иконками */
.btn-msg-text {
    font-size: 10px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    margin-top: 2px !important;
    color: #ffffff !important;
}

.vk-btn {
    background-color: #0077ff !important; /* Синий VK */
}
.vk-btn:hover {
    background-color: #0066dd !important;
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0, 119, 255, 0.6) !important;
}

.tg-btn {
    background-color: #229ed9 !important; /* Голубой Telegram */
}
.tg-btn:hover {
    background-color: #1e8cb1 !important;
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(34, 158, 217, 0.6) !important;
}

/* ШАПКА САЙТА (HEADER) — БЕЗУПРЕЧНЫЙ ЧЕРНЫЙ ФОН */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background-color: #000000; /* Покрасили в идеально черный цвет */
    border-bottom: 2px solid #ff6b00;
}

.logo-link {
    display: flex;
    align-items: center; 
    gap: 12px; 
    text-decoration: none;
}

/* СТИЛИ ДЛЯ КАРТИНКИ-ЛОГОТИПА — ЧИСТЫЙ КОД БЕЗ БАГОВ */
.logo-img {
    height: 40px; 
    width: auto;
    object-fit: contain;
    /* МЫ УДАЛИЛИ КРУТИВШИЙСЯ ТУТ MIX-BLEND-MODE, КОТОРЫЙ БЛОКИРОВАЛ КНОПКУ */
    transition: transform 0.3s ease;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Оранжевая подсветка для слова Box */
.logo-accent {
    color: #ff6b00;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.4);
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

header nav a {
    color: #a3a3a3; /* Бело-серый текст */
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    transition: color 0.3s;
}

header nav a:hover {
    color: #ff6b00; /* Оранжевое свечение при наведении */
}

/* ==========================================================================
   ГЛАВНЫЙ БАННЕР (HERO SECTION)
   ========================================================================== */
.hero {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(135px, #141414 0%, #0a0a0a 100%);
    border-bottom: 1px solid #222222;
}

.hero h1 {
    font-size: 42px;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 107, 0, 0.25);
}

.hero p {
    font-size: 18px;
    color: #a3a3a3;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

/* КНОПКА ЗАЯВКИ (ОРАНЖЕВЫЙ ГРАДИЕНТ) */
.cta-btn {
    background: linear-gradient(90deg, #ff6b00, #ff8c3a); 
    color: #fff;
    border: none;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
    transform: translateY(-3px); 
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.55);
    background: linear-gradient(90deg, #e05e00, #ff7b1a);
}

/* ==========================================================================
   БЛОК С ПРЕИМУЩЕСТВАМИ И УСЛУГАМИ
   ========================================================================== */
#features, #services {
    padding: 80px 10%;
    text-align: center;
    background-color: #0a0a0a;
}

#features h2, #services h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #fff;
}

.features-grid, .services-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap; 
}

/* СТИЛЬ КАРТОЧЕК */
.feature-card, .card {
    background-color: #141414;
    flex: 1;
    min-width: 250px;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #222222;
    text-align: left;
    transition: all 0.3s ease;
}

.feature-card:hover, .card:hover {
    border-color: #ff6b00; /* Оранжевая рамка */
    transform: translateY(-8px) scale(1.02) !important; 
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.2); 
    background-color: #1a1a1a; 
}

.feature-icon {
    font-size: 40px;
    color: #ff6b00;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 107, 0, 0.4); 
}

.feature-card h3, .card h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 20px;
}

.feature-card p, .card p {
    color: #a3a3a3;
    font-size: 15px;
}

/* ==========================================================================
   БЛОК ЦЕН И ТАБЛИЦА
   ========================================================================== */
#prices {
    padding: 80px 10%;
    text-align: center;
    background-color: #141414;
}

.section-subtitle {
    color: #a3a3a3;
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tab-btn {
    background-color: #0a0a0a;
    color: #a3a3a3;
    border: 1px solid #222222;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #fff;
    border-color: #ff6b00;
}

.tab-btn.active {
    background: linear-gradient(90deg, #ff6b00, #ff8c3a);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.price-table-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #0a0a0a;
    border-radius: 12px;
    border: 1px solid #222222;
    overflow: hidden;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.price-table th {
    background-color: #141414;
    color: #fff;
    font-weight: 600;
    border-bottom: 2px solid #222222;
    padding: 18px 25px;
}

.price-table td {
    padding: 18px 25px;
}

.price-table tr {
    border-bottom: 1px solid #222222;
    transition: background-color 0.2s;
}

.price-table tr:last-child {
    border-bottom: none;
}

.price-table tr:hover {
    background-color: #141414;
}

.price-table td:last-child {
    color: #ff6b00;
    font-weight: bold;
}

/* ==========================================================================
   БЛОК ОТЗЫВОВ
   ========================================================================== */
#reviews {
    padding: 80px 10%;
    text-align: center;
    background-color: #0a0a0a;
}

#reviews h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #fff;
}

.reviews-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.review-card {
    background-color: #141414;
    border: 1px solid #222222;
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    flex: 1;
    min-width: 280px;
    text-align: left;
}

.review-stars {
    color: #ff6b00; 
    margin-bottom: 15px;
    font-size: 18px;
}

.review-text {
    color: #a3a3a3;
    font-style: italic;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.review-author {
    color: #ff6b00;
    font-weight: 600;
    font-size: 14px;
}

/* ==========================================================================
   ПОДВАЛ САЙТА (FOOTER) И КАРТА
   ========================================================================== */
footer {
    background-color: #141414;
    border-top: 2px solid #ff6b00;
    padding: 60px 10% 20px 10%;
    width: 100%;
}

.footer-content {
    display: flex;
    justify-content: space-between; /* Контакты строго влево, карта строго вправо */
    align-items: flex-start;
    gap: 40px; /* Фиксированный зазор между колонками */
    margin-bottom: 40px;
    width: 100%;
}

.footer-info {
    flex: 1; /* Ровно половина ширины */
    min-width: 250px;
}

.footer-info h3 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-info p {
    color: #a3a3a3;
    margin-bottom: 15px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-info i {
    color: #ff6b00;
}

/* СТИЛИ ДЛЯ КНОПОК МЕССЕНДЖЕРОВ НА ПК */
.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    width: max-content;
}

.social-link {
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #222222;
    white-space: nowrap;
}

.vk-social { background-color: #0077ff; }
.vk-social:hover { background-color: #0066dd; box-shadow: 0 0 15px rgba(0, 119, 255, 0.4); transform: translateY(-2px); }

.tg-social { background-color: #229ed9; }
.tg-social:hover { background-color: #1e8cb1; box-shadow: 0 0 15px rgba(34, 158, 217, 0.4); transform: translateY(-2px); }

/* КОЛОНКА КАРТЫ НА ПК */
.footer-map {
    flex: 1; /* Ровно вторая половину ширины */
    min-width: 250px;
}

.map-link {
    text-decoration: none;
    display: block;
}

.map-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%);
    border: 1px solid #222222;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    padding: 20px;
}

.map-placeholder:hover {
    border-color: #ff6b00;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.15);
    background-color: #1a1a1a;
}

.map-placeholder i {
    font-size: 40px;
    color: #ff6b00;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
    transition: transform 0.3s ease;
}

.map-placeholder:hover i { transform: scale(1.1) rotate(-5deg); }
.map-placeholder span { color: #fff; font-weight: 600; font-size: 16px; }

.footer-bottom {
    text-align: center;
    color: #555555;
    font-size: 13px;
    border-top: 1px solid #222222;
    padding-top: 20px;
}

/* ==========================================================================
   МОДАЛЬНОЕ ОКНО ЗАЯВКИ
   ========================================================================== */
/* МОДАЛЬНОЕ ОКНО ЗАЯВКИ — ТЕПЕРЬ ВСЕГДА ПОВЕРХ САЙТА */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    
    /* Критически важный параметр: поднимает окно на самый верхний слой */
    z-index: 99999 !important; 
    
    display: flex; 
    justify-content: center;
    align-items: center;
    
    /* Начальное скрытое состояние */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* СОСТОЯНИЕ КОГДА ОКНО ОТКРЫТО */
.modal.modal-visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-content {
    background-color: #141414;
    padding: 40px;
    border-radius: 16px;
    border: 2px solid #ff6b00;
    max-width: 450px;
    width: 90%;
    position: relative;
    text-align: center;
    transform: scale(0.7);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #a3a3a3;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ff4757;
}

#repairForm input, #repairForm select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    background-color: #0a0a0a;
    border: 1px solid #222222;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#repairForm input:focus, #repairForm select:focus {
    border-color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.25);
}

/* ==========================================================================
   КЛАССЫ ДЛЯ АНИМАЦИЙ
   /* ==========================================================================
   КЛАССЫ ДЛЯ АНИМАЦИЙ (СКРОЛЛ / ЗАГРУЗКА)
   ========================================================================== */
.anim-hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s ease-out;
}

.anim-show {
    opacity: 1;
    transform: translateY(0);
}

.services-grid .card:nth-child(1), .features-grid .feature-card:nth-child(1) { transition-delay: 0s; }
.services-grid .card:nth-child(2), .features-grid .feature-card:nth-child(2) { transition-delay: 0.15s; }
.services-grid .card:nth-child(3), .features-grid .feature-card:nth-child(3) { transition-delay: 0.3s; }

.hero .hero-fade {
    opacity: 0 !important;
    transform: scale(0.97) translateY(10px) !important;
    transition: opacity 0.8s ease, transform 0.8s ease !important;
}

.hero.hero-active .hero-fade {
    opacity: 1 !important;
    transform: scale(1) translateY(0) !important;
}

.hero.hero-active p.hero-fade { transition-delay: 0.25s !important; }
.hero.hero-active .cta-btn.hero-fade { transition-delay: 0.5s !important; }

.price-table tbody tr {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.price-table tbody tr.row-visible {
    opacity: 1;
    transform: translateY(0);
}
/* ==========================================================================
   ПЛАВАЮЩИЕ КНОПКИ МЕССЕНДЖЕРОВ
   ========================================================================== */
.messenger-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999; /* Чтобы кнопки были поверх всех слоев сайта */
}

.msg-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 26px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Стили для кнопки VK */
.vk-btn {
    background-color: #0077ff; /* Фирменный синий цвет VK */
}
.vk-btn:hover {
    background-color: #0066dd;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 119, 255, 0.4);
}

/* Стили для кнопки Telegram */
.tg-btn {
    background-color: #229ed9; /* Фирменный голубой цвет Telegram */
}
.tg-btn:hover {
    background-color: #1e8cb1;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(34, 158, 217, 0.4);
}

/* ==========================================================================
   КНОПКИ МЕССЕНДЖЕРОВ В ПОДВАЛЕ (ИСПРАВЛЕНО ДЛЯ ПК)
   ========================================================================== */
.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    width: max-content; /* Кнопки занимают ровно столько места, сколько им нужно, и не липнут к карте */
    justify-content: flex-start; /* На ПК выравниваем аккуратно по левому краю к тексту */
}

.social-link {
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #222222;
    white-space: nowrap; /* Запрещаем тексту внутри кнопок переноситься на новую строку */
}

/* Кнопка VK */
.vk-social {
    background-color: #0077ff;
}
.vk-social:hover {
    background-color: #0066dd;
    box-shadow: 0 0 15px rgba(0, 119, 255, 0.4);
    transform: translateY(-2px);
}

/* Кнопка Telegram */
.tg-social {
    background-color: #229ed9;
}
.tg-social:hover {
    background-color: #1e8cb1;
    box-shadow: 0 0 15px rgba(34, 158, 217, 0.4);
    transform: translateY(-2px);
}

/* ==========================================================================
   ПОЛНАЯ МОБИЛЬНАЯ АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 768px) {
    header, #features, #services, #calculator, #prices, #reviews, footer {
        padding: 30px 20px !important;
    }

    header {
        flex-direction: column !important;
        gap: 15px;
        text-align: center;
    }

    .logo-link { justify-content: center !important; }
    .logo-img { height: 35px; }
    .logo-text { font-size: 18px; }

    header nav {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    header nav a { margin: 0; font-size: 14px; }

    .hero { padding: 50px 15px !important; }
    .hero h1 { font-size: 26px !important; line-height: 1.3; }
    .hero p { font-size: 14px; margin-bottom: 25px; }
    .cta-btn { width: 100%; max-width: 300px; }

    #features h2, #services h2, #calculator h2, #prices h2, #reviews h2 {
        font-size: 24px !important;
        margin-bottom: 25px;
    }

    .features-grid, .services-grid, .reviews-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
    }

    .feature-card, .card, .review-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        padding: 25px 20px !important;
        margin: 0 !important;
        text-align: left !important;
    }

    .calc-text, .calc-price {
        font-size: 14px !important;
    }

    .total-price {
        font-size: 30px !important;
    }

    /* ВКЛАДКИ ЦЕН */
    .tabs { flex-wrap: wrap; gap: 8px; margin-bottom: 20px; width: 100%; }
    .tab-btn { padding: 10px 12px; font-size: 13px; flex: 1; min-width: 90px; }

    /* ПЕРЕСТРОЕНИЕ ТАБЛИЦЫ В КРУПНЫЕ ВЕРТИКАЛЬНЫЕ БЛОКИ-КАРТОЧКИ */
    .price-table-container { border: none !important; background: none !important; width: 100% !important; }
    .price-table thead { display: none !important; }
    .price-table, .price-table tbody, .price-table tr, .price-table td { display: block !important; width: 100% !important; }

    .price-table tr {
        background-color: #141414 !important;
        border: 1px solid #222222 !important;
        border-radius: 10px !important;
        margin-bottom: 12px !important;
        padding: 15px !important;
    }

    .price-table td:nth-child(1) { font-size: 15px !important; font-weight: 600 !important; color: #fff !important; padding: 0 0 8px 0 !important; border: none !important; }
    .price-table td:nth-child(2) { font-size: 13px !important; color: #a3a3a3 !important; padding: 0 0 10px 0 !important; border: none !important; }
    .price-table td:nth-child(3) { font-size: 16px !important; color: #ff6b00 !important; font-weight: bold !important; padding: 8px 0 0 0 !important; border-top: 1px solid #222222 !important; }

    /* ПОДВАЛ */
    .footer-content { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 25px !important; width: 100% !important; }
    
    .footer-info {
        text-align: center !important;
        width: 100% !important;
        padding-left: 0 !important; padding-right: 0 !important;
        margin-left: 0 !important; margin-right: 0 !important;
    }

    .footer-info p {
        display: flex !important; align-items: center !important; justify-content: center !important;
        text-align: center !important; gap: 10px !important; font-size: 14px !important; margin-bottom: 12px !important;
    }
    .footer-socials {
        justify-content: center !important; /* На телефонах кнопки встанут строго по центру экрана */
        width: 100% !important;
        gap: 10px !important;
        margin-bottom: 20px !important; /* Добавили отступ снизу, чтобы кнопки больше не слипались с картой */
    }
    .social-link {
        padding: 10px 15px !important;
        font-size: 13px !important;
        flex: 1 !important; /* Поделят экран телефона поровну */
        text-align: center !important;
    }

    .footer-map { width: 100% !important; max-width: 100% !important; }
    .map-placeholder { height: 160px !important; }
    .modal-content { padding: 25px 15px; width: 95%; }
/* Уменьшаем кнопки мессенджеров на телефонах */
    .messenger-buttons {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
    .msg-btn {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}