.mns-custom-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
	font-family: "Montserrat", Sans-serif;
}

.row {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Popup styles */
.mns-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000; 
    z-index: 1050;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
	font-family: "Montserrat", Sans-serif;
}

.mns-popup.active {
    display: flex;
}

.mns-popup-content {
    display: flex;
    flex-direction: row;
    gap: 35px; 
    max-width: 100%;
    max-height: 100%;
    padding: 0px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); 
    overflow: hidden;
}

.popup-main-image {
    width: 50%;
    height: auto;
    background-size: cover;
    background-position: center;
}

.popup-details {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
    overflow-y: auto; 
}

h2.popup-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
	font-family: "Montserrat", Sans-serif;
	color: #fff !important;
	text-transform: capitalize;
}

h2.popup-subtitle {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
	font-family: "Montserrat", Sans-serif;
	color: #fff !important;
	text-transform: uppercase;
}

.popup-description {
    font-size: 16px;
    line-height: 1.5;
    color: #ddd; 
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 44px;
    cursor: pointer;
    color: white;
    background: none;
    border: none;
}

/* .image-title {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    padding: 5px 10px;
    width: calc(100% - 20px);
    border-radius: 5px;
    box-sizing: border-box;
    z-index: 1;
} */

/* Image container and hover effect */
.image-container {
    position: relative;
    display: inline-block;
    text-align: center;
    overflow: hidden;
}

/* Default image styles */
.thumbnail, .large-image {
    background-size: cover;
    background-position: center;
    cursor: pointer;
    position: relative;
    width: 100%;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease; /* Smooth hover effect */
}

/* Remove zoom and brightness adjustments */
.image-container:hover .thumbnail,
.image-container:hover .large-image {
    transform: none; /* No zoom effect */
    filter: none; /* No brightness adjustment */
}

/* Add dim black overlay when hovering */
.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0); /* Initially transparent */
    transition: background 0.3s ease; /* Smooth transition for dim effect */
    z-index: 1; /* Place it above the image but below the text */
	pointer-events: none; /* Ensure clicks pass through the overlay */
}

.image-container:hover::after {
    background: rgba(0, 0, 0, 0.5); /* Add a semi-transparent black overlay */
}

/* Ensure the title remains visible */
.image-title {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    padding: 5px 10px;
    width: calc(100% - 20px);
    border-radius: 5px;
    box-sizing: border-box;
    z-index: 2; /* Ensure the title stays above the dim effect */
}

.thumbnail {
    width: 100%;
    height: auto;
}

.large-image {
    width: 100%;
    height: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .row {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .thumbnail {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .large-image {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .popup-main-image {
        width: 100%;
        height: auto;
        flex:1;
    }

    .mns-popup-content {
        display: block;
    }

    .popup-details {
        max-width: 100%;
    }
}

/* Focus styles for accessibility */
.image-container:focus .image-title,
.popup-close:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
