/* ========================================================= */
/* HERO VIDEO BACKGROUND */
/* ========================================================= */
.hero-video {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--color-text-light);
    background-color: var(--color-background-dark);
}

.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    filter: saturate(1.1) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(10, 25, 47, 0.85),
        rgba(10, 25, 47, 0.85)
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 12rem 5%;
    max-width: 900px;
}

.hero-content h1 {
    font-size: 3.6rem;
    line-height: 1.15;
    margin-bottom: 1.2rem;
}

.hero-content p {
    font-size: 1.4rem;
    color: #B0C4DE;
    margin-bottom: 3rem;
}

.hero-cta {
    font-size: 1.1rem;
    padding: 16px 36px;
}

/* --------------------------------------------------------- */
/* PRODUCT & MEDIA SECTIONS */
/* --------------------------------------------------------- */
.product-media {
    flex: 1;
    min-height: 350px;
    background-color: var(--color-background-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-light);
    font-size: 1.5rem;
    position: relative;
    cursor: pointer;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-light);
    background-color: var(--color-background-dark);
    font-style: italic;
    text-align: center;
    padding: 20px;
    line-height: 1.3;
}

.product-media img,
.product-media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s;
    opacity: 0;
}

.product-media img.loaded,
.product-media video.loaded {
    opacity: 1;
}

/* --------------------------------------------------------- */
/* MODAL & GALLERY STYLES */
/* --------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.active {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: var(--color-body-bg);
    margin: 5% auto;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-btn {
    color: var(--color-primary);
    float: right;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 10;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--color-secondary);
}

/* ---------------- Gallery ---------------- */
.gallery-container {
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    padding-bottom: 30px;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.gallery-slide {
    min-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gallery-slide img,
.gallery-slide video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-slide p.caption {
    margin-top: 10px;
    font-style: italic;
    color: var(--color-text-dark);
}

/* Gallery Navigation */
.gallery-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    z-index: 5;
    font-size: 1.2rem;
    border-radius: 50%;
}

.gallery-nav button:hover {
    background: var(--color-secondary);
}

.gallery-nav .prev-btn { left: 10px; }
.gallery-nav .next-btn { right: 10px; }

/* Dots Navigation */
.gallery-dots {
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}
.gallery-dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: var(--color-border);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}
.gallery-dot.active {
    background-color: var(--color-secondary);
}

/* --------------------------------------------------------- */
/* RESPONSIVE MEDIA HANDLING ----------------------------- */
@media (max-width: 900px) {
    .hero-bg-video {
        display: none;
    }
    .hero-overlay {
        display: none;
    }
    #hero {
        background:
            linear-gradient(rgba(10,25,47,0.9), rgba(10,25,47,0.9)),
            url("/assets/images/hero.png") center/cover no-repeat;
    }
}

@media (max-width: 768px) {
    .product-media {
        min-height: 250px;
    }
    .gallery-slide img,
    .gallery-slide video {
        max-height: 50vh;
    }
}
