body {
    overflow-x: hidden !important;
}

#grid .item img {
    width: 100%;
    height: 100%;
    /* Set the desired height for all images */
    object-fit: cover !important;
    /* Ensures the image covers the space without distortion */
}

/* Default margin-top for larger screens */
#grid .item {

    /* Adjust this value as needed */
}

/* Styles for non-mobile devices (larger screens) */
.container-fluid.tm-container-content,
.row.tm-gallery {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
}

/* For screens smaller than 768px (e.g., mobile devices) */
@media (max-width: 768px) {
    .header {
        position: relative;
        display: flex;
        height: 60vw;
        max-height: 60vh;
        /* height of hero */
        background: url('img/wall2.jpg') no-repeat center center;
        /* Replace 'your-image-url.jpg' with your image URL */
        background-size: cover;
        /* Ensures the image covers the entire area */
        overflow: hidden;
    }
}
}

/* For screens between 768px and 1024px (e.g., tablets, iPads) */
@media (min-width: 768px) and (max-width: 1024px) {
    .header {
        position: relative;
        display: flex;
        height: 50vw;
        max-height: 50vh;
        /* Adjust hero height for tablets */
        background: url('img/wall2.jpg') no-repeat center center;
        /* Replace 'your-image-url.jpg' with your image URL */
        background-size: cover;
        /* Ensures the image covers the entire area */
        overflow: hidden;
    }
}

/* Targeting devices around iPad Pro 13-inch width */
@media (min-width: 2000px) and (max-width: 2200px) {
    .header {
        position: relative;
        display: flex;
        height: 10vw;
        max-height: 10vh;
        background: url('img/wall2.jpg') no-repeat center center;
        background-size: cover;
        overflow: hidden;
    }
}

@media (min-width: 1024px) and (max-width: 1366px) {
    .header {
        position: relative;
        display: flex;
        height: 60vw;
        max-height: 60vh;
        background: url('img/wall2.jpg') no-repeat center center;
        background-size: cover;
        overflow: hidden;
    }
}

/* Landscape*/
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {
    .header {
        position: relative;
        display: flex;
        height: 55vw;
        max-height: 55vh;
        background: url('img/wall2.jpg') no-repeat center center;
        background-size: cover;
        overflow: hidden;
    }
}

/* Portrait*/
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {

    @media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {
        .header {
            position: relative;
            display: flex;
            height: 25vw;
            max-height: 25vh;
            background: url('img/wall2.jpg') no-repeat center center;
            background-size: cover;
            overflow: hidden;
        }
    }

}

.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
}

.video-container img,
.video-container video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.video-container video {
    display: none;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
    border: solid 2px white;
    text-align: center;
}

.video-container:hover video,
.video-container.active video {
    display: block;
}

.video-container:hover img,
.video-container.active img {
    display: none;
}

.video-container:hover .video-overlay,
.video-container.active .video-overlay {
    opacity: 1;
}

.modal-dialog {
    max-width: 1200px;
    margin: 30px auto;
    max-width: 80%;
    /* Adjust as needed */
    /*overflow: hidden;*/
}

.modal-body {
    position: relative;
    padding: 0px;

}

.btn-close {
    position: absolute;
    right: -30px;
    top: 0;

}

/* Darken backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Semi-transparent black */
    z-index: 1040;
    /* Ensure it's below the modal but above other content */
}

.modal-backdrop {
    background-image: url('../img/modalbg3.png') !important;
    /* Replace with your image URL */
    background-size: cover;
    /* Ensure the image covers the entire backdrop */
    background-position: center;
    /* Center the image */
    position: fixed;
    /* Ensure it covers the viewport */
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    /* Full coverage of the screen */
    z-index: 1040;
    /* Ensure it stays behind the modal content */
    opacity: 0.9 !important;
    /* Set full opacity (no transparency) */
    /*background-color: rgba(0, 0, 0, 1) !important; /* Jet black, fully opaque */
}

/* Ensure the modal is vertically centered on mobile devices */
@media (max-width: 768px) {
    .modal-dialog {
        /* Ensure modal takes up most of the width, and it's centered */
        width: 90%;
        margin: auto;
        /* Force the modal to align correctly for smaller screens */
        top: 50% !important;
        transform: translateY(-50%) !important;
        /* This makes the modal truly centered vertically */
    }
}