/**
 * STK Video Gallery — Frontend Styles
 */

/* ── Variables ── */
:root {
    --stk-video-radius: 8px;
    --stk-video-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --stk-video-shadow-hover: 0 8px 24px rgba(0,0,0,0.15);
    --stk-video-transition: all 0.3s ease;
    --stk-video-dark: #1a1a1a;
    --stk-video-dark-mid: #2a2a2a;
}

/* ── Empty state ── */
.stk-video-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-style: italic;
    background: #f5f5f5;
    border-radius: var(--stk-video-radius);
}

/* ── Video Card ── */
.stk-video-card {
    background: #fff;
    border-radius: var(--stk-video-radius);
    overflow: hidden;
    box-shadow: var(--stk-video-shadow);
    transition: var(--stk-video-transition);
    cursor: pointer;
}

.stk-video-card:hover {
    box-shadow: var(--stk-video-shadow-hover);
    transform: translateY(-3px);
}

/* ── Thumbnail ── */
.stk-video-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.stk-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.stk-video-card:hover .stk-video-thumb img {
    transform: scale(1.04);
}

/* ── Play Button ── */
.stk-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--stk-video-transition);
    z-index: 2;
}

.stk-video-play svg {
    width: 26px;
    height: 26px;
    margin-left: 3px;
}

.stk-video-card:hover .stk-video-play {
    background: rgba(204, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ── Iframe Embed ── */
.stk-video-iframe-wrap {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.stk-video-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.stk-video-card.stk-video-playing .stk-video-iframe-wrap {
    display: block;
}

.stk-video-card.stk-video-playing .stk-video-play {
    display: none;
}

.stk-video-card.stk-video-playing .stk-video-thumb img {
    visibility: hidden;
}

/* ── Video Info / Title ── */
.stk-video-info {
    padding: 14px 16px;
}

.stk-video-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Grid Layout ── */
.stk-video-grid {
    display: grid;
    gap: 20px;
}

.stk-video-cols-2 { grid-template-columns: repeat(2, 1fr); }
.stk-video-cols-3 { grid-template-columns: repeat(3, 1fr); }
.stk-video-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .stk-video-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stk-video-cols-3,
    .stk-video-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stk-video-cols-2,
    .stk-video-cols-3,
    .stk-video-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ── Carousel Layout ── */
.stk-video-carousel-wrap {
    position: relative;
}

.stk-video-carousel-wrap .swiper-button-prev,
.stk-video-carousel-wrap .swiper-button-next {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--stk-video-transition);
}

.stk-video-carousel-wrap .swiper-button-prev:hover,
.stk-video-carousel-wrap .swiper-button-next:hover {
    background: rgba(204, 0, 0, 0.9);
}

.stk-video-carousel-wrap .swiper-button-prev::after,
.stk-video-carousel-wrap .swiper-button-next::after {
    font-size: 16px;
    font-weight: 700;
}

.stk-video-carousel-wrap .swiper-pagination-bullet {
    background: #999;
    opacity: 0.6;
}

.stk-video-carousel-wrap .swiper-pagination-bullet-active {
    background: #cc0000;
    opacity: 1;
}

/* ── Dark Style ── */
.stk-video-dark .stk-video-card {
    background: var(--stk-video-dark-mid);
}

.stk-video-dark .stk-video-title {
    color: #f0f0f0;
}

.stk-video-dark .stk-video-empty {
    background: var(--stk-video-dark);
    color: #666;
}

.stk-video-dark .swiper-button-prev,
.stk-video-dark .swiper-button-next {
    background: rgba(255, 255, 255, 0.15);
}

.stk-video-dark .swiper-button-prev:hover,
.stk-video-dark .swiper-button-next:hover {
    background: rgba(204, 0, 0, 0.9);
}

.stk-video-dark .swiper-pagination-bullet {
    background: #666;
}

/* ── Carousel responsiveness ── */
@media (max-width: 768px) {
    .stk-video-carousel-wrap .swiper-button-prev,
    .stk-video-carousel-wrap .swiper-button-next {
        width: 32px;
        height: 32px;
    }

    .stk-video-carousel-wrap .swiper-button-prev::after,
    .stk-video-carousel-wrap .swiper-button-next::after {
        font-size: 13px;
    }
}
