/* TV-COM Hero Slider plugin styles.
   Existing theme styles for .hero-slider/.hero-slide/.hero-grid/.hero-content/
   .hero-image/.hero-badge/.hero-buttons/.btn-primary/.slider-dots/.dot
   continue to control the visual design. These rules only add safe plugin behavior. */

.hero-slider[data-tvcom-hero-slider] {
    position: relative;
    overflow: hidden;
}

.hero-slider[data-tvcom-hero-slider] .hero-slide {
    display: none;
}

.hero-slider[data-tvcom-hero-slider] .hero-slide.active {
    display: block;
}

.hero-slider[data-tvcom-hero-slider] .slider-dots {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider[data-tvcom-hero-slider] .dot {
    cursor: pointer;
}

.hero-slider[data-tvcom-hero-slider] .hero-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

@media (max-width: 700px) {
    .hero-slider[data-tvcom-hero-slider] .hero-slide {
        touch-action: pan-y;
    }
}


/* ---------------------------------------------------------
   Колір основного тексту задається в адмінці.
   Badge зберігає фірмовий зелений колір теми.
   --------------------------------------------------------- */

.hero-slider[data-tvcom-hero-slider] .hero-slide.hero-text-light .hero-content h1,
.hero-slider[data-tvcom-hero-slider] .hero-slide.hero-text-light .hero-content p {
    color: #ffffff !important;
}

.hero-slider[data-tvcom-hero-slider] .hero-slide.hero-text-dark .hero-content h1,
.hero-slider[data-tvcom-hero-slider] .hero-slide.hero-text-dark .hero-content p {
    color: #061326 !important;
}

/* Badge always uses the TV-COM green accent. */
.hero-slider[data-tvcom-hero-slider] .hero-slide .hero-badge {
    background: rgba(114,197,0,.1) !important;
    border: 1px solid rgba(114,197,0,.2) !important;
    color: #72c500 !important;
}

/* The dots belong to the slider itself, not to a separate white strip. */
.hero-slider[data-tvcom-hero-slider] {
    overflow: hidden !important;
}

.hero-slider[data-tvcom-hero-slider] .slider-dots {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    bottom: 18px !important;
    width: 100vw !important;
    max-width: 100vw !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    z-index: 20 !important;
}

.hero-slider[data-tvcom-hero-slider] .hero-slide {
    margin: 0 !important;
    border: 0 !important;
}

.hero-slider[data-tvcom-hero-slider] .hero-description p {
    margin: 0 0 12px;
}

/* Description editor output: avoid invalid nested <p> and preserve slide text color. */
.hero-slider[data-tvcom-hero-slider] .hero-description {
    font-size: 24px;
    line-height: 1.6;
    margin: 0 0 34px;
    color: inherit;
}
.hero-slider[data-tvcom-hero-slider] .hero-description p {
    margin: 0 0 12px;
    color: inherit !important;
}
.hero-slider[data-tvcom-hero-slider] .hero-description p:last-child {
    margin-bottom: 0;
}
.hero-slider[data-tvcom-hero-slider] .hero-text-light .hero-description,
.hero-slider[data-tvcom-hero-slider] .hero-text-light .hero-description p {
    color: #ffffff !important;
}
.hero-slider[data-tvcom-hero-slider] .hero-text-dark .hero-description,
.hero-slider[data-tvcom-hero-slider] .hero-text-dark .hero-description p {
    color: #061326 !important;
}


/* ---------------------------------------------------------
   MOBILE: компактний порядок контенту
   На вузьких екранах кнопка розташовується ПІД зображенням.
   На десктопі порядок і дизайн не змінюються.
   --------------------------------------------------------- */
@media (max-width: 700px) {
    .hero-slider[data-tvcom-hero-slider] .hero-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
    }

    /* Розкладаємо дочірні елементи hero-content у спільний flex-порядок. */
    .hero-slider[data-tvcom-hero-slider] .hero-content {
        display: contents !important;
    }

    .hero-slider[data-tvcom-hero-slider] .hero-badge {
        order: 1 !important;
        align-self: flex-start !important;
        margin-bottom: 18px !important;
    }

    .hero-slider[data-tvcom-hero-slider] .hero-content h1 {
        order: 2 !important;
        margin-bottom: 16px !important;
        font-size: clamp(36px, 9vw, 46px) !important;
        line-height: .96 !important;
        letter-spacing: -1.8px !important;
    }

    .hero-slider[data-tvcom-hero-slider] .hero-description {
        order: 3 !important;
        margin-bottom: 20px !important;
        font-size: 18px !important;
        line-height: 1.5 !important;
    }

    .hero-slider[data-tvcom-hero-slider] .hero-image {
        order: 4 !important;
        width: 100% !important;
        margin: 0 0 18px !important;
    }

    .hero-slider[data-tvcom-hero-slider] .hero-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    .hero-slider[data-tvcom-hero-slider] .hero-buttons {
        order: 5 !important;
        width: 100% !important;
        margin: 0 0 46px !important;
    }

    .hero-slider[data-tvcom-hero-slider] .hero-buttons .btn-primary {
        width: auto !important;
        max-width: 100% !important;
    }
}
