/**
 * Video - Halaman publik
 */

.page-video .video-main {
    padding: 2rem 1rem;
    min-height: 50vh;
}

.video-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 4vw, 1.5rem);
}

.video-title {
    font-size: 1.6rem;
    color: #1e3a8a;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-title i {
    color: #1e40af;
}

.video-desc {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.video-card-inner {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s, transform 0.2s;
}

.video-card-inner:hover {
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.15);
    transform: translateY(-2px);
}

.video-card-play {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    position: relative;
}

.video-card-play-link {
    text-decoration: none;
    color: inherit;
}

.video-card-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1e3a8a;
}

.video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

.video-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 3rem;
}

.video-card-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    padding-left: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
}

.video-card-inner:hover .video-card-play-icon {
    background: rgba(185, 28, 28, 0.95);
    transform: translate(-50%, -50%) scale(1.05);
}

.video-card-link-yt {
    display: inline-block;
    margin: 0.5rem 1rem 0;
    font-size: 0.85rem;
    color: #1e40af;
    text-decoration: none;
}

.video-card-link-yt:hover {
    text-decoration: underline;
}

.video-card-body {
    padding: 1rem;
}

.video-card-title {
    font-size: 1.05rem;
    margin: 0 0 0.35rem 0;
    color: #1e3a8a;
    line-height: 1.35;
}

.video-card-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.video-card-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

.video-card-meta i {
    margin-right: 0.25rem;
}

.video-empty {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 1.5rem;
    color: #92400e;
    text-align: center;
}

.video-empty p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.video-modal.open {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
}

.video-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-modal-inner {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-modal-inner iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-modal-title {
    margin: 0.75rem 0 0 0;
    color: #e2e8f0;
    font-size: 0.95rem;
    text-align: center;
}

@media (max-width: 640px) {
    .page-video .video-main {
        padding: 1.25rem 0.75rem;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}
