
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #07111a;
    color: #fff;
    font-family: Arial, sans-serif;
}

/* =========================
   SECTION
========================= */

.gallery-section {
    width: 100%;
    padding: 80px 40px;
    overflow: hidden;
}

.gallery-header {
    text-align: center;
    margin-bottom: 45px;
}

.gallery-small-title {
    font-size: 12px;
    letter-spacing: 5px;
    color: #c9a86a;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.gallery-header h2 {
    font-family: Georgia, serif;
    font-size: clamp(32px, 4vw, 54px);
    font-weight: 400;
    letter-spacing: 1px;
}

.gallery-line {
    width: 55px;
    height: 1px;
    background: #c9a86a;
    margin: 22px auto 0;
}

/* =========================
   CAROUSEL
========================= */

.carousel-wrapper {
    position: relative;
    max-width: 1450px;
    margin: auto;
}

.carousel-window {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.7s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

/* =========================
   CARD
========================= */

.media-card {
    position: relative;
    flex: 0 0 calc(25% - 15px);
    height: 420px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: #101c26;
    border: 1px solid rgba(255,255,255,.08);
    transition:
        transform .5s ease,
        border-color .5s ease,
        box-shadow .5s ease;
}

.media-card:hover {
    transform: translateY(-8px);
    border-color: rgba(201,168,106,.7);
    box-shadow: 0 20px 50px rgba(0,0,0,.45);
}

/* =========================
   IMAGE
========================= */

.media-image,
.media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-video {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease;
    pointer-events: none;
}

.media-card.is-video .media-video {
    opacity: 1;
    visibility: visible;
}

.media-card.is-video .media-image {
    opacity: 0;
}

/* =========================
   DARK OVERLAY
========================= */

.media-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.75),
            rgba(0,0,0,.05) 55%,
            rgba(0,0,0,.1)
        );
    pointer-events: none;
}

/* =========================
   CARD CONTENT
========================= */

.card-content {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 5;
}

.card-number {
    font-size: 11px;
    letter-spacing: 3px;
    color: #c9a86a;
    margin-bottom: 8px;
}

.card-title {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 400;
}

.video-hint {
    margin-top: 10px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(8px);
    transition: .4s ease;
}

.media-card:hover .video-hint {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   NAVIGATION
========================= */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(201,168,106,.8);
    background: rgba(7,17,26,.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    font-size: 22px;
    transition: .3s ease;
    backdrop-filter: blur(8px);
}

.carousel-btn:hover {
    background: #c9a86a;
    color: #07111a;
}

.carousel-prev {
    left: -26px;
}

.carousel-next {
    right: -26px;
}

/* =========================
   DOTS
========================= */

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 35px;
}

.carousel-dot {
    width: 30px;
    height: 2px;
    border: none;
    background: rgba(255,255,255,.25);
    cursor: pointer;
    transition: .3s ease;
}

.carousel-dot.active {
    background: #c9a86a;
    width: 50px;
}

/* =========================
   FULLSCREEN VIDEO
========================= */

.fullscreen-video {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.97);
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 30px;
}

.fullscreen-video.active {
    display: flex;
}

.fullscreen-video video {
    width: 100%;
    height: 100%;
    max-width: 1500px;
    object-fit: contain;
}

.close-video {
    position: absolute;
    top: 25px;
    right: 30px;

    width: 48px;
    height: 48px;

    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.5);

    background: rgba(0,0,0,.4);
    color: white;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
    z-index: 100000;
}

.close-video:hover {
    background: white;
    color: black;
}

/* =========================
   FINAL IMAGE
========================= */

.final-image {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0;
    visibility: hidden;

    transition: opacity .5s ease;
}

.media-card.video-finished .media-image,
.media-card.video-finished .final-image {
    opacity: 1;
    visibility: visible;
}

.media-card.video-finished .media-video {
    opacity: 0;
    visibility: hidden;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 1100px) {

    .media-card {
        flex: 0 0 calc(33.333% - 14px);
    }

}

@media (max-width: 750px) {

    .gallery-section {
        padding: 60px 20px;
    }

    .media-card {
        flex: 0 0 calc(50% - 10px);
        height: 330px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

}

@media (max-width: 500px) {

    .media-card {
        flex: 0 0 100%;
        height: 400px;
    }

    .carousel-btn {
        width: 42px;
        height: 42px;
    }

    .fullscreen-video {
        padding: 10px;
    }

}

/* =========================================================
   CAROUSEL FIX FOR MAIN PROJECT
   ========================================================= */

   .media-card {
    position: relative !important;
    height: 625px !important;
    overflow: hidden !important;
    background: #07111a !important;
    border-radius: 5px !important;
}

/* Force image to fill the complete card */
.media-card .media-image,
.media-card .final-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    object-fit: cover !important;
    display: block !important;

    z-index: 1 !important;
}

/* Video also fills complete card */
.media-card .media-video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    object-fit: cover !important;

    z-index: 2 !important;
}

/* Dark gradient over image */
.media-card .media-overlay {
    position: absolute !important;
    inset: 0 !important;

    z-index: 3 !important;

    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05) 20%,
        rgba(0, 0, 0, 0.25) 45%,
        rgba(4, 12, 18, 0.95) 100%
    ) !important;

    pointer-events: none !important;
}

/* Text must remain visible */
.media-card .card-content {
    position: absolute !important;

    left: 36px !important;
    right: 30px !important;
    bottom: 35px !important;

    z-index: 5 !important;

    color: #ffffff !important;
}

/* Number */
.media-card .card-number {
    color: #d5ae67 !important;

    font-size: 16px !important;
    font-weight: 500 !important;

    letter-spacing: 4px !important;

    margin-bottom: 25px !important;
}

/* Title */
.media-card .card-title {
    color: #ffffff !important;

    font-family: Georgia, "Times New Roman", serif !important;

    font-size: 30px !important;
    line-height: 1.45 !important;

    font-weight: 400 !important;

    opacity: 1 !important;
}

/* Hover text */
.media-card .video-hint {
    color: #ffffff !important;

    font-size: 11px !important;
    letter-spacing: 2px !important;

    opacity: 0 !important;

    transition: all .35s ease !important;
}

.media-card:hover .video-hint {
    opacity: 1 !important;
}


/* =========================================================
   VIDEO STATE
   ========================================================= */

.media-card .media-video {
    opacity: 0 !important;
    visibility: hidden !important;
}

.media-card.is-video .media-video {
    opacity: 1 !important;
    visibility: visible !important;
}

.media-card.is-video .media-image {
    opacity: 0 !important;
}


/* =========================================================
   FINAL IMAGE AFTER VIDEO
   ========================================================= */

.media-card .final-image {
    opacity: 0 !important;
    visibility: hidden !important;
}

.media-card.video-finished .media-image {
    opacity: 0 !important;
    visibility: hidden !important;
}

.media-card.video-finished .media-video {
    opacity: 0 !important;
    visibility: hidden !important;
}

.media-card.video-finished .final-image {
    opacity: 1 !important;
    visibility: visible !important;
}


/* =========================================================
   IMPORTANT - PREVENT BOOTSTRAP FROM SHRINKING IMAGES
   ========================================================= */

.media-card img {
    max-width: none !important;
    height: 100% !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 1100px) {

    .media-card {
        height: 550px !important;
    }

    .media-card .card-title {
        font-size: 27px !important;
    }
}


@media (max-width: 750px) {

    .media-card {
        height: 480px !important;
    }

    .media-card .card-content {
        left: 25px !important;
        bottom: 28px !important;
    }

    .media-card .card-title {
        font-size: 24px !important;
    }
}


@media (max-width: 500px) {

    .media-card {
        height: 450px !important;
    }

    .media-card .card-title {
        font-size: 22px !important;
    }

}