:root {
    --bg-color: #0f0f0f;
    --text-color: #ffffff;
    --text-muted: #3a3a3a;
    --text-faint: #bbbbbb;
    --bg-faint: #181818;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
}

body:not(.index-page) .navbar,
body:not(.index-page) header .navbar,
body:not(.index-page) nav.navbar {
    background-color: var(--bg-color) !important;
    background: var(--bg-color) !important;
}

body:not(.index-page) .navbar .brand-name,
body:not(.index-page) .navbar .nav-link {
    color: var(--text-faint);
}

.index-page .navbar .brand-name,
.index-page .navbar .nav-link {
    color: var(--text-faint);
    transition: color 0.3s ease, background-color 0.3s ease;
}

.navbar.motion-active {
    background-color: var(--bg-color) !important;
}

/* .navbar.motion-active .brand-name,
.navbar.motion-active .nav-link {
    color: black;
} */

.brand-name,
.nav-link {
    transition: color 0.3s ease;
}

.brand-name:hover,
.nav-link:hover {
    color: inherit;
    cursor: pointer;
}

#navMenu {
    background-color: var(--bg-color) !important;
}

.nav-link {
    color: var(--text-muted) !important;
}

.nav-link:hover {
    color: var(--text-color) !important;
}

.motion-section {
    color: var(--text-faint);
    padding-block-end: 100px;
    margin-top: 100px;
    height: 100%;
    flex: 1;
}

.motion-title {
    letter-spacing: 2px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
    margin-top: 25px;
}

.motion-title span {
    display: inline-block;
    transform: translateY(100%);
}

.motion-title.active span {
    transform: translateY(0);
    transition: transform 0.7s ease;
}

#landscape-video-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    overflow: hidden;
    max-height: 350px;
    transition: max-height 0.6s ease;
}

#landscape-video-gallery.expanded {
    max-height: 2000px;
}

#landscape-video-gallery #card-text-wrapper:nth-child(n+4) {
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
}

#landscape-video-gallery.expanded #card-text-wrapper:nth-child(n+4) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#landscape-video-gallery #card-text-wrapper {
    padding: 16px;
    /* border-radius: 21px; */
    width: 100%;
    transition: transform 0.25s ease, background-color 0.25s ease;
    transform-origin: center;
}

#card-text-wrapper:hover {
    background-color: var(--bg-faint);
    transform: scale(1.04);
    cursor: pointer;
    color: var(--text-color);
}

#landscape-video-gallery .video-card {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    /* border-radius: 5px; */
}

#landscape-video-gallery .video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#landscape-video-gallery .video-text-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-title {
    margin-top: 10px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: 10px;
}

.chevron-circle {
    margin: auto;
    margin-block: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.chevron-circle i {
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chevron-circle.rotate i {
    transform: rotate(180deg);
    transition: transform 0.4s ease;
}

.chevron-circle:hover {
    background-color: var(--bg-faint);
    color: var(--text-color);
    cursor: pointer;
}

#portrait-video-gallery {
    padding-top: 30px;
    column-gap: 20px;
}

#portrait-video-gallery .video-card-wrapper {
    padding: 8px;
    width: auto;
    transition: transform 0.25s ease, background-color 0.25s ease;
    /* border-radius: 18px; */
}

#portrait-video-gallery .video-card-wrapper:hover {
    background-color: var(--bg-faint);
    transform: scale(1.04);
    cursor: pointer;
    color: var(--text-color);
}

#portrait-video-gallery .video-card img {
    width: auto;
    height: 250px;
    aspect-ratio: 3/4;
    /* border-radius: 5px; */
    object-fit: cover;
}

#portrait-video-gallery .video-text-wrapper {
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#portrait-video-gallery .video-title {
    margin: 5px;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
}

.lightbox video {
    max-width: 90%;
    max-height: 90%;
    transition: opacity 0.4s ease;
    opacity: 0;
}

#lightbox iframe {
    width: 90vw;
    height: 90vh;
    max-width: 1280px;
    max-height: 720px;
    border: none;
}

.lightbox.show video {
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10000;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #404040;
    cursor: pointer;
    z-index: 10000;
    user-select: none;
    padding: 0 10px;
}

#lightbox-prev {
    left: 10px;
}

#lightbox-next {
    right: 10px;
}

#lightbox-swipe-text {
    position: absolute;
    bottom: 50px;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: #5e5e5e;
    user-select: none;
    display: none;
}

@media (max-width: 768px) {
    body {
        padding-inline: 0;
    }

    .container {
        padding: auto;
    }

    body.lightbox-active {
        overflow: hidden;
    }

    .heading {
        text-align: center;
        margin-block: 20px;
    }

    #landscape-video-gallery {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    #landscape-video-gallery #card-text-wrapper {
        padding: 12px;
        width: 100%;
    }

    #landscape-video-gallery .video-card {
        width: 100%;
    }

    #portrait-video-gallery {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 20px;
        padding-bottom: 10px;
        margin-left: 10px;
        column-gap: 5px;
    }
    
    #portrait-video-gallery::-webkit-scrollbar {
        height: 6px;
    }

    #portrait-video-gallery .video-card-wrapper {
        flex: 0 0 auto;
        width: fit-content;
        padding: 5px;
    }

    .lightbox-arrow {
        display: none;
    }

    .lightbox {
        padding-bottom: 30px;
    }

    .lightbox-close {
        font-size: 1.5rem;
        top: 10px;
        right: 15px;
    }

    .lightbox.landscape video {
        width: 100%;
        height: auto;
    }
    
    .lightbox.portrait video {
        width: 80%;
        height: auto;
    }

    #lightbox-swipe-text {
        display: block !important;
    }
}


.motion-title span {
    display: inline-block;
    transform: translateY(100%);
}

.motion-title.active span {
    transform: translateY(0);
    transition: transform 0.7s ease;
}

#landscape-video-gallery #card-text-wrapper {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#landscape-video-gallery #card-text-wrapper.active {
    opacity: 1;
    transform: translateY(0);
}

#portrait-video-gallery .video-card-wrapper {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#portrait-video-gallery .video-card-wrapper.active {
    opacity: 1;
    transform: translateX(0);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
}

.lightbox video {
    max-width: 90%;
    max-height: 90%;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.show video {
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10000;
}

.chevron-circle {
    margin: auto;
    margin-block: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.chevron-circle:hover {
    background-color: var(--bg-faint);
    cursor: pointer;
}

#landscape-video-gallery #card-text-wrapper:hover,
#portrait-video-gallery .video-card-wrapper:hover {
    transform: scale(1.04);
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.stagger-delay-1 { transition-delay: 100ms; }
.stagger-delay-2 { transition-delay: 200ms; }
.stagger-delay-3 { transition-delay: 300ms; }
.stagger-delay-4 { transition-delay: 400ms; }

.heading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.heading.active {
    opacity: 1;
    transform: translateY(0);
}

.video-card {
    position: relative;
}

.video-card.active .img-fluid {
    filter: brightness(0.5);
    transition: filter 0.25s ease;
}

.scrub-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    cursor: pointer;
    transition: bottom 0.25s ease;
}

.scrub-bar.active {
    bottom: 12px;
}

.scrub-inner {
    position: absolute;
    height: 2px;
    width: 100%;
    left: 0;
    bottom: 0;
    transition: all 0.25s ease;
}

.scrub-inner.active {
    left: 50%;
    transform: translateX(-50%);
}

.scrub-progress {
    position: absolute;
    height: 2px;
    width: 0;
    background: red;
    border-radius: 2px;
    left: 0;
    top: 0;
}

.scrub-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: red;
    border-radius: 50%;
    top: -4px;
    display: none;
    pointer-events: none;
}

.preview-box {
    position: absolute;
    bottom: 36px;
    width: 160px;
    height: 92px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 1px solid var(--text-faint);
    display: none;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}