/*
 * Блоки главной: сертификат, доставка, отзывы, видео, вопросы.
 * Разметка — inc/home-blocks.php.
 */

.hb{
    --hb-accent: #ed7c23;
    --hb-accent-dark: #c96a19;
    --hb-text: #2B2620;
    --hb-muted: #5A5148;
    --hb-cream: #F6F1E8;
    --hb-border: #E6DDCE;

    padding: 60px 0;
}
.hb .container{ max-width: 1320px; }

.hb-title{
    margin: 0 0 26px;
    font-size: 32px;
    line-height: 1.25;
}
/* Заголовок блока доставки у образца мельче и капслоком. */
.hb-delivery .hb-title{
    margin-bottom: 40px;
    font-size: 25px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
    color: #282828;
}

/* ============ Сертификат ============ */
/* Размеры, цвета и радиусы перенесены с блока evrovideo.ru как есть:
   оранжевая плашка #ed7c23, заголовок 30px капслоком, поля 60px с радиусом 10. */

/* Фото девушки стоит на нижней границе секции — как в макете, поэтому
   снизу секцию не отбиваем. */
.hb-cert{ background: none; padding-bottom: 0; }
.hb-cert_grid{
    display: grid;
    grid-template-columns: minmax(0, 445px) minmax(0, 1fr);
    align-items: end;
    gap: 60px;
    margin-top: -16px;
}
.hb-cert_photo{ align-self: end; }
.hb-cert_photo img{
    display: block;
    width: 100%;
    height: auto;
}
/* Правая колонка выровнена по центру: так плашка, заголовок и форма
   собираются в одну ось. */
.hb-cert_body{
    max-width: 560px;
    padding-bottom: 40px;
    text-align: center;
}

.hb-cert_badge{
    display: inline-block;
    margin-bottom: 28px;
    padding: 10px 40px;
    border-radius: 8px;
    background: #ed7c23;
    color: #fff;
    font-size: 42px;
    font-weight: 500;
    line-height: 1.25;
    text-transform: uppercase;
    white-space: nowrap;
}
.hb-cert_lead{
    margin: 0 0 22px;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
    color: #000;
}
.hb-cert_lead span{ color: #ed7c23; }
.hb-cert_note{
    margin: 0 0 24px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.55;
    text-transform: uppercase;
    color: #000;
}
.hb-cert_done{
    max-width: 460px;
    margin: 0 auto;
    padding: 16px 20px;
    border-radius: 10px;
    background: #f9f9f9;
    border: 1px solid #cad2dd;
    font-weight: 500;
}

/* Ловушка для роботов: убираем из потока, но не display:none —
   часть ботов такие поля пропускает. */
.hb-form_trap{
    position: absolute;
    left: -5000px;
    height: 0;
    overflow: hidden;
}

.hb-form{ max-width: 460px; margin: 0 auto; }
.hb-form_field input{
    width: 100%;
    height: 60px;
    padding: 0 16px;
    border: 1px solid #cad2dd;
    border-radius: 10px;
    background: #f9f9f9;
    font: inherit;
    font-size: 16px;
    font-weight: 400;
    color: #000;
}
.hb-form_field input::placeholder{ color: rgba(0,0,0,.5); }
.hb-form_field input:focus{ outline: none; border-color: #ed7c23; }

.hb-form_check{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    color: #000;
    text-align: left;
    cursor: pointer;
}
.hb-form_check a{ color: #ed7c23; text-decoration: underline; }
/* Тема прячет все чекбоксы (display:none) и рисует свои только в своих
   формах — здесь возвращаем настоящий квадратик. */
.hb-form_check input[type="checkbox"],
.sub-form_check input[type="checkbox"]{
    display: inline-block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    opacity: 1;
    visibility: visible;
    position: static;
    -webkit-appearance: checkbox;
            appearance: checkbox;
    accent-color: #ed7c23;
}

.hb-form_submit{
    width: 100%;
    height: 60px;
    border: 0;
    border-radius: 10px;
    background: #ed7c23;
    color: #fff;
    font: inherit;
    font-size: 22px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: .3s ease all;
}
.hb-form_submit:hover{ background: #282828; color: #fff; }

/* ============ Доставка ============ */
/* Подписи капслоком, круглая плашка и оранжевые иконки — параметры блока
   evrovideo.ru. Своей подложки нет: секция идёт на общем фоне страницы. */

/* Курьер стоит на нижней границе секции — снизу её не отбиваем. */
.hb-delivery{ background: none; padding-bottom: 0; }
.hb-delivery_photo{ align-self: end; }
.hb-delivery_photo img{
    display: block;
    width: 100%;
    height: auto;
    max-width: 313px;
    margin: 0;
}
.hb-delivery_grid{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 313px);
    align-items: center;
    gap: 80px;
}
.hb-delivery_list{
    margin: 0 0 34px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 26px;
}
.hb-delivery_list li{
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 18px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #282828;
}
.hb-delivery_icon{ flex: 0 0 40px; line-height: 0; }
.hb-delivery_icon svg{ width: 40px; height: 40px; }
.hb-delivery_icon svg rect{ fill: #ed7c23; }

/* Вместо плашки со стоимостью — кнопка вызова курьера. */
.hb-delivery_btn{
    display: inline-block;
    padding: 20px 36px;
    border-radius: 10px;
    background: #ed7c23;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none;
    transition: background .2s;
}
.hb-delivery_btn:hover{ background: #c96a19; color: #fff; }
.hb-delivery_photo{ text-align: center; }
.hb-delivery_caption{
    margin: 0;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.1;
    color: #ed7c23;
}

/* ============ Отзывы ============ */
/* Карусель на Swiper: с бесконечной прокруткой и стрелками. */

.hb-reviews{ padding-bottom: 0; padding-top: 90px; }
.hb-video{ padding-top: 30px; margin-bottom: 30px; }

/* Полосу фона тянем во всю ширину экрана: сами блоки лежат в контейнере
   Elementor, и без этого подложка обрывается по краям текста. */
.hb.bg-smoke{
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.hb.bg-smoke > .container{ margin-left: auto; margin-right: auto; }

.elementor-element-aa9ecde .sec-title{ margin-top: -30px; }
.ba-hint{ margin-bottom: 0; }

/* Рядом с вопросами стоял блок счётчиков, его убрали — колонка с FAQ
   осталась в половину ширины, растягиваем на всю. */
.elementor-element-a8c3493{ width: 100%; }

/* У контейнера с вопросами свой фон из Elementor — он красит и пустое место
   над секцией, из-за чего серая полоса наезжает на блок с командой.
   Фон оставляем только самой секции. */
/* !important — потому что Elementor пишет свой фон селектором
   .elementor-10 .elementor-element.elementor-element-11675a8. */
.elementor-element-11675a8{ background-color: transparent !important; }

/* Заголовок слева, стрелки справа — одной строкой над лентой. */
.hb-reviews_head{
    display: flex;
    /* По верхнему краю: заголовок в две строки не должен сдвигать стрелки —
       они остаются на уровне первой строки. */
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 26px;
}
/* Заголовку разрешаем сжиматься и переноситься — иначе стрелки
   не помещаются в строку и уезжают под него. */
.hb-reviews_head .hb-title{ flex: 1 1 auto; min-width: 0; }
.hb-reviews_nav{ flex: 0 0 auto; }
.hb-reviews .hb-title{ margin: 0; text-align: left; }

/* Лента во всю ширину экрана: секция ограничена контейнером, поэтому
   растягиваем слайдер на весь вьюпорт и гасим края маской — карточки
   у границ экрана растворяются, а не обрезаются. */
.hb-reviews_slider{
    position: relative;
    padding: 0 0 10px;
}
.hb-reviews_slider .swiper-wrapper{ align-items: stretch; }

/* Селектор с классом слайда: у Swiper свои .swiper-slide{width:100%;display:block},
   и его файл подключается позже — без этого карточка растягивается на экран,
   а аватар уезжает под текст. */
/* Ширину слайда считает Swiper (slidesPerView), но display и высоту
   у .swiper-slide надо перебить: его файл подключается позже. */
.hb-reviews_slider .hb-review.swiper-slide{
    display: flex;
    align-items: flex-start;
    height: auto;
}
.hb-review{
    display: flex;
    align-items: flex-start;
    gap: 20px;
    height: auto;
    padding: 25px 25px 30px;
    border-radius: 12px;
    background: rgba(144,144,144,.1);
    box-sizing: border-box;
}
/* Тема задаёт всем картинкам height:auto — поэтому размер аватара
   закрепляем селектором посильнее, иначе портрет растягивается по карточке. */
.hb-review .hb-review_avatar{
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}
.hb-review_body{ min-width: 0; }

/* Стрелки: свои, чтобы не тащить иконочный шрифт Swiper. */
.hb-reviews_nav{
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0;
}
.hb-reviews_prev,
.hb-reviews_next{
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: #ed7c23;
    cursor: pointer;
    transition: background .2s;
    position: relative;
}
.hb-reviews_prev:hover,
.hb-reviews_next:hover{ background: #282828; }
.hb-reviews_prev:before,
.hb-reviews_next:before{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}
.hb-reviews_next:before{
    margin-left: -4px;
    transform: rotate(-135deg);
}

/* ============ Видео ============ */

.hb-video_grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}
/* Ролик открывается в лайтбоксе (GLightbox): три встроенных плеера
   тянули бы за собой чужие скрипты на каждой загрузке главной. */
.hb-video_item{
    position: relative;
    display: block;
    padding-top: 56.25%;
    border-radius: 15px;
    overflow: hidden;
    background: var(--hb-cream) center/cover no-repeat;
}
.hb-video_item:before{
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(43,38,32,.6) 0%, rgba(43,38,32,.1) 60%);
    transition: background .25s;
}
.hb-video_item:hover:before{ background: linear-gradient(0deg, rgba(43,38,32,.7) 0%, rgba(43,38,32,.25) 60%); }

.hb-video_play{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    transition: transform .2s;
}
.hb-video_play svg{ width: 100%; height: 100%; }
.hb-video_play circle{ fill: rgba(237,124,35,.9); }
.hb-video_item:hover .hb-video_play{ transform: scale(1.08); }

.hb-video_label{
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 6px rgba(43,38,32,.5);
}

/* ============ Вопросы ============ */

.hb-faq .hb-title{ text-align: center; }
.hb-faq_list{ display: grid; gap: 10px; }
.hb-faq_item{
    border-radius: 16px;
    background: var(--hb-accent);
    color: #fff;
    overflow: hidden;
}
.hb-faq_item summary{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    list-style: none;
}
.hb-faq_item summary::-webkit-details-marker{ display: none; }
/* Плюс из двух полосок: у открытого блока вертикальная прячется. */
.hb-faq_item summary:after{
    content: '';
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    background:
        linear-gradient(#fff, #fff) center/24px 2px no-repeat,
        linear-gradient(#fff, #fff) center/2px 24px no-repeat;
    transition: transform .2s;
}
.hb-faq_item[open] summary:after{
    background: linear-gradient(#fff, #fff) center/24px 2px no-repeat;
    transform: rotate(180deg);
}
.hb-faq_answer{
    padding: 0 24px 20px;
    font-size: 16px;
    line-height: 1.5;
}

/* ============ Узкие экраны ============ */

@media (max-width: 1199px){
    .hb-title{ font-size: 28px; }
    .hb-cert_badge{ font-size: 26px; padding: 8px 24px; }
    .hb-cert_lead{ font-size: 22px; }
    .hb-faq_item summary{ font-size: 19px; }
}

@media (max-width: 991px){
    .hb{ padding: 44px 0; }
    /* Общее правило выше вернуло нижний отступ — секциям со снимком
       на нижней границе он не нужен. */
    .hb-cert,
    .hb-delivery,
    .hb-reviews{ padding-bottom: 0; }
    /* Одна колонка: текст идёт первым и стоит по центру, снимок — последним
       и упирается в нижнюю границу секции. */
    .hb-cert_grid,
    .hb-delivery_grid{
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 30px;
    }
    .hb-cert_body,
    .hb-delivery_body{ order: 1; margin: 0 auto; }
    .hb-cert_photo,
    .hb-delivery_photo{
        order: 2;
        align-self: end;
        margin-bottom: 0;
    }
    .hb-cert_photo{ max-width: 320px; }
    .hb-delivery_photo img{ max-width: 260px; margin: 0 auto; }
    .hb-delivery_body{ text-align: center; }
    .hb-delivery_list li{ text-align: left; }
    .hb-video_grid{ grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 575px){
    .hb-cert_badge{ font-size: 22px; }
    .hb-cert_lead{ font-size: 19px; }
    .hb-cert_note{ font-size: 15px; }
    .hb-review{ flex-direction: column; gap: 14px; }
    .hb-review .hb-review_avatar{ width: 80px; height: 80px; flex-basis: 80px; }
    .hb-faq_item summary{ font-size: 17px; padding: 14px 18px; }
    .hb-delivery_list li{ font-size: 15px; }
}

@media (max-width: 575px){
}

/* Оверлей просмотра роликов */
.vlb{
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0, 0, 0, .88);
}
.vlb_video{
    width: min(1100px, 100%);
    max-height: 86vh;
    border-radius: 10px;
    background: #000;
    outline: none;
}
.vlb_close{
    position: absolute;
    top: 18px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
}

/* Верхние отступы у новостей и «Было и стало»: Elementor держит их не на
   самом контейнере, а на его .e-con-inner — снимаем там.
   !important — у Elementor селектор специфичнее. */
.elementor-element-b660be3,
.elementor-element-b660be3 > .e-con-inner,
.elementor-element-aa9ecde,
.elementor-element-aa9ecde > .e-con-inner{ padding-top: 0 !important; }

@media (max-width: 480px){
    .hb{ padding: 68px 0 40px 0; }

    .hb-video_grid{
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: -46px;
    }

    /* У секций со снимком на нижней границе отступ снизу по-прежнему не нужен. */
    .hb-cert,
    .hb-delivery,
    .hb-reviews{ padding-bottom: 0; }

    /* Видео и отзывы занимают всю ширину экрана: боковые поля контейнера
       съедают и без того узкую карточку. */
    .hb-video > .container,
    .hb-reviews > .container{
        padding-left: 0;
        padding-right: 0;
    }
}

/* Шапка ленты новостей: заголовок слева, стрелки справа — как у отзывов. */
.news-block_head{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 26px;
}
.news-block_head .sec-title{ flex: 1 1 auto; min-width: 0; margin: 0; }

.news-block_nav{
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
}
.news-block_prev,
.news-block_next{
    position: relative;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: #ed7c23;
    cursor: pointer;
    transition: background .2s;
}
.news-block_prev:hover,
.news-block_next:hover{ background: #282828; }
.news-block_prev:before,
.news-block_next:before{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}
.news-block_next:before{ margin-left: -8px; transform: rotate(-135deg); }
