/* =========================================================
   PERISTIWAPALU — HALAMAN SEMUA VIDEO STORY
========================================================= */

.video-stories-page {
    width: 100%;
    min-height: 100vh;
    padding: 34px 0 70px;
    overflow: clip;
    background: var(--page);
    color: var(--text);
}

.video-stories-page-container {
    width: min(var(--container-width), calc(100% - 32px));
    margin-inline: auto;
}

.video-stories-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.video-stories-page-heading-main {
    min-width: 0;
}

.video-stories-page-heading h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--text);
    font-size: clamp(28px, 3.5vw, 38px);
    font-weight: 850;
    letter-spacing: -.055em;
    line-height: 1.05;
}

.video-stories-page-heading h1::before {
    width: 4px;
    height: 34px;
    border-radius: 2px;
    background: #ff9d00;
    content: "";
}

.video-stories-page-heading h1 i {
    color: var(--blue);
    font-size: .7em;
}

.video-stories-page-heading p {
    margin: 8px 0 0 18px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.video-stories-page-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.video-stories-page-back:hover,
.video-stories-page-back:focus-visible {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
    transform: translateY(-1px);
}

.video-stories-page-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 28px 16px;
}

.video-story-page-card {
    min-width: 0;
    color: var(--text);
}

.video-story-page-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 6.1 / 10;
    overflow: hidden;
    border: 1px solid rgba(11, 22, 143, .12);
    border-radius: 13px;
    background: #050812;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
    color: inherit;
    line-height: 0;
    text-decoration: none;
}

.video-story-page-media--instagram {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.video-story-page-media--instagram iframe {
    position: absolute;
    top: -16%;
    left: -21.25%;
    display: block;
    width: 173.78%;
    height: 173.17%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    transform: scale(.82);
    transform-origin: top left;
    vertical-align: top;
}

.video-story-page-click-target {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    border-radius: inherit;
    background: transparent;
    cursor: pointer;
}

.video-story-page-click-target:focus-visible {
    outline: 3px solid rgba(255, 157, 0, .72);
    outline-offset: -3px;
}

.video-story-page-fallback {
    position: absolute;
    inset: 50% 16px auto;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #d8e1f4;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    transform: translateY(-50%);
}

.video-story-page-fallback i {
    color: #ff9d00;
    font-size: 30px;
}

.video-story-page-fallback a {
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-decoration: underline;
}

.video-story-page-media.is-failed .video-story-page-fallback {
    display: flex;
}

.video-story-page-media.is-failed iframe {
    opacity: .08;
}

.video-story-page-media--local img,
.video-story-page-local-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-story-page-media--local img {
    display: block;
    object-fit: cover;
    transition: transform .4s ease;
}

.video-story-page-local-overlay {
    background: linear-gradient(180deg, rgba(5, 10, 27, .06) 20%, rgba(5, 10, 27, .82) 100%);
}

.video-story-page-media--local:hover img,
.video-story-page-media--local:focus-visible img {
    transform: scale(1.04);
}

.video-story-page-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    background: rgba(255, 255, 255, .78);
    color: var(--blue);
    font-size: 14px;
    transform: translate(-50%, -50%);
}

.video-story-page-copy {
    padding: 10px 2px 0;
}

.video-story-page-copy h2 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.video-story-page-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
}

.video-story-page-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.video-story-page-meta > span:last-child {
    flex: 0 0 auto;
    white-space: nowrap;
}

.video-story-page-channel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-story-page-channel-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9d00, #ff5b22);
    color: #fff;
    font-size: 8px;
    font-weight: 850;
    overflow: hidden;
}

.video-story-page-channel-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-story-page-empty {
    display: grid;
    grid-column: 1 / -1;
    place-items: center;
    gap: 8px;
    min-height: 260px;
    padding: 30px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

.video-story-page-empty i {
    margin-bottom: 4px;
    color: var(--blue);
    font-size: 30px;
}

.video-story-page-empty strong {
    color: var(--text);
    font-size: 14px;
}

.video-story-page-empty span {
    font-size: 11px;
}

.video-stories-page-pagination {
    margin-top: 30px;
}

.video-stories-page-loader {
    display: none;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 72px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.video-stories-page-loader.is-visible {
    display: flex;
}

.video-stories-page-loader-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid rgba(11, 22, 143, .14);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: video-stories-page-spin .7s linear infinite;
}

@keyframes video-stories-page-spin {
    to {
        transform: rotate(360deg);
    }
}

:is(html.theme-dark, body.dark-mode) .video-stories-page-loader-spinner {
    border-color: rgba(255, 255, 255, .18);
    border-top-color: #ff9d00;
}

@media (prefers-reduced-motion: reduce) {
    .video-stories-page-loader-spinner {
        animation: none;
    }
}

:is(html.theme-dark, body.dark-mode) .video-story-page-media,
:is(html.theme-dark, body.dark-mode) .video-story-page-empty {
    border-color: var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

@media (max-width: 1100px) {
    .video-stories-page-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .video-stories-page {
        padding: 24px 0 56px;
    }

    .video-stories-page-heading {
        align-items: flex-start;
        gap: 14px;
    }

    .video-stories-page-heading h1 {
        font-size: clamp(24px, 6vw, 32px);
    }

    .video-stories-page-heading h1::before {
        height: 28px;
    }

    .video-stories-page-heading p {
        margin-left: 14px;
        font-size: 10px;
    }

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

    .video-stories-page-back {
        min-height: 34px;
        padding: 0 10px;
        font-size: 10px;
    }
}

@media (max-width: 560px) {
    .video-stories-page-container {
        width: calc(100% - 24px);
    }

    .video-stories-page-heading {
        align-items: center;
        margin-bottom: 18px;
    }

    .video-stories-page-heading h1 {
        gap: 7px;
        font-size: 23px;
    }

    .video-stories-page-heading h1::before {
        width: 3px;
        height: 25px;
    }

    .video-stories-page-heading h1 i {
        font-size: .66em;
    }

    .video-stories-page-heading p {
        display: none;
    }

    .video-stories-page-back {
        width: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: 9px;
        font-size: 0;
    }

    .video-stories-page-back i {
        font-size: 11px;
    }

    .video-story-page-media {
        border-radius: 11px;
    }

    .video-story-page-media--instagram iframe {
        top: -20%;
    }

    .video-story-page-copy {
        padding-top: 8px;
    }

    .video-story-page-copy h2 {
        font-size: 11px;
    }

    .video-story-page-meta {
        margin-top: 5px;
        font-size: 8px;
    }

    .video-story-page-channel-mark {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
        font-size: 7px;
    }
}
