/* --- Глобальные переменные и стили --- */
:root {
    --main-red: #E53935;
    --dark-red: #C62828;
    --light-gray: #f5f5f5;
    --dark-gray: #212121;
    --text-color: #333;
    --font-family: 'Manrope', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-gray {
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 50px;
    color: var(--dark-gray);
}

.text-center {
    text-align: center;
}

/* --- Шапка --- */
.header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    /*border-bottom: 3px solid rgb(217, 0, 0);*/
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-image img {
    color: rgba(217, 0, 0, 1);
    height: 40px;
    width: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-gray);
    text-decoration: none;
}

.logo b {
    color: var(--main-red);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--main-red);
    transition: width 0.3s;
}

.nav-link:hover {
    color: var(--main-red);
}

.nav-link:hover::after {
    width: 100%;
}


/* --- Кнопки --- */
.cta-button, .cta-button-outline, .cta-button-header {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.cta-button {
    background-color: var(--main-red);
    color: white;
}

.cta-button:hover {
    background-color: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

.cta-button-outline {
    border-color: var(--main-red);
    color: var(--main-red);
}

.cta-button-outline:hover {
    background-color: var(--main-red);
    color: white;
}

.cta-button-header {
    background-color: var(--main-red);
    color: white;
    padding: 8px 20px;
}
.cta-button-header:hover {
    background-color: var(--dark-red);
}


/* --- Первый экран (Hero) --- */
.hero {
    height: 100vh;
    background-color: var(--light-gray); /* Основной светло-серый фон */
    /* Многослойный градиент для эффекта свечения */
    background-image:
            radial-gradient(ellipse at 50% 50%, rgba(229, 57, 53, 0.1) 0%, rgba(245, 245, 245, 0) 60%);

    color: var(--dark-gray); /* Меняем цвет текста на темный */
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    /* Добавляем тень для лучшей читаемости на светлом фоне */
    text-shadow: 0px 1px 3px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400; /* Делаем чуть жирнее для контраста */
    margin-bottom: 40px;
    color: #444; /* Слегка темнее основного текста */
}

/* --- Секция "О технологии" --- */
.small-text { font-size: 0.9rem; color: #777; margin-top: 20px;}
.small-text a { color: var(--main-red); }


/* --- Секция "Превью каталога" --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-image {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 20px;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--main-red);
    margin-bottom: 20px;
}

/* --- Секция "Выбор экспертов" --- */
.expert-card {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--light-gray);
    padding: 40px;
    border-radius: 10px;
}
.expert-image img {
    max-width: 100%;
    border-radius: 10px;
}
.expert-quote blockquote {
    font-size: 1.5rem;
    font-style: italic;
    border-left: 4px solid var(--main-red);
    padding-left: 20px;
    margin-bottom: 20px;
}
.expert-quote cite {
    font-weight: 700;
    display: block;
    margin-bottom: 20px;
}
.expert-context { color: #555; }

/* --- Контакты --- */
.contact-links {
    margin-top: 30px;
    font-size: 1.2rem;
}
.contact-links a {
    color: var(--main-red);
    text-decoration: none;
    font-weight: 600;
}
.contact-links a:hover {
    text-decoration: underline;
}

/* --- Подвал --- */
.footer {
    background-color: var(--dark-gray);
    color: white;
    padding: 40px 0;
}
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.footer .logo { color: white; }
.footer a { color: #ccc; text-decoration: none; }
.footer a:hover { color: white; }
.footer-stores { display: flex; flex-direction: column; gap: 10px; }
.footer-copy { text-align: right; font-size: 0.9rem; color: #aaa;}


/* --- Адаптивность --- */
@media (max-width: 992px) {
    .expert-card { flex-direction: column; text-align: center; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .nav { display: none; } /* Скрытие навигации для мобилок, позже можно добавить бургер-меню */
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    .product-grid { grid-template-columns: 1fr; }
    .footer .container { flex-direction: column; text-align: center; gap: 20px;}
    .footer-copy { text-align: center; }
}

/* --- Стили для страницы каталога и других внутренних страниц --- */

.page-header {
    padding: 120px 0 60px 0;
    background-color: var(--light-gray);
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
}

.catalog-section {
    padding: 80px 0;
}

/* Переопределяем сетку для каталога для лучшей адаптивности */
.catalog-grid {
    display: grid;
    /* Эта строка автоматически подбирает кол-во колонок в зависимости от ширины экрана */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Стиль для активной ссылки в меню */
.nav-link.active {
    color: var(--main-red);
}

.nav-link.active::after {
    width: 100%;
}

/* --- Стили для страницы товара --- */

.product-page-section {
    padding-top: 120px; /* Отступ от фиксированной шапки */
    padding-bottom: 80px;
}

.product-page-layout {
    display: flex;
    gap: 50px;
    margin-bottom: 80px;
}

.product-gallery {
    flex: 1 1 55%; /* Занимает чуть больше половины */
}

.main-image img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #eee;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: border-color 0.3s;
}

.thumbnail:hover, .thumbnail.active {
    border-color: var(--main-red);
}


.product-info {
    flex: 1 1 45%; /* Занимает оставшееся место */
}

.product-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

.product-short-description {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 25px;
}

.product-price-large {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--main-red);
    margin-bottom: 30px;
}

.buy-buttons-container {
    margin-bottom: 30px;
}

.buy-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.buy-button-primary, .buy-button-secondary {
    display: block; /* Растягиваем на всю ширину колонки */
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.1rem;
    padding: 15px;
}

.key-features {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.feature-item {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

/* --- Секция с деталями под основной --- */
.product-details-section {
    max-width: 900px; /* Делаем текстовый контент чуть уже для читаемости */
    margin: 0 auto;
}

.details-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.spec-table tr td:first-child {
    font-weight: 600;
    color: #555;
    width: 40%;
}

.spec-table tr:nth-child(even) {
    background-color: var(--light-gray);
}

.advantages-list, .package-list, .application-list {
    list-style-position: inside;
    padding-left: 0;
}
.advantages-list li, .package-list li, .application-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.learn-more-link {
    display: inline-block;
    margin-top: 20px;
    font-weight: 600;
    color: var(--main-red);
    text-decoration: none;
}
.learn-more-link:hover {
    text-decoration: underline;
}

/* --- Адаптивность для страницы товара --- */
@media (max-width: 992px) {
    .product-page-layout {
        flex-direction: column;
    }
}

/* --- Секция "Где купить" --- */
.where-to-buy {
    background-color: var(--light-gray);
    padding: 60px 0;
}

.where-to-buy-subtitle {
    max-width: 600px;
    margin: -30px auto 40px auto;
    font-size: 1.1rem;
    color: #555;
}

.store-buttons-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.store-button {
    display: inline-block;
    text-decoration: none;
    color: white;
    font-size: 1.2rem;
    padding: 20px 40px;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 300px;
}

.store-button span {
    display: block;
}

.store-button b {
    display: block;
    font-size: 1.5rem;
    margin-top: 5px;
}

.store-button-tochka {
    background-color: var(--main-red); /* Основной, приоритетный */
}
.store-button-tochka:hover {
    background-color: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.store-button-ozon {
    background-color: #4A4A4A; /* Второстепенный */
}
.store-button-ozon:hover {
    background-color: var(--dark-gray);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Обновленный футер */
.footer-stores a {
    margin: 0 10px;
}

/* --- Стили для страницы-руководства --- */

.content-container {
    max-width: 800px; /* Узкий контент легче читать */
}

.content-container h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    margin-top: 40px;
}

.content-container h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    margin-top: 25px;
}

.steps-list {
    list-style-type: none;
    counter-reset: step-counter;
    padding-left: 0;
}

.steps-list li {
    counter-increment: step-counter;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
}

.steps-list li::before {
    content: counter(step-counter);
    margin-right: 15px;
    background-color: var(--main-red);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
}

.content-divider {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 50px 0;
}

.important-note {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-left: 5px solid #ffe58f;
    padding: 20px;
    border-radius: 5px;
    margin-top: 30px;
}
.important-note h4 {
    margin-top: 0;
}

/* --- Стили для акцентной ссылки в футере --- */
.footer-stores a.priority-link {
    color: #ffffff; /* Делаем ее чисто белой, в отличие от остальных ссылок */
    font-weight: 600;  /* Делаем ее полужирной */
    transition: all 0.3s;
}

.footer-stores a.priority-link:hover {
    /* Можно добавить эффект при наведении, например, легкое свечение */
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* --- Стили для карточки магазина в секции "Где купить" --- */
.store-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center; /* Выравниваем по центру по вертикали */
    gap: 30px;
    flex-wrap: wrap;
}

.store-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.store-card--primary {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.store-card--primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    border-color: #cccccc;
}

.store-card .store-caption {
    font-size: 0.9rem;
    color: #555;
    margin-top: 12px;
    margin-bottom: 0;
}

/* --- Стили для обновленной секции контактов --- */
.contact-columns {
    display: flex;
    justify-content: space-between;
    gap: 50px; /* Расстояние между колонками */
    text-align: left;
    margin-top: 50px;
}

.contact-column {
    flex: 1; /* Колонки занимают равное пространство */
    min-width: 0;
}

.contact-column h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.contact-column p {
    margin-bottom: 20px;
}

.contact-column .cta-button-outline {
    border-color: var(--dark-gray);
    color: var(--dark-gray);
}
.contact-column .cta-button-outline:hover {
    background-color: var(--dark-gray);
    color: white;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .contact-columns {
        flex-direction: column; /* Ставим колонки друг под друга */
        text-align: center;
    }
    .contact-column {
        margin-bottom: 30px;
    }
    .contact-column:last-child {
        margin-bottom: 0;
    }
}

/* --- Стили для обновленной секции "Технология" --- */

/* Сначала описываем, как все выглядит на мобильных (по умолчанию) */
.technology-layout {
    display: flex;
    flex-direction: column; /* Все блоки идут друг под другом */
    align-items: center; /* Центрируем по горизонтали */
    text-align: center;
}

.technology-text {
    order: 1; /* Текст - первый */
}

.technology-image {
    order: 2; /* Картинка - вторая */
    margin: 30px 0;
}
.technology-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
}

.technology-cta {
    order: 3; /* Кнопка - третья */
}

.technology-text h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--main-red);
}

.learn-more-tech {
    border-color: var(--dark-gray);
    color: var(--dark-gray);
}
.learn-more-tech:hover {
    background-color: var(--dark-gray);
    color: white;
}


/* Теперь описываем, как все выглядит на больших экранах (десктоп) */
@media (min-width: 769px) {
    .technology-layout {
        display: grid; /* Включаем Grid-раскладку */
        grid-template-columns: 1fr 0.8fr; /* Две колонки, правая чуть меньше */
        grid-template-areas:  /* Рисуем схему расположения блоков */
                "text image"
      "cta image";
        gap: 0 50px; /* Расстояние между колонками */
        align-items: center;
        text-align: left;
    }

    /* Распределяем наши блоки по нарисованной схеме */
    .technology-text { grid-area: text; }
    .technology-image { grid-area: image; margin: 0; }
    .technology-cta { grid-area: cta; margin-top: 20px; }
}

/* --- Стили для интерактивной цитаты в секции "Выбор экспертов" --- */
.original-quote {
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    background-color: #f9f9f9;
}

.original-quote summary {
    padding: 12px 15px;
    cursor: pointer;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-color);
}

.original-quote summary::-webkit-details-marker {
    display: none; /* Убираем стандартный маркер-треугольник */
}

.summary-chevron {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-style: solid;
    border-width: 0 2px 2px 0;
    border-color: var(--text-color);
    transform: rotate(45deg);
    transition: transform 0.3s;
}

.original-quote[open] > summary .summary-chevron {
    transform: rotate(-135deg);
}

.original-quote-content {
    padding: 0 15px 15px 15px;
    border-top: 1px solid #eee;
}

.original-quote-content p {
    margin-top: 15px;
    margin-bottom: 15px;
    color: #555;
    font-size: 0.9rem;
}

.original-quote-content a {
    font-weight: 600;
    color: var(--main-red);
    text-decoration: none;
}

.original-quote-content a:hover {
    text-decoration: underline;
}

/* --- Стили для карусели экспертов --- */
.expert-carousel-container {
    width: 100%;
    padding: 0 40px; /* Отступ для стрелок */
    margin-top: 50px;
    margin-bottom: 30px;
    position: relative;
}

.expert-slide {
    display: flex; /* Для центрирования содержимого в слайде */
    justify-content: center;
    align-items: center;
}

/* Переопределяем стили для кнопок навигации Swiper */
.expert-swiper-prev, .expert-swiper-next {
    color: var(--main-red) !important;
    width: 40px;
    height: 40px;
}

.expert-swiper-prev:hover, .expert-swiper-next:hover {
    /*background-color: var(--main-red);*/
    color: black !important;
}

/* Общие стили для expert-context */
.expert-context-general {
    text-align: center;
    max-width: 800px;
    margin: 30px auto 0 auto;
    font-size: 1.1rem;
    color: #555;
}

/* Стили для обложки видео в карусели */
.expert-video-thumbnail {
    position: relative;
    cursor: pointer;
}
.expert-video-thumbnail img {
    border-radius: 10px;
}
.expert-video-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Клик должен проходить на ссылку */
    z-index: 10;
}
.expert-video-thumbnail .play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent var(--main-red);
    margin-left: 5px;
}

.nav-link.active {
    cursor: default; /* Активные ссылки дважды нельзя кликнуть */
}
