/* ============================================================
   Delight Direct Marketing - Custom Styles
   Consolidated from inline <style> blocks (index.html, gallery.html)
   Loaded after style-starter.css on every page.
   ============================================================ */

/* ---------- Global layout variables ---------- */
:root {
    --header-height: 80px;
}

@media (max-width: 991px) {
    :root {
        --header-height: 60px;
    }
}

/* ============================================================
   HERO SLIDESHOW (index.html)
   ============================================================ */
.slideshow-hero-section {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    overflow: hidden;
    background-color: #000;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Slides are stacked and fade in/out via the .active class */
.mySlides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.mySlides.active {
    opacity: 1;
    z-index: 2;
}

/* First slide visible before JS kicks in */
.mySlides:first-child {
    opacity: 1;
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Slide caption */
.slide-text {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.slide-text h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: white;
}

.slide-text p {
    font-size: 1.2rem;
    color: white;
}

/* Navigation arrows */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    text-decoration: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Dots / indicators */
.dots-container {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

/* Scoped to .dot so the generic .active class on other
   elements (header, nav, overlay) is not affected */
.dot.active,
.dot:hover {
    background-color: #717171;
}

/* Fading animation helper */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from { opacity: .4; }
    to   { opacity: 1; }
}

/* ============================================================
   VIDEO HERO (index.html)
   ============================================================ */
.video-hero-section {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    overflow: hidden;
    background-color: #000;
}

.video-hero-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-hero-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.mobile-fallback-image {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

@media (max-width: 768px) {
    .video-hero-container video.mobile-hidden {
        display: none;
    }

    .mobile-fallback-image.mobile-visible {
        display: block;
    }
}

/* ============================================================
   FIXED HEADER ON MOBILE (site-wide)
   ============================================================ */
@media (max-width: 768px) {
    body {
        padding-top: var(--header-height);
    }

    #site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: var(--bg-color);
    }
}

/* ============================================================
   MOVE-TOP BUTTON (site-wide, overrides style-starter)
   ============================================================ */
#movetop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 16px;
    border: none;
    outline: none;
    background-color: var(--primary-color, #0d6efd);
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 4px;
    display: none;
}

#movetop:hover {
    background-color: var(--secondary-color, #0b5ed7);
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS (slideshow)
   ============================================================ */
@media (max-width: 768px) {
    .slide-text h2 {
        font-size: 1.8rem;
    }

    .slide-text p {
        font-size: 1rem;
    }

    .prev,
    .next {
        padding: 10px;
        font-size: 20px;
    }

    .dot {
        height: 12px;
        width: 12px;
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    .slide-text {
        bottom: 15%;
        padding: 15px;
    }

    .slide-text h2 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .slide-text p {
        font-size: 0.9rem;
    }
}

@media (max-width: 320px) {
    .slide-text {
        bottom: 10%;
        padding: 10px;
    }

    .prev,
    .next {
        padding: 8px;
        font-size: 18px;
    }
}

/* ============================================================
   GALLERY GRID + LIGHTBOX (gallery.html)
   ============================================================ */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lightbox overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay.active {
    display: flex;
    background-color: rgba(0, 0, 0, 0.9);
}

.overlay-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
}

.overlay-content img {
    max-width: 100%;
    max-height: 80vh;
    border: 3px solid white;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.back-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.back-btn:hover {
    background-color: #555;
}

/* Gallery grid responsiveness */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}
