/* ==========================================================================
   video.css — Styling Halaman Galeri Video PT Astha Dwi Astha (828)
   Desain Sesuai Screenshot Referensi: Video Card Interaktif & Modal Player
   Dukungan Penuh Mode Gelap (Dark Mode) & Mode Terang (Light Mode)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET & STRUKTUR DASAR
   -------------------------------------------------------------------------- */
body {
    background-color: var(--bg-dark, #080d1a);
    color: var(--text-main, #e2e8f0);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.light-theme {
    background-color: #f8fafc;
    color: #0f172a;
}

/* --------------------------------------------------------------------------
   2. MAIN SECTION & HEADER
   -------------------------------------------------------------------------- */
.video-main-section {
    padding-top: 124px;
    padding-bottom: 96px;
    flex: 1;
    position: relative;
    background: radial-gradient(circle at 18% 18%, rgba(250, 204, 21, 0.08) 0%, transparent 58%),
                radial-gradient(circle at 82% 62%, rgba(234, 179, 8, 0.06) 0%, transparent 55%);
}

body.light-theme .video-main-section {
    background: radial-gradient(circle at 18% 18%, rgba(202, 138, 4, 0.06) 0%, transparent 60%),
                radial-gradient(circle at 82% 62%, rgba(217, 119, 6, 0.04) 0%, transparent 55%);
}

.video-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 28px;
}

.video-header-meta {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 48px auto;
}

.video-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 999px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #facc15;
    text-transform: uppercase;
    margin-bottom: 16px;
}

body.light-theme .video-badge {
    background: rgba(202, 138, 4, 0.09);
    border-color: rgba(202, 138, 4, 0.28);
    color: #b45309;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #facc15;
    box-shadow: 0 0 8px #facc15;
}

body.light-theme .badge-dot {
    background: #ca8a04;
    box-shadow: 0 0 6px #ca8a04;
}

.video-heading-title {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 2.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.22;
}

body.light-theme .video-heading-title {
    color: #0f172a;
}

.video-heading-subtitle {
    font-size: 1.02rem;
    color: #94a3b8;
    line-height: 1.65;
    margin: 0 auto;
}

body.light-theme .video-heading-subtitle {
    color: #475569;
}

.video-header-line {
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, #facc15, transparent);
    border-radius: 999px;
    margin: 20px auto 0 auto;
}

body.light-theme .video-header-line {
    background: linear-gradient(90deg, #ca8a04, transparent);
}

/* --------------------------------------------------------------------------
   3. VIDEO GRID & CARD TAMPILAN SESUAI SCREENSHOT (3 KOLOM MODERN)
   -------------------------------------------------------------------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    width: 100%;
}

.video-card {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease;
    display: flex;
    flex-direction: column;
}

body.light-theme .video-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.video-card:hover {
    transform: translateY(-6px);
    border-color: rgba(250, 204, 21, 0.4);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(250, 204, 21, 0.12);
}

body.light-theme .video-card:hover {
    border-color: rgba(202, 138, 4, 0.4);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12), 0 0 20px rgba(202, 138, 4, 0.1);
}

/* --------------------------------------------------------------------------
   4. THUMBNAIL WRAPPER & ELEMEN OVERLAY
   -------------------------------------------------------------------------- */
.video-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #0b1120;
    cursor: pointer;
}

.video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

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

.video-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.65) 100%);
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-thumb-overlay {
    opacity: 0.6;
}

/* Badge Lokasi / Tag (Pojok Kanan Atas) */
.video-badge-location {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.76rem;
    font-weight: 600;
    color: #ffffff;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.video-badge-location svg {
    color: #facc15;
}

/* Tombol Play Khas Screenshot (Biru Bundar di Tengah) */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1d4ed8;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    z-index: 3;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.55), 0 0 0 4px rgba(255, 255, 255, 0.2);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background-color 0.3s ease,
                box-shadow 0.3s ease;
}

.video-card:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.14);
    background: #2563eb;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.65), 0 0 0 6px rgba(250, 204, 21, 0.4);
}

.play-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px; /* visual center for play triangle */
}

/* Badge Durasi (Pojok Kanan Bawah) */
.video-duration-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.74rem;
    font-weight: 600;
    color: #ffffff;
    z-index: 2;
}

.video-duration-badge svg {
    color: #facc15;
}

/* --------------------------------------------------------------------------
   5. BODY KARTU: JUDUL & DESKRIPSI
   -------------------------------------------------------------------------- */
.video-card-body {
    padding: 20px 22px 24px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-card-title {
    font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.38;
    color: #38bdf8;
    margin: 0 0 10px 0;
    transition: color 0.25s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-theme .video-card-title {
    color: #1d4ed8;
}

.video-card:hover .video-card-title,
.video-card-title:hover {
    color: #facc15;
}

body.light-theme .video-card:hover .video-card-title,
body.light-theme .video-card-title:hover {
    color: #ca8a04;
}

.video-card-desc {
    font-size: 0.9rem;
    line-height: 1.62;
    color: #94a3b8;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-theme .video-card-desc {
    color: #475569;
}

.video-card-quote {
    margin: 0 0 14px 0;
    padding: 10px 14px;
    background: rgba(250, 204, 21, 0.06);
    border-left: 3px solid #facc15;
    border-radius: 4px;
    font-style: italic;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #fef08a;
}

body.light-theme .video-card-quote {
    background: rgba(202, 138, 4, 0.08);
    border-left-color: #ca8a04;
    color: #854d0e;
}

.video-card-note {
    font-size: 0.875rem;
    line-height: 1.62;
    color: #64748b;
    margin: 0 0 20px 0;
}

body.light-theme .video-card-note {
    color: #64748b;
}

/* Footer Aksi Card */
.video-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .video-card-actions {
    border-top-color: rgba(15, 23, 42, 0.08);
}

.btn-play-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    border: none;
    border-radius: 10px;
    font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(250, 204, 21, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.btn-play-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(250, 204, 21, 0.45);
    filter: brightness(1.05);
}

body.light-theme .btn-play-trigger {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(202, 138, 4, 0.3);
}

body.light-theme .btn-play-trigger:hover {
    box-shadow: 0 8px 22px rgba(202, 138, 4, 0.45);
}

.video-meta-info {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.76rem;
    color: #64748b;
    letter-spacing: 0.04em;
}

body.light-theme .video-meta-info {
    color: #94a3b8;
}

/* --------------------------------------------------------------------------
   6. MODAL VIDEO PLAYER LIGHTBOX (SESUAI SCREENSHOT)
   -------------------------------------------------------------------------- */
.video-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 15, 29, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Tombol Tutup Silang di Pojok Kanan Atas Modal (Sesuai Screenshot) */
.video-modal-close {
    position: absolute;
    top: 24px;
    right: 28px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.video-modal-close:hover {
    background: #facc15;
    border-color: #facc15;
    color: #0f172a;
    transform: scale(1.1) rotate(90deg);
}

.video-modal-container {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.94);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal-backdrop.show .video-modal-container {
    transform: scale(1);
}

/* Frame Pemutar 16:9 */
.video-player-frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000000;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

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

/* Keterangan Teks di Bawah Video Player Sesuai Screenshot */
.video-modal-caption {
    margin-top: 18px;
    font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: #f1f5f9;
    text-align: center;
    letter-spacing: -0.01em;
    padding: 0 12px;
}

/* --------------------------------------------------------------------------
   7. RESPONSIVITAS
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .video-container {
        max-width: 980px;
        padding: 0 20px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .video-main-section {
        padding-top: 105px;
        padding-bottom: 70px;
    }

    .video-container {
        padding: 0 16px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
        gap: 20px;
    }

    .video-heading-title {
        font-size: 1.7rem;
    }

    .video-heading-subtitle {
        font-size: 0.94rem;
    }

    .video-card-body {
        padding: 20px 20px 24px 20px;
    }

    .video-card-title {
        font-size: 1.1rem;
    }

    .video-modal-close {
        top: 14px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .video-modal-caption {
        font-size: 0.92rem;
        margin-top: 14px;
    }

    .video-player-frame {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .video-container {
        padding: 0 16px;
    }

    .video-play-btn {
        width: 52px;
        height: 52px;
    }

    .video-play-btn svg {
        width: 20px;
        height: 20px;
    }

    .video-card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn-play-trigger {
        justify-content: center;
        width: 100%;
    }

    .video-meta-info {
        text-align: center;
    }
}

