html { box-sizing: border-box; }

*,
*:before,
*:after { box-sizing: inherit; }

.gallery_bottom_style {
	text-transform: uppercase;
	font-size:14px;
	text-align:center;
	padding-top:5px;
	padding-bottom:5px;
	border-bottom-left-radius:5px;
	border-bottom-right-radius:5px;
/*	border: 1px solid #0071ad; */
/*	background:linear-gradient(to top, #004367 70%, #004367 50%, #004367) !important; */
/*	background-image: linear-gradient(#e0e0e0, #d6d6d6); */
	color:#292929;
}

.gallery-item .top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #acacac; /* TOP BAR COLOR   cfb87c*/
/*  border-top-left-radius: 5px;
  border-top-right-radius: 5px;*/
  padding: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 7;
  opacity: 0.9;
}

.gallery-item {
  float: left;
  width: 25%; /* how many image in a row, default : 33.333% */
  padding: 10px;
  position: relative;
  z-index: 7;
  display: none;
}

/* BG inside Gallery */
.gallery-item .inside {
  aspect-ratio: 1; /* Force square aspect ratio */
	background-image: linear-gradient(#dcdcdc, #c9c9c9); /* White background for padding */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 200px; /* Minimum height for consistency */
  position: relative; /* For positioning the top bar */
}

/* Bottom right overlay with icons */
.gallery-item .bottom-right-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #000;
  border-radius: 4px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  z-index: 10;
  min-width: 32px;
  opacity: 1;
}

.gallery-item:hover .bottom-right-overlay {
  opacity: 0;
/*  transition: opacity 0.3s ease-in-out;*/
}

.gallery-item .bottom-right-overlay .white-icon {
  color: #fff;
  font-size: 14px;
  opacity: 1;
  transition: all 0.2s ease-in-out;
  padding:3px;
}

/* Hover effect for icons */
.gallery-item:hover .bottom-right-overlay .white-icon {
  opacity: 1;
  transform: scale(1.1);
/*  padding:2px; */
}


.x_underline {
text-decoration: none !important;
 }

.white-icon {
color: #fff;
}

.inside {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
/*  border-top-left-radius:5px;
  border-top-right-radius:5px; */
}

.wrap_galleries {
  margin: 0 auto;
  max-width: 1200px;
  width: 98%;
}

h1 {
  text-align: center;
  margin: 50px 0;
}

.gallery-wrap,
#gallery {
  overflow: hidden;
}

#filters {
  margin: 1%;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

#filters li {
  float: left;
}

#filters li span {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  text-transform: uppercase;
  transition: all ease-in-out 0.25s;
  font-size:13px;
  background: #e8e8e8;
  color: #666;	/* tab font color */
/*  background-image: linear-gradient(#fff, #dedede);  */
/*	border: 1px solid #dedede; */

  position: relative; /* Required for positioning the pseudo-element */
  overflow: hidden;   /* Ensures the strip stays inside */
}

#filters li:hover span::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #0071ad; /* Blue strip color */
}

#filters li:hover span {
  color: #000; /* Selected font color */
/*  background: rgba(72, 141, 215, 0.1); /* Selected BG color */
	background: #f8f8f8; /* #d7d7d7 Selected BG color */
/*	border-top: 2px solid #007bff; */
}

#filters li span.active {
  background: #0071ad; /* tab bg color #691314 */
  color: #fff;
}

.details,
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  opacity: 0;
/*  background: #0071ad; /* Selected  BG Color */
  background: rgba(0, 113, 173, 0.7);
  z-index: 1;
  transition: all 0.1s ease-in-out;
}

.details {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.3s ease-in-out;
}
.details h2 {
  color: #fff;
  font-size: 1.5em;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  margin: 0;
}

.inside img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.gallery-item:hover .details,
.gallery-item:hover .overlay {
  opacity: 1;
}

@media (max-width: 30em) {
  .wrap {
    padding-left: 1em;
    padding-right: 1em;
  }

  .gallery-item {
    float: none;
    width: 100%;
  }
  
  /* Ensure square aspect ratio on mobile */
  .gallery-item .inside {
    min-height: 250px;
	background: #001d2d;
  }
}

/* Additional responsive breakpoints */
@media (max-width: 768px) {
  .gallery-item {
    width: 50%; /* 2 images per row on tablets */
  }
}

@media (max-width: 480px) {
  .gallery-item { width: 100%; /* 1 image per row on mobile */}
} 



.img-darker {
filter: brightness(95%) !important;
}

.details p {
  color: #fff2d0;
  font-size: 1em;
  text-align: center;
  margin: 0;
}