/* Базовые сбросы и универсальные шрифты */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    background-color: #f9fafb;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-align: center;
}

.btn-primary {
    background-color: #4f46e5; /* Универсальный яркий акцент */
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-buy {
    background-color: #10b981; /* Зеленый акцент для покупки */
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-buy:hover {
    background-color: #059669;
}

.btn:active {
    transform: scale(0.98);
}

/* Заголовки секций */
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
}

/* Блок 1: Шапка */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #4f46e5;
}

.phone-link {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1f2937;
    transition: color 0.2s;
}

.phone-link:hover {
    color: #4f46e5;
}

/* Блок 2: Баннер с зацикленным видео */
.hero-banner {
    position: relative;
    background-color: #111827;
    width: 100%;
    /* Используем современное свойство, чтобы блок ВСЕГДА держал пропорции видео 16:9 */
    aspect-ratio: 16 / 9; 
    color: #ffffff;
    text-align: center;
    overflow: hidden;
    
    /* Флекс-боксы для идеального центрирования текста строго по центру кадра */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Видео теперь встает ровно тютелька в тютельку, без растяжений и обрезок */
.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.65); /* Оптимальное затемнение для читаемости */
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 850px;
    width: 100%;
    padding: 0 40px;
}

.hero-title {
    font-size: 3rem; /* Крупный красивый заголовок */
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.disclaimer {
    margin-top: 30px;
    padding: 20px 25px;
    background: rgba(17, 24, 39, 0.8);
    border-left: 4px solid #4f46e5;
    border-radius: 12px;
    font-size: 0.95rem;
    text-align: left;
    line-height: 1.6;
    backdrop-filter: blur(10px); /* Красивое размытие деталей стола под плашкой */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Адаптив под мобильные телефоны */
@media (max-width: 768px) {
    .hero-banner {
        /* На смартфонах экран узкий, поэтому убираем жесткие 16:9, чтобы текст поместился */
        aspect-ratio: auto;
        padding: 60px 0;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .disclaimer {
        font-size: 0.85rem;
        padding: 15px;
    }
}

.disclaimer a {
    color: #818cf8;
    text-decoration: underline;
}

.price-tag {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    color: #34d399;
    font-size: 1.1rem;
}

/* Блок 3: Товары */
.products-section {
    padding: 80px 0;
    background-color: #f9fafb; /* Мягкий светлый фон */
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: #ffffff; /* Чистый белый цвет для контраста */
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Стили для реальных картинок товаров */
.product-image {
    width: 100%;
    height: 220px;       /* Фиксированная высота, чтобы все карточки были одинаковыми */
    object-fit: cover;   /* Картинка аккуратно заполняет область, излишки незаметно подрезаются */
    object-position: center; /* Центрируем изображение товара */
    border-bottom: 1px solid #e5e7eb;
}

.product-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.product-desc {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 24px;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #4f46e5;
}

/* Блок 7: Контакты с фоновым изображением */
.contacts-section {
    padding: 100px 0; /* Увеличили отступы, чтобы фоновое фото смотрелось масштабно */
    position: relative;
    background-color: #111827; /* Темная подложка на случай, если картинка долго грузится */
    
    /* Подключаем локальную картинку */
    background-image: url('contacts-bg.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Для мобильных это самый стабильный режим */
}

/* Создаем затемняющий слой поверх картинки, чтобы контакты легко читались */
.contacts-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.75); /* Плотное красивое затемнение в цвет темы */
    z-index: 1;
}

/* Поднимаем контейнер с содержимым выше затемняющего слоя */
.contacts-section .container {
    position: relative;
    z-index: 2;
}

/* Делаем заголовок секции белым, так как фон стал темным */
.contacts-section .section-title {
    color: #ffffff;
    margin-bottom: 50px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Стили самой карточки с контактами */
.contacts-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.65); /* Белая плашка с легкой прозрачностью */
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px); /* Трендовый эффект размытия фона за карточкой */
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: 1px solid #e5e7eb; /* Элегантная разделительная линия */
    padding-bottom: 14px;
}

.contact-item:last-child {
    border-bottom: none; /* Убираем линию у последнего элемента */
    padding-bottom: 0;
}

.contact-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.contact-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    transition: color 0.2s ease;
}

/* Интерактивный ховер для ссылок */
a.contact-value:hover {
    color: #4f46e5; /* Окрашивание в наш фирменный цвет при наведении */
}

/* Блок 8: Подвал */
.footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 30px 0;
    font-size: 0.9rem;
    border-top: 1px solid #374151;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link:hover {
    color: #ffffff;
}

/* Адаптивность для мобильных */
@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}
/* Блок 4: Текстовый блок */
.text-block-section {
    padding: 80px 0;
    background-color: #f3f4f6; /* Контрастный серый (затемненный) фон */
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.text-block-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.text-block-content h2 {
    font-size: 1.75rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.text-block-content p {
    font-size: 1.05rem;
    color: #4b5563;
    margin-bottom: 16px;
    line-height: 1.7;
}

/* Блок 5: Вопрос-ответ (Аккордеон) */
.faq-section {
    padding: 80px 0;
    background-color: #f9fafb;
}

.faq-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.faq-question:hover {
    background-color: #f3f4f6;
}

.faq-icon {
    font-size: 1.4rem;
    color: #4f46e5;
    transition: transform 0.2s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 24px;
    background-color: #fafafa;
}

.faq-answer p {
    color: #4b5563;
    padding-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Класс для анимации раскрытия через JS */
.faq-item.active .faq-answer {
    max-height: 300px; /* Запас высоты для контента */
    padding-top: 10px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg); /* Превращает плюс в крестик при открытии */
    color: #ef4444;
}

/* Блок 6: Партнеры */
.partners-section {
    padding: 80px 0;
    background-color: #f3f4f6; /* Контрастный серый (затемненный) фон */
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    justify-content: center;
}

/* Также немного обновим саму рамку, чтобы картинка плотно прилегала к краям */
.partner-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px; /* Немного увеличили высоту для лучшего обзора */
    border: 2px dashed #d1d5db; 
    border-radius: 8px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    padding: 0; /* Убрали внутренние отступы, чтобы картинка была крупной */
    overflow: hidden; /* Чтобы края картинки не вылезали за рамку */
}

/* При наведении картинка становится цветной и яркой */
.partner-link:hover .partner-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* Новые стили для картинок-логотипов партнеров */
.partner-logo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Картинка заполнит всю рамку без искажения пропорций */
    object-position: center;
    border-radius: 6px; /* Легкое скругление углов самой картинки */
    filter: grayscale(100%); /* Оставляем стильный ч/б эффект */
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* При наведении картинка партнера становится яркой и цветной */
.partner-link:hover .partner-logo {
    filter: grayscale(0%);
    opacity: 1;
}
