/* === TVS Media — Кастомные стили (v5.0, безопасно для Helix Ultimate) === */

/* === TVS Media — Вёрстка 3 колонки (Helix Ultimate, без SP Page Builder) === */

/* Гибкая вёрстка для body-контейнера */
.layout-body {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

/* Основной контент и колонки */
.component-body,
.sidebar-left,
.sidebar-right {
    flex: 1;
    min-width: 280px;
}

/* Если есть левая и правая колонки — задаём явную ширину */
.sidebar-left,
.sidebar-right {
    flex: 0 0 25%;
    max-width: 25%;
}

.component-body {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Если только правая колонка (без левой) — 75% / 25% */
.layout-body .component-body:not(:has(.sidebar-left)) {
    flex: 0 0 75%;
    max-width: 75%;
}

.layout-body .sidebar-right:not(:has(.sidebar-left)) {
    flex: 0 0 25%;
    max-width: 25%;
}

/* На планшетах: 2 колонки */
@media (max-width: 992px) {
    .layout-body {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .component-body,
    .sidebar-left,
    .sidebar-right {
        flex: 1 1 calc(50% - 12px);
        max-width: 50%;
        margin-bottom: 20px;
    }

    /* Если только правая колонка — 100% на мобильных */
    .sidebar-right {
        flex: 1 1 100%;
        max-width: 100%;
        order: 2;
    }

    .component-body {
        flex: 1 1 100%;
        order: 1;
    }
}

/* На мобильных — одна колонка */
@media (max-width: 768px) {
    .layout-body {
        flex-direction: column;
    }

    .component-body,
    .sidebar-left,
    .sidebar-right {
        width: 100% !important;
        max-width: 100%;
        flex: none;
        margin-bottom: 20px;
    }

    .sidebar-right {
        order: 2;
    }

    .component-body {
        order: 1;
    }
}




/* --- 1. Заголовки (только контент) --- */
.item-page h2,
.blog-items .blog-item h2,
.item-page .com-content article h2 {
    color: #003366;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.8em;
    border-bottom: 2px solid #003366;
    padding-bottom: 8px;
    display: inline-block;
}

.item-page h3,
.blog-items .blog-item h3,
.item-page .com-content article h3 {
    color: #0055a4;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 1.4em;
}

/* --- 2. Кнопка "Подробнее" --- */
.btn-tvs,
.readmore,
a.readmore {
    display: inline-block;
    padding: 12px 24px;
    background-color: #FFFFFF;
    color: #003366 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 51, 102, 0.2);
    transition: all 0.3s ease;
    border: 1px solid #002a52;
    text-align: center;
    min-width: 120px;
    margin-top: 10px;
}

.btn-tvs:hover,
.readmore:hover {
    background-color: #0055a4;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 85, 164, 0.3);
    transform: translateY(-1px);
    border-color: #004080;
}

/* --- 3. Карточки новостей --- */
.blog-items .blog-item {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 51, 102, 0.08);
}

.blog-items .blog-item:hover {
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.12);
}

.blog-items .blog-title a {
    color: #003366 !important;
    font-weight: 600;
    font-size: 1.3em;
    text-decoration: none;
}

.blog-items .blog-title a:hover {
    color: #0055a4 !important;
    text-decoration: underline;
}

/* --- 4. Изображения (только контент) --- */
.item-page img,
.blog-items img,
.blog-item img,
.com-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* --- 5. Полная защита мегаменю от любых квадратов/фонов --- */
.sp-megamenu,
.sp-menu-column,
.sp-menu-row,
.sp-menu-item,
.sp-dropdown {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sp-megamenu a,
.sp-menu-item a {
    color: inherit !important;
    text-decoration: none !important;
}

.sp-megamenu a:hover,
.sp-menu-item a:hover {
    color: inherit !important;
    background: transparent !important;
}

/* --- 6. Хлебные крошки --- */
.mod-breadcrumbs {
    background: #e9ecef;
    border-radius: 6px;
    padding: 8px 16px;
    margin: 10px 0 20px 0;
    font-size: 0.9em;
}

.mod-breadcrumbs a {
    color: #0055a4;
}

/* --- 7. Рекламные блоки --- */
.ad-block {
    margin: 20px 0;
    text-align: center;
    overflow: hidden;
}

.ad-block img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: transform 0.2s;
}

.ad-block img:hover {
    transform: scale(1.02);
}

/* --- 8. Адаптивность --- */
@media (max-width: 768px) {
    .item-page h2,
    .blog-items .blog-item h2 {
        font-size: 1.5em;
        border-bottom-width: 1px;
        padding-bottom: 6px;
    }

    .btn-tvs,
    .readmore,
    a.readmore {
        width: 100%;
        box-sizing: border-box;
        margin-top: 16px;
        text-align: center;
    }

    .blog-items .blog-item {
        padding: 16px;
    }
}