/* ============================================================
   БЛОК VIDEO (hero + відео-карусель + стрічка каналів)
   Підключення:
   <link rel="stylesheet" href="{{ asset('public/assets\css\frontend\New_website\video.css') }}">

   Брейкпоінти:
   - ПК (за замовчуванням)          > 1440px
   - ноутбук / планшет альбомний    <= 1440px
   - планшет портретний             <= 1024px
   - телефон                        <= 768px
   ============================================================ */

.body-video {
    display: flex;
    width: 100%;
    max-width: 1920px;
    height: 906px;
    background: rgba(42, 144, 255, 1);
    flex-direction: column;
}

.body-video-top {
    display: flex;
    width: 100%;
    height: 790px;
    background-color: #ffffff;
    background-image: url('/assets/image/website/body/back.png');
    background-size: cover;
    background-position: center;
    justify-content: center;
    align-items: center;
}

.body-video-position {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1312px;
    height: 503px;
    justify-content: space-evenly;
}

.main-content {
    display: flex;
    flex-direction: column;
    width: 560px;
    height: 503px;
}

.main-content-position {
    width: 100%;
    height: 160px;
}

.main-content-title {
    margin-top: 20px;
    width: 448px;
    height: 114px;
}

.main-content-center {
    margin-top: 30px;
    width: 560px;
    height: 160px;
}

.main-content-footer {
    margin-top: 40px;
    width: 560px;
    height: 93px;
}

.main-content-footer-btn {
    display: flex;
    width: 560px;
    height: 44px;
    gap: 15px;
}

.main-content-footer-text {
    margin-top: 20px;
}

.video-content {
    flex-direction: row;
    width: 673px;
    height: 503px;
}

/* ---------- типографіка блоку ---------- */

.color-blue {
    font-family: 'Montserrat', sans-serif;
    color: rgba(7, 31, 87, 1);
    font-weight: 900;
    font-size: 32px;
    line-height: 38px;
}

.color-rgd {
    background: linear-gradient(
            111.46deg,
            #1D93FF -10.63%,
            #5784FF 13.12%,
            #8478FF 36.86%,
            #A46FFF 48.73%,
            #C068FF 60.61%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    line-height: 38px;
}

.color-black {
    color: rgba(26, 18, 51, 1);
    font-weight: 500;
    font-size: 24px;
    line-height: 40px;
}

/* ---------- карусель з відео ---------- */

.showcase { padding: 2rem 1rem; font-family: var(--font-sans); }

.stage {
    position: relative;
    height: 390px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card {
    position: absolute;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    will-change: transform, opacity;
}

.card.behind-right {
    width: 500px; height: 400px;
    border-radius: 20px;
    z-index: 1;
}

.card.behind-left {
    width: 320px; height: 200px;
    background: var(--color-background-primary);
    border: 0.5px solid var(--color-border-tertiary);
    z-index: 1;
    padding: 1rem;
}

.card.main {
    width: 650px; height: 420px;
    z-index: 10;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    background: #000;
}

.video-wrap {
    position: absolute; inset: 0;
    pointer-events: none;
}

.video-wrap iframe {
    width: 100%; height: 100%;
    border: none;
    display: block;
}

.video-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.45) 100%);
    transition: opacity 0.3s;
    z-index: 2;
    pointer-events: none;
}
.video-overlay.hidden { opacity: 0; pointer-events: none; }

.card-title-text {
    font-size: 20px; font-weight: 700;
    color: rgba(255,255,255,0.85);
    letter-spacing: 2px;
}

.card-subtitle {
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 1px;
    align-self: center;
}

.play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.2s, opacity 0.3s;
    pointer-events: all;
}
.play-btn:hover { transform: translate(-50%, -50%) scale(1.1); }
.play-btn.hidden { opacity: 0; pointer-events: none; }

.behind-left-content { padding-top: 8px; }
.behind-left-line {
    height: 10px; border-radius: 6px;
    background: var(--color-background-tertiary);
    margin-bottom: 10px;
}

.nav { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }

.nav-btn {
    font-size: 14px; font-weight: 500;
    background: none; border: none; cursor: pointer;
    color: rgba(18, 22, 51, 1);
    padding: 4px 0;
    width: 100px;
    height: 40px;
    border-bottom: 1.5px solid var(--color-border-tertiary);
    transition: color 0.2s, border-color 0.2s;
    letter-spacing: 0.3px;
}
.nav-btn:hover { color: rgba(18, 22, 51, 1); font-size: 19px; border-color: var(--color-border-primary);
    border-bottom: 1.5px solid #E8A824; font-weight: 600;
}


.counter { width: 50px; font-size: 24px; color: var(--color-text-secondary); }

.dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.dot {
    width: 6px; height: 6px; border-radius: 3px;
    background: var(--color-border-secondary);
    transition: all 0.3s; cursor: pointer;
}
.dot.active { width: 18px; background: #E8A824; }

/* ---------- нижня стрічка каналів ---------- */

.body-video-bot {
    position: relative;
    display: flex;
    justify-content: space-between;
}

.body-btn-body {
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden; /* потрібно для marquee */
}

/* доріжка marquee: на ПК статична, на планшеті/телефоні анімується */
.body-btn-body-position {
    position: absolute;
    margin-left: 10%;
    width: 60%;
    height: 74px;
    display: flex;
    align-items: center;
}

.marquee-track {
    display: flex;
    align-items: center;
    width: 100%;
}

.marquee-group {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    flex-shrink: 0;
}

/* друга (дубльована) група на ПК прихована */
.marquee-group[aria-hidden="true"] { display: none; }

.body-video-bot-img {
    float: right;
    width: 674px;
    height: 116px;
}

.body-video-bot-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* на ПК напис «100% комунікацій» лежить поверх
   градієнтної картинки праворуч (Frame 1597887550.png) */
.body-video-total {
    position: absolute;
    right: 0;
    top: 0;
    width: 500px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.text {
    font-weight: 900;
    color: rgba(255, 255, 255, 1);
    font-size: 30px;
    line-height: 38px;
    text-align: center;
}

@keyframes marquee-rtl {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   НОУТБУК / ПЛАНШЕТ АЛЬБОМНИЙ  (<= 1440px)
   Колонки лишаються поруч, але всі розміри стають гумовими
   ============================================================ */
@media (max-width: 1440px) {

    .body-video { height: auto; }

    .body-video-top {
        height: auto;
        padding: 48px 32px;
        box-sizing: border-box;
    }

    .body-video-position {
        height: auto;
        gap: 32px;
        justify-content: space-between;
        align-items: center;
    }

    .main-content {
        width: 46%;
        min-width: 400px;
        height: auto;
    }

    .main-content-position,
    .main-content-title,
    .main-content-center,
    .main-content-footer,
    .main-content-footer-btn {
        width: 100%;
        height: auto;
    }

    .video-content {
        width: 50%;
        height: auto;
    }

    .color-blue, .color-blues { font-size: 28px; line-height: 34px; }
    .color-rgd  { font-size: 28px; line-height: 34px; }
    .color-black { font-size: 19px; line-height: 32px; }

    /* карусель */
    .stage { height: 340px; }
    .card.main { width: 100%; max-width: 540px; height: 330px; }
    .card.behind-right { width: 420px; height: 320px; }
    .card.behind-left { width: 240px; height: 160px; }

    /* нижня стрічка: лента займає лівий бік, градієнт — правий */
    .body-btn-body-position {
        margin-left: 10%;
        width: calc(100% - 500px);
    }

    .body-video-bot-img { width: 460px; height: 100px; }
    .body-video-total   { width: 400px; }

    .text { font-size: 24px; line-height: 30px; }
}

/* ============================================================
   ПЛАНШЕТ ПОРТРЕТНИЙ  (<= 1024px)
   Контент у колонку, стрічка каналів стає безкінечним marquee
   ============================================================ */
@media (max-width: 1024px) {

    .body-video-top { padding: 32px 24px 16px; }

    /* порядок: бейдж+заголовок → відео → текст → кнопки */
    .body-video-position {
        flex-direction: column;
        gap: 0;
    }

    .main-content { display: contents; }

    .main-content-position  { order: 1; }
    .video-content          { order: 2; width: 100%; max-width: 640px; }
    .main-content-center    { order: 3; margin-top: 16px; }
    .main-content-footer    { order: 4; margin-top: 20px; padding-bottom: 16px; }

    .main-content-title { margin-top: 12px; }

    .color-blue, .color-blues { font-size: 24px; line-height: 30px; }
    .color-rgd  { font-size: 24px; line-height: 30px; }
    .color-black { font-size: 17px; line-height: 28px; }

    /* карусель */
    .showcase { padding: 1rem 0 0.5rem; }
    .stage { height: 320px; margin-bottom: 1rem; }
    .card.main { max-width: 520px; height: 310px; }
    .card.behind-left, .card.behind-right { display: none; }

    /* ---------- безкінечна стрічка справа наліво ---------- */
    .body-video-bot { flex-direction: column; }

    .body-btn-body-position {
        position: static;
        margin-left: 0;
        width: 100%;
        height: 70px;
    }

    .marquee-track {
        width: max-content;
        animation: marquee-rtl 16s linear infinite;
    }

    .marquee-group {
        width: max-content;
        justify-content: flex-start;
        gap: 28px;
        padding-right: 28px;
    }

    .marquee-group[aria-hidden="true"] { display: flex; }

    /* градієнтна картинка ховається, «100%…» — окрема смуга знизу */
    .body-video-bot-img { display: none; }

    .body-video-total {
        position: static;
        width: 100%;
        height: 64px;
        gap: 12px;
        background: linear-gradient(90deg, #2A90FF 0%, #8478FF 60%, #C068FF 100%);
        pointer-events: auto;
    }

    .text { font-size: 22px; line-height: 28px; }
}

/* ============================================================
   ТЕЛЕФОН  (<= 768px)
   ============================================================ */
@media (max-width: 768px) {

    .body-video-top { padding: 24px 16px 8px; }

    .main-content { min-width: 0; }

    .color-blue, .color-blues { font-size: 20px; line-height: 26px; }
    .color-rgd  { font-size: 20px; line-height: 26px; }
    .color-black { font-size: 15px; line-height: 24px; }
    .main-content-footer-btn {
        flex-direction: column;
        gap: 12px;
    }


    .main-content-footer-text { margin-top: 14px; }
    .main-content-footer-text h4 { font-size: 13px; margin: 0; }

    /* карусель */
    .showcase { padding: 0.5rem 0; }
    .stage { height: 220px; margin-bottom: 0.75rem; }
    .card.main { max-width: 340px; height: 210px; }
    .play-btn { width: 48px; height: 48px; }
    .nav { padding: 0 8px; }
    .counter { font-size: 16px; text-align: center; }
    .nav-btn { width: auto; min-width: 70px; }

    /* стрічка */
    .body-btn-body-position { height: 64px; }
    .marquee-group { gap: 24px; padding-right: 24px; }
    .marquee-track { animation-duration: 14s; }

    .body-video-total { height: 56px; }
    .text { font-size: 18px; line-height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
}