

:root {
    --card-height: 280px;
    --transition-speed: 0.4s;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sub-hero {
    background-color: #F2EDE8;
    padding: 10px 10px 0
}

.sub-hero__container {
    overflow: hidden;
    border-radius: 30px;
    padding: 82px 10px 72px;
    min-height: 450px;
    position: relative;
    background-color: var(--brown-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column
}

.sub-hero__container .bg img {
    object-fit: cover
}

.sub-hero__container .bg:before {
    background: linear-gradient(180deg,rgba(0,0,0,.5) 0,rgba(0,0,0,0) 100%);
    z-index: 2
}

.sub-hero__container .bg:after {
    background: linear-gradient(0deg,rgba(0,0,0,.4) 0,rgba(0,0,0,.4) 100%);
    z-index: 2
}

.sub-hero__container .txt {
    display: flex;
    height: auto;
    flex: 1;
    align-items: center;
    justify-content: center;
    flex-direction: column
}

.sub-hero__container .txt h1,.sub-hero__container .txt h3,.sub-hero__container .txt p {
    color: #fff;
    text-align: center;
    position: relative;
    z-index: 3
}


.sub-hero__container .txt .bts {
    justify-content: center;
    position: relative;
    z-index: 3
}

.sub-hero__container .infotext_h {
    z-index: 3;
    color: #FFF;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    line-height: 140%;
    padding: 0;
    margin: 30px 0 0
}

.sub-hero__container .infotext_h a {
    text-decoration: underline;
    color: #fff
}

@media (min-width: 768px) {
    .sub-hero__container {
        min-height:450px
    }

    .sub-hero__container .txt {
        max-width: 560px;
        margin: 0 auto
    }
}

/* --- Gallery Card Styling --- */
.gallery-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: box-shadow var(--transition-speed) ease;
    cursor: pointer;
    height: 100%;
}

.gallery-card:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.15); /* Elevation effect */
}

.img-container {
    height: var(--card-height);
    overflow: hidden; /* Necessary for the zoom effect to stay contained */
    position: relative;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents distortion */
    transition: transform var(--transition-speed) ease;
    display: block;
}

/* Smooth Zoom on Hover */
.gallery-card:hover .gallery-img {
    transform: scale(1.1);
}

/* --- Lightbox Styling --- */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; 
    height: 100vh;
    z-index: 9999; 
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(4px); 
}

/* Add this new rule to ensure the content wrapper centers perfectly */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    overflow: hidden;
    animation: scaleUp 0.3s ease-out;
    margin: auto; 
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
}

#lightbox.active {
    display: flex;
    opacity: 1;
}


.lightbox-img
.lightbox-video {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    object-fit: contain;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    cursor: pointer;
    z-index: 1060;
    transition: transform 0.2s;
    line-height: 1;
}

.close-btn:hover {
    transform: scale(1.2);
}

@keyframes scaleUp {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

/* --- Video Specific Styling --- */

/* 1. Play Button Overlay for Grid Cards */
.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Allows click to pass through to the card */
    border: 2px solid white;
    z-index: 2;
    transition: transform 0.3s ease, background-color 0.3s;
}

/* The Triangle Icon */
.video-indicator::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 14px solid white;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 4px; /* Optical centering */
}

/* Hover Effect for Play Button */
.gallery-card:hover .video-indicator {
    background-color: rgba(219, 45, 60, 0.9); /* Your theme red/accent color */
    transform: translate(-50%, -50%) scale(1.1);
}

/* 2. Lightbox Video Player */
.lightbox-video {
    max-width: 100%;
    max-height: 90vh;
    display: none; /* Hidden by default */
    outline: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* Lightbox Container - ensures content is centered */
#lightbox {
    /* These properties might already exist, but ensure they are present */
    display: none; /* Managed by JS */
    position: fixed;
    z-index: 10000; /* High z-index to sit on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevents scrolling behind the lightbox */
    background-color: rgba(0,0,0,0.9); /* Dark overlay */
    
    /* Flexbox is crucial for centering the image */
    justify-content: center;
    align-items: center;
}

/* Lightbox Content Wrapper */
.lightbox-content {
    position: relative;
    /* Limit container size to 90% of screen width/height */
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The Image Itself - The Fix */
.lightbox-img {
    width: auto;
    height: auto;
    /* This prevents the image from exceeding the container's bounds */
    max-width: 100%;
    max-height: 90vh; 
    /* Ensures the image isn't stretched or cropped */
    object-fit: contain; 
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5); /* Optional: adds nice depth */
}

/* Apply similar rules to the video to prevent it from being huge */
.lightbox-video {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 90vh;
}
