html:has(.videos-page),
body.videos-page {
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
}

body.videos-page {
    font-family: 'Montserrat', sans-serif;
    background: var(--videos-bg, #111);
    color: var(--videos-fg, #f4f4f4);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

.videos-page .content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    text-align: left;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
}

.videos-page .page-header {
    color: var(--videos-fg, #f4f4f4);
    width: 100%;
    box-sizing: border-box;
    padding-bottom: 8px;
}

.videos-page .page-title {
    margin: 0;
    font-size: 1.15em;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.videos-page .menu a,
.videos-page .menu a:visited {
    color: var(--videos-link, #fca903);
}

.videos-page .menu a:hover {
    color: var(--videos-fg, #fff);
}

.videos-stage {
    display: block;
    padding: 8px 0 40px;
}

.videos-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 48px 8px;
    box-sizing: border-box;
}

.videos-nav-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--videos-line, rgba(255, 255, 255, 0.22));
    background: transparent;
    color: var(--videos-fg, #fff);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.videos-nav-btn:hover,
.videos-nav-btn:focus-visible {
    background: rgba(252, 169, 3, 0.16);
    border-color: #fca903;
    outline: none;
}

.videos-nav-btn:disabled {
    opacity: 0.28;
    cursor: default;
}

.videos-nav-btn svg {
    width: 18px;
    height: 18px;
}

.videos-track {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0 48px 36px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #fca903 transparent;
    cursor: grab;
}

.videos-track.is-dragging,
.videos-track.is-dragging .video-card {
    cursor: grabbing;
}

.videos-track::-webkit-scrollbar {
    height: 6px;
}

.videos-track::-webkit-scrollbar-thumb {
    background: #fca903;
    border-radius: 99px;
}

.video-card {
    flex: 0 0 min(72%, 640px);
    scroll-snap-align: center;
    cursor: pointer;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    font: inherit;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: saturate(0.92) brightness(0.88);
}

.video-card:hover .video-thumbnail img,
.video-card:focus-visible .video-thumbnail img {
    transform: scale(1.07);
    filter: saturate(1) brightness(1);
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.78) 100%);
    pointer-events: none;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: rgba(0, 0, 0, 0.28);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.video-card:hover .video-play-icon,
.video-card:focus-visible .video-play-icon {
    transform: translate(-50%, -50%) scale(1.08);
    background: #fca903;
    border-color: #fca903;
}

.video-play-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
    margin-left: 3px;
}

.video-card:hover .video-play-icon svg,
.video-card:focus-visible .video-play-icon svg {
    fill: #111;
}

.video-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: 22px 24px;
}

.video-info-title {
    font-size: 1.15em;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
}

.video-info-desc {
    display: none;
}

.videos-empty {
    padding: 80px 48px;
    text-align: center;
    color: var(--videos-muted, rgba(255, 255, 255, 0.65));
}

.video-modal {
    display: flex;
    visibility: hidden;
    pointer-events: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.94);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.video-modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-modal-close {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 10001;
}

.video-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
}

.video-embed-container iframe,
.video-embed-container video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-embed-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #fff;
}

.video-modal-info {
    color: #fff;
    max-height: 28vh;
    overflow-y: auto;
}

.video-modal-title {
    font-size: 1.6em;
    font-weight: 500;
    margin: 0 0 10px;
}

.video-modal-description {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.videos-page .menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100;
}

.videos-page .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--videos-fg, #fff);
    margin: 5px 0;
}

@media (max-width: 900px) {
    .videos-page .menu-toggle {
        display: block;
    }

    .videos-page .menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--videos-bg, #111);
        max-height: 0;
        overflow: hidden;
        padding: 0 20px;
    }

    .videos-page .menu.is-open {
        max-height: 320px;
        padding: 8px 20px 20px;
    }

    .videos-page .menu ul {
        flex-direction: column;
        margin: 0;
    }

    .videos-page .menu li {
        margin: 10px 0 0;
    }

    .videos-page .page-header {
        position: relative;
        padding: 20px;
    }

    .videos-toolbar {
        padding: 0 20px 12px;
    }

    .videos-track {
        padding: 8px 20px 28px;
        gap: 18px;
    }

    .video-card {
        flex-basis: 85%;
    }
}

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

    .video-info-title {
        font-size: 0.95em;
    }

    .video-modal-content {
        width: 94%;
    }

    .video-modal-close {
        top: 12px;
        right: 12px;
    }
}
