/* --- СБРОС И ПЕРЕМЕННЫЕ --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; } 

:root {
    --yellow-light: #fde0ac;
    --yellow-main: #f3d294;
    --gray-light: #bdbdbd;
    --gray-main: #8a8a8a;
    --gray-dark: #202020;
    --white: #ffffff;
}

body { 
    background-color: var(--gray-dark); 
    color: var(--white); 
    line-height: 1.6; 
    overflow-x: hidden; 
    font-family: 'Roboto', sans-serif; 
}

h1, h2, h3, h4, h5, h6, .btn, .logo, .nav-links a, .header-phone {
    font-family: 'Montserrat', sans-serif;
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
img { max-width: 100%; display: block; object-fit: cover; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
section { padding: 80px 0; }

/* --- ШАПКА --- */
header { 
    position: fixed; 
    width: 100%;
    top: 0; 
    left: 0;
    z-index: 1000; 
    background-color: transparent; 
    border-bottom: 2px solid transparent; 
    padding: 25px 0; 
    transition: all 0.4s ease; 
}

header.scrolled {
    background-color: rgba(32, 32, 32, 0.98);
    border-bottom: 2px solid var(--yellow-main);
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.header-box { display: flex; justify-content: space-between; align-items: center; }

.logo-wrapper { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo-img { height: 40px; width: auto; transition: 0.3s; }
.logo-wrapper:hover .logo-img { transform: scale(1.05); }

.logo { font-size: 28px; font-weight: 800; color: var(--yellow-main); text-transform: uppercase; letter-spacing: 1px; }
.logo span { color: var(--white); }

.nav-links { display: flex; list-style: none; gap: 20px; font-weight: 700; font-size: 15px; text-transform: uppercase;}
.nav-links a:hover { color: var(--yellow-main); }
.header-phone { font-weight: 700; font-size: 18px; color: var(--yellow-main); cursor: pointer; }
.header-phone:hover { color: var(--yellow-light); }

/* --- КНОПКИ --- */
.btn { display: inline-block; background-color: var(--yellow-main); color: var(--gray-dark); padding: 15px 35px; font-weight: 700; border-radius: 4px; text-transform: uppercase; cursor: pointer; border: 2px solid transparent; transition: 0.3s; text-align: center; }
.btn:hover { background-color: transparent; color: var(--yellow-main); border-color: var(--yellow-main); }

/* --- ГЛАВНЫЙ ЭКРАН --- */
.hero { 
    padding: 180px 0 100px 0; 
    text-align: center; 
    background: linear-gradient(rgba(32,32,32,0.7), rgba(32,32,32,0.85)), url('hero-bg.jpg') center/cover no-repeat; 
}
.hero h1 { font-size: 52px; font-weight: 800; margin-bottom: 20px; text-transform: uppercase; }
.hero h1 span { color: var(--yellow-main); }
.hero p { font-size: 18px; color: var(--gray-light); margin: 0 auto 40px; max-width: 600px; }

/* --- ЗАГОЛОВКИ СЕКЦИЙ --- */
.section-title { text-align: center; font-size: 36px; font-weight: 800; margin-bottom: 50px; text-transform: uppercase; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background-color: var(--yellow-main); margin: 15px auto 0; }

/* --- ПЛАШКА --- */
.animated-banner { border-top: 1px solid var(--yellow-main); border-bottom: 1px solid var(--yellow-main); padding: 25px 20px; text-align: center; margin: 60px auto 20px auto; max-width: 900px; background: linear-gradient(90deg, rgba(32,32,32,0) 0%, rgba(42,42,42,0.8) 50%, rgba(32,32,32,0) 100%); opacity: 0; transform: scale(0.95); transition: opacity 0.8s ease, transform 0.8s ease; }
.animated-banner.visible { opacity: 1; transform: scale(1); }
.animated-banner h2 { color: var(--yellow-main); font-size: 26px; text-transform: uppercase; margin: 0; letter-spacing: 3px; font-weight: 700;}

/* --- СЛАЙДЕР И ГАЛЕРЕЯ --- */
.swiper { width: 100%; height: 380px; padding-bottom: 50px; }
.swiper-slide { border-radius: 8px; overflow: hidden; position: relative; height: 100%; }
.swiper-slide a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.swiper-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.swiper-slide:hover img { transform: scale(1.04); }

.swiper-pagination-bullet-active { background: var(--yellow-main) !important; }
.swiper-button-next, .swiper-button-prev { color: var(--yellow-main) !important; }

/* --- FAQ --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: #2a2a2a; margin-bottom: 15px; border-radius: 6px; overflow: hidden; border-left: 4px solid var(--gray-main); transition: 0.3s; }
.faq-item.active { border-left-color: var(--yellow-main); }
.faq-question { width: 100%; text-align: left; padding: 20px; background: none; border: none; color: var(--yellow-light); font-size: 18px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-family: 'Montserrat', sans-serif; }
.faq-question::after { content: '+'; font-size: 24px; color: var(--yellow-main); transition: 0.3s; }
.faq-item.active .faq-question::after { content: '×'; transform: rotate(90deg); }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.4s ease; color: var(--gray-light); }
.faq-item.active .faq-answer { max-height: 800px; padding-bottom: 20px; }
.faq-answer ul { padding-left: 20px; margin-top: 10px; }
.faq-answer p { margin-bottom: 10px; }

/* --- МОДАЛЬНЫЕ ОКНА --- */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 2000; justify-content: center; align-items: center; padding: 20px; }
.modal.active { display: flex; animation: fadeIn 0.3s; }
.modal-content { background: var(--gray-dark); padding: 40px; border-radius: 8px; width: 100%; position: relative; border: 1px solid #333; max-height: 90vh; overflow-y: auto; }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 36px; cursor: pointer; color: var(--gray-main); transition: 0.3s; line-height: 1; z-index: 10; font-family: sans-serif;}
.close-btn:hover { color: var(--yellow-main); }

/* Окно контактов */
.contact-modal-box { max-width: 650px; text-align: center; }
.contact-info h3 { color: var(--white); margin-bottom: 30px; font-size: 32px; font-weight: 800; }

.contact-phones-container { display: inline-flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; }

.copy-phone { font-size: 28px; font-weight: 700; color: var(--yellow-main); cursor: pointer; transition: 0.3s; position: relative; }
.copy-phone:hover { color: var(--yellow-light); }

.social-icons { display: flex; gap: 15px; }
.social-icon { 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    font-size: 24px; 
    text-decoration: none; 
    transition: 0.3s; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.3); 
    overflow: hidden;
}
.social-icon:hover { transform: scale(1.1); }

.icon-wa { background-color: #25d366; }
.icon-tg { background-color: #0088cc; }
.icon-max { background-color: transparent; }
.icon-max img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.contact-info p { margin-bottom: 15px; color: var(--white); font-size: 16px; font-weight: 700;}
.contact-info .desc-text { font-weight: 400; color: var(--gray-light); max-width: 500px; margin: 0 auto; line-height: 1.5;}

/* Тост (уведомление о копировании) */
#toast { visibility: hidden; min-width: 250px; background-color: var(--yellow-main); color: var(--gray-dark); text-align: center; border-radius: 8px; padding: 16px; position: fixed; z-index: 3000; left: 50%; transform: translateX(-50%); bottom: 30px; font-size: 16px; font-weight: 700; opacity: 0; transition: opacity 0.3s, bottom 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
#toast.show { visibility: visible; opacity: 1; bottom: 50px; }

.services-modal-box { max-width: 1000px; }
.services-modal-box h2 { text-align: center; color: var(--yellow-main); margin-bottom: 40px; font-size: 32px; text-transform: uppercase; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.service-card { background: #2a2a2a; padding: 25px 20px; border-radius: 6px; text-align: center; border: 1px solid #333; transition: 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.service-card:hover { border-color: var(--yellow-main); transform: translateY(-5px); }
.service-card i { font-size: 36px; color: var(--yellow-main); margin-bottom: 15px; transition: 0.3s; }
.service-card:hover i { transform: scale(1.1); color: var(--yellow-light); }
.service-card h3 { color: var(--white); font-size: 15px; font-weight: 700; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- ПОДВАЛ --- */
footer { background-color: #151515; padding: 30px 0; text-align: center; border-top: 1px solid #333; color: var(--gray-main); font-size: 14px; }

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 768px) {
    .header-box { flex-direction: column; gap: 15px; }
    header { padding: 15px 0; background-color: rgba(32, 32, 32, 0.95); }
    
    /* 1. ПРАВКА НАВИГАЦИИ: уменьшаем шрифт и отступы, убираем перенос слов */
    .nav-links { 
        gap: 10px; 
        font-size: 12px; 
        justify-content: center;
        width: 100%;
    }
    .nav-links a { 
        white-space: nowrap; /* Запрещает перенос фразы "О нас" на две строки */
    }

    /* 2. ПРАВКА ЗАГОЛОВКА HERO: добавляем боковые отступы и контролируем размер */
    .hero { padding-top: 200px; }
    .hero h1 { 
        font-size: 28px; 
        padding: 0 15px; /* Равномерный отступ слева и справа */
        word-wrap: break-word;
    }

    .animated-banner h2 { font-size: 16px; letter-spacing: 1px; }
    .swiper { height: 300px; }
    .contact-row { flex-direction: column; gap: 15px; margin-bottom: 25px;}
    .contact-phones-container { gap: 10px; width: 100%;}
}

/* Дополнительно для самых узких экранов (меньше 380px) */
@media (max-width: 380px) {
    .nav-links {
        font-size: 11px;
        gap: 6px;
    }
    .hero h1 {
        font-size: 24px;
    }
}