/* =============================================
   VILTEKS HERO SLIDER — CSS
   ============================================= */

.vilteks-hero-slider {
    position: relative;
    overflow: hidden;
    background: #f0ece8;
    height: 600px;
    max-height: 90vh;
    /* Повна ширина без горизонтального скролу */
    width: 100%;
    box-sizing: border-box;
}

/* Якщо тема загортає в вузький контейнер — вириваємо назовні */
.site-content .vilteks-hero-slider,
.entry-content .vilteks-hero-slider,
.entry .vilteks-hero-slider,
main .vilteks-hero-slider,
.page-content .vilteks-hero-slider {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    max-width: 100vw;
}

/* Фікс горизонтального скролу від 100vw (враховує scrollbar ~17px) */
html {
    overflow-x: hidden;
}
body {
    overflow-x: hidden;
}

/* ---- ТРЕК ---- */
.vhs-track {
    display: flex;
    height: 100%;
    transition: none;
}

/* ---- СЛАЙД ---- */
.vhs-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.vhs-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* ---- ЗОБРАЖЕННЯ ---- */
.vhs-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ПК: показуємо desktop, ховаємо mobile */
.vhs-img--desktop {
    display: block;
}
.vhs-img--mobile {
    display: none;
}

/* ---- ПІДПИС / CAPTION ---- */
.vhs-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    color: #fff;
    text-align: left;
    pointer-events: none;
}

.vhs-caption__title {
    font-size: clamp(1.5rem, 3vw, 2.8rem);
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    letter-spacing: -0.02em;
}

.vhs-caption__subtitle {
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    margin: 0 0 20px;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.vhs-caption__btn {
    display: inline-block;
    padding: 12px 28px;
    background: #fff;
    color: #222;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 3px;
    text-decoration: none;
    letter-spacing: 0.03em;
    pointer-events: all;
    transition: background 0.2s, color 0.2s;
}

.vhs-caption__btn:hover {
    background: #c8202a;
    color: #fff;
}

/* ---- СТРІЛКИ ---- */
.vhs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.2s;
    /* Скидаємо всі дефолтні стилі кнопки */
    padding: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    /* Для позиціонування псевдоелемента */
    display: block;
}

.vhs-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

/* CSS стрілка — працює на всіх пристроях без SVG */
.vhs-arrow::before {
    content: '';
    display: block;
    width: 11px;
    height: 11px;
    border-top: 2.5px solid #333;
    border-right: 2.5px solid #333;
    position: absolute;
    top: 50%;
    left: 50%;
}

/* Стрілка "назад" — повернута вліво */
.vhs-arrow--prev::before {
    transform: translate(-30%, -50%) rotate(-135deg);
}

/* Стрілка "вперед" — повернута вправо */
.vhs-arrow--next::before {
    transform: translate(-70%, -50%) rotate(45deg);
}

.vhs-arrow--prev { left: 20px; }
.vhs-arrow--next { right: 20px; }

/* ---- ТОЧКИ ---- */
.vhs-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.vhs-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
}

.vhs-dot.active {
    background: #fff;
    border-color: #fff;
}

/* ---- АНІМАЦІЯ ПЕРЕХОДУ ---- */
.vhs-slide {
    opacity: 0;
    transition: opacity 0.6s ease;
}
.vhs-slide.active {
    opacity: 1;
}

/* Для touchswipe - позиціонування треку */
.vhs-track {
    position: relative;
}
.vhs-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =============================================
   МОБІЛЬНА ВЕРСІЯ (до 768px)
   ============================================= */
@media (max-width: 768px) {
    .vilteks-hero-slider {
        height: 400px;
    }

    /* Показуємо мобільне фото, ховаємо десктопне */
    .vhs-img--desktop {
        display: none;
    }
    .vhs-img--mobile {
        display: block;
    }

    .vhs-caption {
        padding: 20px 20px 40px;
    }

    .vhs-caption__title {
        font-size: 1.4rem;
    }

    .vhs-caption__subtitle {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .vhs-caption__btn {
        padding: 10px 20px;
        font-size: 0.82rem;
    }

    .vhs-arrow {
        width: 38px;
        height: 38px;
    }
    .vhs-arrow--prev { left: 10px; }
    .vhs-arrow--next { right: 10px; }

    .vhs-dots {
        bottom: 12px;
    }
}

/* =============================================
   ДУЖЕ МАЛЕНЬКІ ТЕЛЕФОНИ (до 480px)
   ============================================= */
@media (max-width: 480px) {
    .vilteks-hero-slider {
        height: 280px;
    }
    .vhs-caption__title {
        font-size: 1.1rem;
    }
    .vhs-caption__subtitle {
        display: none;
    }
}
