/* Per-page hero preview mocks: Videos */

/* ─── videos (hpv-) ────────────────────────────────────────────────────── */

.hpv-player {
    margin-bottom: 10px;
}

.hpv-player__screen {
    position: relative;
    height: 108px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a2d5a 0%, #2d4a8a 55%, #0961DB 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hpv-player__placeholder {
    position: absolute;
    inset: 0;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    opacity: 0.35;
}

.hpv-player__bar {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.55);
}

.hpv-player__play {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: hpvPlayPulse 2.4s ease-in-out infinite;
}

.hpv-player__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
}

.hpv-player__progress-fill {
    height: 100%;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(90deg, #59B5F9, #fff);
    animation: hpvProgressFill 9s linear infinite;
}

.hpv-player__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
}

.hpv-player__titles {
    position: relative;
    flex: 1;
    min-height: 14px;
    overflow: hidden;
}

.hpv-player__title {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    color: #000929;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
}

.hpv-player__duration {
    flex: none;
    font-size: 10px;
    font-weight: 600;
    color: #9aa6c4;
}

.hpv-playlist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid #f0f4fb;
}

.hpv-playlist__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.hpv-playlist__thumb {
    flex: none;
    width: 22px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(135deg, #e7f0ff 0%, #dbeafe 100%);
    color: #0961DB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hpv-playlist__name {
    flex: 1;
    font-size: 10.5px;
    font-weight: 600;
    color: #3a4564;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hpv-playlist__time {
    flex: none;
    font-size: 9.5px;
    font-weight: 500;
    color: #9aa6c4;
}

/* 9 s loop — 3 tutorials, 3 s each */
@keyframes hpvPlaylistActive {
    0%    { background: #eef4ff; border-color: #c7daf7; }
    33%   { background: #eef4ff; border-color: #c7daf7; }
    38%   { background: transparent; border-color: transparent; }
    100%  { background: transparent; border-color: transparent; }
}

@keyframes hpvTitleShow {
    0%    { opacity: 1; }
    33%   { opacity: 1; }
    38%   { opacity: 0; }
    100%  { opacity: 0; }
}

@keyframes hpvProgressFill {
    0%       { width: 0%; }
    33%      { width: 100%; }
    33.01%   { width: 0%; }
    66%      { width: 100%; }
    66.01%   { width: 0%; }
    100%     { width: 100%; }
}

@keyframes hpvPlayPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

.hpv-playlist__item:nth-child(1) { animation: hpvPlaylistActive 9s ease infinite 0s; }
.hpv-playlist__item:nth-child(2) { animation: hpvPlaylistActive 9s ease infinite 3s; }
.hpv-playlist__item:nth-child(3) { animation: hpvPlaylistActive 9s ease infinite 6s; }

.hpv-player__title:nth-child(1) { animation: hpvTitleShow 9s ease infinite 0s; }
.hpv-player__title:nth-child(2) { animation: hpvTitleShow 9s ease infinite 3s; }
.hpv-player__title:nth-child(3) { animation: hpvTitleShow 9s ease infinite 6s; }


/* ─── Reduced motion ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .hpv-player__play,
    .hpv-player__progress-fill,
    .hpv-playlist__item,
    .hpv-player__title {
        animation: none !important;
    }

    .hpv-player__title:first-child,
    .hpv-playlist__item:first-child {
        opacity: 1;
        background: #eef4ff;
        border-color: #c7daf7;
    }

    .hpv-player__progress-fill {
        width: 42%;
    }
}
