/* Общие стили новости */
.news-single {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.news-header {
    margin-bottom: 30px;
}

.news-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.news-meta time {
    margin-right: 20px;
}

.news-categories a {
    color: #E02E7A;
    text-decoration: none;
    margin-right: 10px;
}

.news-title {
    font-size: 2.5rem;
    margin: 0 0 20px;
}

.news-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.topPicture-block {
    /* Резервируем место для разделителя */
    margin-bottom: 40px; /* отступ после всего блока, можно регулировать */
    position: relative;
}

/* Центрируем саму картинку */
.topPicture-block img {
    display: block;
    margin: 0 auto;
}

/* Разделитель через ::after */
.topPicture-block::after {
    content: '';
    display: block;
    width: 100%;                /* или задай конкретную ширину, например 600px */
    height: 20px;              /* высота разделителя, подгони под картинку */
    margin: 20px auto 0;      /* отступ сверху от картинки и авто-центровка */
    background: url('../img/header.png') repeat center;
    background-size: contain;  /* или cover, auto — как нужно */
}

/* Блоки конструктора */
.block {
    margin: 40px 0;
}

.block:first-child {
    margin-top: 0;
}

.block h2, .block h3 {
    color: #1e1e1e;
}

/* Текст + изображение */
.block-text h2 {
    margin-bottom: 20px;
}

.block-text p {
    margin-bottom: 10px;
}

.block-text-image {
    display: flex;
    align-items: stretch;
}

.block-text-image.layout-right.has-vertical-border .block-text { /* Когда текст слева, картинка справа (layout-right) */
    border-left: 1px solid #dee2e6; /* линия справа от текста */
    padding-left: 54px;              /* отступ текста от линии (регулируйте) */
}
.block-text-image.layout-right.has-vertical-border .block-image {
    padding-right: 24px;               /* отступ картинки от линии */
}

.block-text-image.layout-left.has-vertical-border .block-image { /* Когда картинка слева, текст справа (layout-left) */
    border-right: 1px solid #dee2e6;   /* линия слева от картинки */
    padding-right: 54px;
}
.block-text-image.layout-left.has-vertical-border .block-text {
    padding-left: 24px;
}

.block-text-image {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.block-text-image.layout-right {
    flex-direction: row-reverse;
}

.block-text-image.layout-top{
    flex-direction: column-reverse;
    align-items: center;
}

.block-text-image.layout-bottom {
    flex-direction: column;
    align-items: center;
}

.block-text-image .block-text {
    flex: 1;
}

.block-text-image .block-image {
    flex: 1;
}

.block-text-image .block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Сертификаты  */

.col-12.px-0 {
    margin-bottom: -1px;
}

.certificate-block {
    display: flex;
    align-items: center;
    padding: 2rem;
    background: #fff;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    position: relative;
    z-index: 0;
}

.certificate-block:hover {
    box-shadow: 0 5px 25px 0 rgba(18, 25, 38, 0.1);
    border-color: transparent;
    z-index: 2;
}
.certificate-block:hover .certificate-block__title,
.certificate-block:hover .certificate-block__desc,
.certificate-block:hover .zoom-icon {
    color: inherit;
}

.certificate-block__image {
    flex: 0 0 13%;
    min-width: 100px;
    margin-right: 2rem;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-block__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Заглушка, когда нет превью */
.certificate-block__image-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
}

.certificate-block__info {
    flex: 1 1 auto;
    padding-right: 1rem;
    align-self: flex-start;
}

.certificate-block__action {
    flex: 0 0 auto;
    text-align: center;
    width: 60px;
}

.zoom-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #555;
    transition: 0.2s;
}
.zoom-icon:hover {
    color: #000;
    transform: scale(1.1);
}

.certificate-block__title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.certificate-block__desc p {
    margin-bottom: 0.25rem;
}

/* Кнопка */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.btn.fill {
    background: #E02E7A;
    color: #fff;
}

.btn.fill:hover {
    background: #c71f66;
}

.btn.outline {
    border-color: #E02E7A;
    color: #E02E7A;
    background: transparent;
}

.btn.outline:hover {
    background: #E02E7A;
    color: #fff;
}

/* Слайдер */
.news-slider {
    border-radius: 8px;
    overflow: hidden;
}

.news-slider .swiper-slide {
    position: relative;
}

.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 150px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Таймер */
.block-countdown {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.countdown-before, .countdown-after {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

.countdown-timer {
    font-size: 2.5rem;
    font-weight: 700;
    color: #E02E7A;
}

.countdown-timer span {
    background: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 0 5px;
}

/* Разделитель */
.divider-line {
    height: 1px;
    background: #dee2e6;
    margin: 40px 0;
}

.divider-space {
    height: 40px;
}

/* Адаптив */
@media (max-width: 768px) {
    .block-text-image {
        flex-direction: column !important;
    }
    .countdown-timer {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .certificate-block {
        flex-wrap: wrap;
        padding: 1.5rem;
    }
    .certificate-block__image {
        flex: 0 0 100%;
        min-width: auto;
        margin-right: 0;
        margin-bottom: 1rem;
        /*aspect-ratio: 16 / 9;*/      /* можно изменить под мобильные */
        max-height: 200px;
    }
    .certificate-block__info {
        flex: 0 0 100%;
        padding-right: 0;
        margin-bottom: 1rem;
    }
    .certificate-block__action {
        flex: 0 0 100%;
        text-align: center;
        width: auto;
    }
}

/* ===== АДАПТАЦИЯ СЛАЙДЕРА ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 767px) {

    /* Растягиваем весь слайдер на ширину экрана */
    .block-slider .swiper {
        width: 100%;
        max-width: 100vw;
        margin: 0 auto;
    }

    /* Каждый слайд — на всю ширину контейнера, высота автоматическая */
    .block-slider .swiper-slide {
        width: 100% !important;           /* перебиваем инлайн-стили Swiper */
        max-width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Изображения и picture внутри слайда — показываем полностью */
    .block-slider .swiper-slide img,
    .block-slider .swiper-slide picture {
        display: block;
        width: 100%;
        height: auto;
        max-height: 300px;                /* ограничиваем, чтобы не занимало весь экран */
        object-fit: contain;             /* показываем картинку целиком */
        border-radius: 8px;              /* по желанию */
    }

    /* Подпись под слайдом */
    .slide-caption {
    display: table;                 /* заставляет блок сжиматься по ширине текста */
    width: auto;
    max-width: 90%;
    text-align: left;
    left: auto;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.3;
    color: #333;
    background: rgba(255, 255, 255, 0.85);
    margin-top: 6px;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

    /* Кнопки-стрелки делаем компактнее */
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px;
    }

    /* Пагинация остаётся стандартной, но можно прижать ниже */
    .swiper-pagination {
        bottom: 8px;
    }
}