.container-masonry {
  width: 100%;
  margin: 10px auto;
  columns: 4;
  column-gap: 10px;
}

.container-masonry .box {
  width: 100%;
  margin-bottom: 10px;
  break-inside: avoid;
}

.container-masonry .box img {
  max-width: 100%;
}

@media (max-width: 1200px) {
  .container-masonry {
    width: calc(100% - 40px);
    columns: 3;
  }
}

@media (max-width: 768px) {
  .container-masonry {
    columns: 2;
  }
}

@media (max-width: 480px) {
  .container-masonry {
    columns: 1;
  }
}

#gallery-select-mason {
	width: 50%;
    background: none;
    border: none;
    font-size: 34px;
 	font-family: 'Libre Caslon Display';
	line-height: 85px;
    padding-bottom: 10px;
	color: #00152B;
	text-transform: uppercase;
	border-bottom: 1px solid #91D0DC;
    cursor: pointer;
}

#gallery-select-mason option {
    background: #F6F6F6;
	color: #00152B;
    border-bottom: 1px solid #91D0DC !important;

}
#gallery-select-mason option:hover {
    background: #fff;;
	color: #00152B;
    border-bottom: 1px solid #91D0DC;
}

.gallery-select:focus {
    outline: none;
}

.media-gallery-title {
    font-size: 85px;
    color: #91D0DC;
    font-family: 'Libre Caslon Display';
	line-height: 85px;
   
}

.title-gallery {
    position: absolute;
    left: 145px;
    /*top: -130px;*/
    font-size: 50px;
    text-transform: uppercase;
	color: #d09337;
	font-family: "Libre Caslon Display", serif;
	
}

.title-gallery_2 {
    position: absolute;
    left: 2980px;
    /*top: 130px;*/
    font-size: 50px;
    text-transform: uppercase;
    color: #d09337;
    font-family: "Libre Caslon Display", serif;
}

.title-gallery_2::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 35px);
    width: calc(100% - 210px);
    height: 4px;
    background-color: #d09337;
    transform: translateY(-50%);
}
.gallery {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
	justify-content: start;
    position: relative;
    height: 500px;
}

.gallery img {
     height: auto;
     object-fit: cover;
}

/***POPUP***/

.popup-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
	width: 15px;
    cursor: pointer;
    user-select: none;
    z-index: 1001;
}

.left-arrow {
    left: 20px; 
}

.right-arrow {
    right: 20px; 
}

@media only screen and (max-width: 700px){
	
	.gallery {
		height: 600px;
		max-height: 600px;
	}
	
	.title-gallery{
		width: 100px;
		word-wrap: break-word !important;
		position: absolute;
		left: 0px;
		/*top: 280px;*/
		font-size: 38px;
		text-transform: uppercase;
		color: #d09337;
		font-family: "Libre Caslon Display", serif;
		padding-left: 10px;
	}

}

.gallery-names {
    display: flex;
	justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    top: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 1000; 
}

.gallery-name {
    cursor: pointer;
    padding: 5px 10px;
    background-color: transparent;
    border-radius: 0;
    transition: border-bottom 0.3s;
    color: #ce902c;
    opacity: 50%;
    font-size: 40px;
    font-family: "Libre Caslon Display", serif;
}

.gallery-name:hover,
.gallery-name.active {
    background-color: transparent;
    border-bottom: 2px solid #ce902c;
    opacity: 100%;
}

/* Ensure no border-bottom is applied if the title-gallery is not present */
.gallery:not(:has(.title-gallery)) .gallery-name:hover,
.gallery:not(:has(.title-gallery)) .gallery-name.active {
    border-bottom: 0;
}

#gallery-select-mason {
    background-color: white;
    appearance: none; 
    -webkit-appearance: none
    -moz-appearance: none;
}


#gallery-select-mason:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 blue !important;
}


.custom-select-option {
    background-color: white !important;
    color: #00152B !important;
	border-bottom: 1px solid #91D0DC !important;
	border-radius: 0 !important;
}

.custom-select-option option{
	border-bottom: 1px solid #91D0DC !important;
	border-radius: 0 !important;
}

/* Modal styles */
.modal-mason {
    display: none;
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4); 
}

.modal-mason .modal-content-mason {
    background-color: #fefefe;
    margin: 20% auto; 
    padding: 20px;
    border: none;
    width: 50%; 
	border-radius: 0;
}

.modal-mason .modal-content-mason li{
	list-style: none;
	text-transform: uppercase;
	font-size: 28px;
 	font-family: 'Libre Caslon Display';
	line-height: 85px;
	color: #00152B;
	opacity: 50%;
	border-bottom: 1px solid #91D0DC;
	cursor: pointer;
}

.modal-mason .modal-content-mason li:hover,
.modal-mason .modal-content-mason li:active,
.modal-mason .modal-content-mason li:focus
{
	opacity: 100%;
}

.close {
    color: #aaa;
    float: right !important;
    font-size: 28px;
    font-weight: bold;
	text-align: end;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#openModalBtnMason{
	width: 70%;
    background: none;
    border: none;
    font-size: 22px;
 font-family: 'Libre Caslon Display';
	line-height: 65px;
    padding-bottom: 10px;
	color: #00152B;
	text-transform: uppercase;
	border-bottom: 1px solid #91D0DC;
    cursor: pointer;
	text-align: start;	
	position: relative;
}

#modalFormMason img {
	position: relative;
	/*transform: translateY(-50%);*/
	width: 30px; 
	height: auto;
	left: -50px !important;
}

.modal-mason .modal-content-mason li.active {
	opacity: 100%;
}


@media only screen and (max-width: 760px){
	.modal-content-mason li:active{
		opacity: 100%;
	}
	
	.media-gallery-title {
    font-size: 75px;
    line-height: 75px;
    margin-bottom: 50px;
}
#openModalBtnMason {
    width: 89%;
    font-size: 26px;
    line-height: 33px;
	border-bottom: unset;
}
	#modalFormMason {
    border-bottom: 1px solid #91D0DC;
}
	
	#modalFormMason img {
    left: 0px !important;
}
	ul#modal-content-mason {
    padding-left: 0;
}
	
	.modal-mason .modal-content-mason {
    width: 100%;
    margin: 40% auto;


}
	.container-masonry {
    width: calc(100% - 25px);
}
	.modal-mason .modal-content-mason li {
    font-size: 28px;
    line-height: 40px;
}
}

.image-popup-backdrop {
	display: none;
	position: fixed;
	z-index: 9998;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	justify-content: center;
	align-items: center;
}

.image-popup {
	max-width: 90%;
	max-height: 90%;
}


