/* Стили страницы статьи. Источник — макет single-article.
   Правится только здесь; те же классы использует редактор в админке
   (подгружается в холст TinyMCE), поэтому автор видит блоки как на сайте. */

/* ==========================================================================
   КОНТЕЙНЕР СТАТЬИ И СЕТКА (Ширина 1000px по центру)
   ========================================================================== */

/* В макете здесь стоял Montserrat на body. Шрифт не переносим: сайт набран Circe,
   и статья в другом шрифте выглядела бы чужой страницей, плюс это лишний веб-шрифт
   на загрузку. Размеры и начертания из макета сохранены. */


.vz-article-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    box-sizing: border-box;
}

/* Двухколоночный макет статьи */
.vz-article-body-layout {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

/* Основная колонка с текстом */
.vz-article-content {
    flex: 1;
    min-width: 0; /* Важно: предотвращает раздувание сетки из-за таблиц */
}

/* Боковая колонка с оглавлением */
.vz-article-sidebar {
    width: 300px;
    position: sticky;
    top: 24px; /* Фиксация оглавления при скролле */
}

/* ==========================================================================
   1, 2, 3. ЗАГОЛОВОК, ИЗОБРАЖЕНИЕ И МЕТА-ДАННЫЕ
   ========================================================================== */

.vz-article-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 24px;
    color: #0f172a;
}

.vz-article-main-image-wrapper {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    /* Картинки статей в базе небольшие (типичная — 519px по ширине). В макете
       здесь стояло width:100%, и такая картинка растягивалась вдвое, превращаясь
       в мыло. Поэтому не увеличиваем сверх оригинала, а центрируем. */
    text-align: center;
}

.vz-article-main-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 520px;
    display: inline-block;
    object-fit: cover;
}

/* Блок мета-данных статьи */
.vz-article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    /*border-bottom: 1px solid #e2e8f0;*/
    margin-bottom: 32px;
    font-size: 14px;
    color: #64748b;
    border-radius: 8px;
}

.vz-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Стилизация и гибкое масштабирование SVG-иконок */
.vz-meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.vz-meta-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vz-meta-label {
    display: block;
    font-weight: 500;
}

.vz-meta-value {
    color: #334155;
    display: block;
    font-weight: 600;
}

/* ==========================================================================
   4. ОГЛАВЛЕНИЕ (TOC)
   ========================================================================== */

.vz-toc-box {
    background-color: #f7f5f8;
    border-radius: 8px;
    padding: 24px;
}

.vz-toc-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 16px;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vz-toc-list, 
.vz-toc-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vz-toc-list > li {
    margin-bottom: 10px;
}

.vz-toc-list a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.vz-toc-list a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.vz-toc-sublist {
    padding-left: 16px;
    margin-top: 6px;
}

.vz-toc-sublist li {
    margin-bottom: 6px;
}

/* ==========================================================================
   5. ТЕКСТ СТАТЬИ И ВНУТРЕННИЕ ЭЛЕМЕНТЫ
   ========================================================================== */

.vz-paragraph,
.vz-article-content > p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #334155;
    line-height: 1.6;
}

.vz-article-content a,
.vz-link {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border 0.2s;
}

.vz-article-content a:hover,
.vz-link:hover {
    border-bottom-color: #2563eb;
}

.vz-article-content h2,
.vz-heading-h2 {
    font-size: 26px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 18px;
    color: #0f172a;
}

.vz-article-content h3,
.vz-heading-h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 14px;
    color: #1e293b;
}

/* Цитаты */
.vz-blockquote {
    margin: 32px 0;
    padding: 20px 24px;

    line-height: 1.5;

    font-style: italic;
    color: #1e293b;
    border-radius: 0 8px 8px 0;
}

.vz-blockquote._yellow {
    border-left: 4px solid #ffd31a;
    background-color: #fffae6;
}

.vz-blockquote._violet {
    border-left: 4px solid #320059;
    background-color: #f6edfd;
}

/* Стилизованные списки */

.vz-article-content ul,
.vz-styled-list {
    margin-bottom: 24px;
    padding-left: 24px;
}

.vz-article-content ul li, 
.vz-styled-list li {
    margin-bottom: 10px;
    color: #334155;
    list-style-type: square;
}

/* Стилизованные таблицы */
.vz-table-wrapper {
    width: 100%;
    overflow-x: auto; /* Горизонтальный скролл на мобильных устройствах */
    margin: 32px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.vz-article-content table,
.vz-styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    text-align: left;
}

.vz-article-content th,
.vz-article-content td, 
.vz-styled-table th, 
.vz-styled-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.vz-article-content th,
.vz-styled-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #0f172a;
}

.vz-article-content tr:last-child td,
.vz-styled-table tr:last-child td {
    border-bottom: none;
}

.vz-article-content tr:hover,
.vz-styled-table tr:hover {
    background-color: #f8fafc;
}

/* Карточка товара для перелинковки */
.vz-product-card {
    display: flex;
    gap: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    margin: 40px 0;
    background: #ffffff;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.vz-product-image-box {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vz-product-image-box._horizontal {
    width: 100%;
    max-width: 340px;
    height: auto; 
}

.vz-product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.vz-product-image-box._horizontal .vz-product-img {
    heiaght: auto;
}

.vz-product-info {
    flex: 1;
}

.vz-product-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.vz-product-desc {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #64748b;
}

.vz-product-btn {
    display: inline-block;
    background-color: #ffd31a;
    color: #21003a !important;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
      border: none;
}

.vz-product-btn:hover {
  background-color: #ffe267;
    border-color: #ffd31a !important;
}

/* ==========================================================================
   6. ИНФОРМАЦИЯ ОБ АВТОРЕ
   ========================================================================== */

.vz-article-author-card {
    display: flex;
    gap: 24px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
    align-items: center;
}

.vz-author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e2e8f0;
}

.vz-author-name {
    font-weight: 700;
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 6px;
}

.vz-author-bio {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}


.vz-otro-blockquote {
  font-style:italic;
  color: #555555;
  padding: 18px 30px 18px 55px;
  border-left: 8px solid #ffd31a;
  line-height: 1.6;
  position: relative;
  background-color: #f7f5f8;
  margin: 0;
}

.vz-otro-blockquote::before{
  font-family:Arial;
  content: "\201C";
  color:#ffd31a;
  font-size:4em;
  position: absolute;
  left: 10px;
  top:-10px;
}

.vz-otro-blockquote::after{
  content: '';
}

.vz-otro-blockquote span{
  display:block;
  color:#333333;
  font-style: normal;
  font-weight: bold;
  margin-top:1em;
}


/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ЭКРАНОВ
   ========================================================================== */

   /* Родоначальник сетки товаров */
.vz-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Две колонки равной ширины */
    gap: 20px; /* Расстояние между карточками */
    margin: 40px 0;
}

/* Модификация карточки для двухколоночного режима */
.vz-products-grid .vz-product-card {
    display: flex;
    flex-direction: column; /* Элементы внутри карточки идут сверху вниз */
    align-items: center;
    text-align: center;
    margin: 0; /* Сбрасываем внешние отступы одиночной карточки */
    height: 100%; /* Чтобы карточки в ряду были одинаковой высоты */
    box-sizing: border-box;
}

/* Корректировка текстового блока внутри плитки */
.vz-products-grid .vz-product-info {
    display: flex;
    flex-direction: column;
    height: 100%; /* Прижимает кнопку к низу, если тексты разной длины */
}

.vz-products-grid .vz-product-desc {
    flex-grow: 1; /* Распределяет пространство, выравнивая кнопки по одной линии */
}

/* Адаптивность: на мобильных экранах карточки встанут в одну колонку */
@media (max-width: 650px) {
    .vz-products-grid {
        grid-template-columns: 1fr; /* Переключение на одну колонку */
        gap: 16px;
    }
}


@media (max-width: 900px) {
    .vz-article-body-layout {
        flex-direction: column-reverse; /* На планшетах оглавление уходит наверх */
    }
    .vz-article-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 32px;
    }
    .vz-article-container {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .vz-product-card {
        flex-direction: column; /* Карточка товара перестраивается в один столбец */
        text-align: center;
    }
    .vz-article-meta {
        flex-direction: column;
        gap: 12px;
    }
    .vz-article-title {
        font-size: 26px;
    }
}
