/* Tiny portrait phones (like iPhone SE, 320px) */

#filtered-gallery {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  width: 100vw;
  /* padding-right: 15px; */
  padding-left: 0;
  padding-right: 0;
  margin-right: 0;
}

.filter-nav {
  width: 98%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  column-gap: 0.25rem;  /* horizontal space */
  row-gap: 0.1rem;      /* tighter vertical space */
}

.filter-nav .text-button {
  /*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #B8860B;   /* #444;*/
  background: none;
  border: none;
  padding: 0.3rem 0.5rem;
  margin: 0;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0rem 0.2rem;
}

.filter-nav .text-button:hover {
  color: #333; /*#e53935;*/
  background-color: #D4AF37;
  background-color: #c8ae5f;
  font-weight: 500;
}

.filter-nav .text-button.active {
  background-color: #333;
  color: #c8ae5f;
  color: #D4AF37;
  font-weight: 500;
}

#filtered-gallery .card {
  border-radius: 0;
  border: none;
  background-color: #f3e8c5;
  background-color: #eee7c9;
  background-color: #f1f2f9;
  /* background-color: #F5F5F5; */
  background-color: #f5f1e6;
  background-color: #f1eaea;

  background-color: #F5F5F5;
  /* background-color: rgba(245, 224, 232, 0.2); */
  background-color: lavender;

  /* transition: all 2s ease-in-out; */
}


#gallery-masonry {
  /* display: grid;
  grid-template-rows: masonry;
  justify-content: center; */
  width: 100%;
  padding: 1rem 0;
  /* padding-right: 0; */
  /* width: 96vw; */
  /* width: 95%; */
  margin-left: auto;
  margin-right: auto;
  /* width: 100vw; */
  column-count: 1;
  column-gap: 5px;
  /* padding-left: 0.5rem;
  padding-right: 0.5rem; */
  overflow-x: hidden;
  /* padding-left: 0.5rem; */
  /* padding-right: 0.5rem; */
}

#gallery-masonry .gallery-item {
  display: inline-block none;
  width: 97%;
  margin-bottom: 0.5rem;
  /* margin-left: 0.25rem; */
  /* margin-right: 0.25rem; */
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  break-inside: avoid;
  page-break-inside: avoid;
  box-sizing: border-box;
  overflow-x: hidden;
  /* transition: opacity 0.5s ease-in, transform 0.5s ease-in;
  opacity: 0;
  transform: translateY(20px); */
}
/* 
.gallery-item.show {
  opacity: 1;
  transform: translateY(0);
} */


#gallery-masonry .card-img-top {
  border-top-left-radius: 0;
  border-top-right-radius: 0;

  height: auto;
  max-height: 90vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: all 2s ease-in-out;
}

#gallery-masonry .card-body {
  /* padding-left: 0;
  padding-right: 0;; */
  padding: 8px 8px 8px 8px;
  /* background-color: rgba(245, 224, 232, 0.2); */
  background-color: lavender;
}

#gallery-masonry .card-title {
  font-family: 'Jost', sans-serif !important;
  font-size: 1.3rem;      /* ≈ 20px */
  font-weight: 500;        /* Semi-bold */
/*  color:#cc1939;*/
  color: #B08D57; /* Bronze Gold */
  color: #B8860B;   /* #444;*/
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  transition: font-size 0.2s ease; /* For a smooth hover effect */  
}

#gallery-masonry h5 {
  text-shadow: none;
}

#gallery-masonry .card-text {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;         /* ≈ 16px */
  font-weight: 300;
  color: #333;
  line-height: 1.4;
  transition: font-size 0.2s ease; /* For a smooth hover effect */  
}

#loadMoreBtn {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  letter-spacing: .25rem;
  width: 200px;
  border-radius: 25px;
  border: rgba(0, 0, 0, 0);
  background-color: #333;
  background-color: #827020; /* #4f4f4f;*/  
  color: white;
  padding: 0.5rem 1.5625rem 0.5rem 1.5625rem;
  transition: all 0.4s ease;
}

#loadMoreBtn:active {
  background-color: #827020; /* #4f4f4f;*/
  background-color: #D4AF37; /* Metallic Gold */
  opacity: 1;
  transform: translateY(-3px); /* Move the button up slightly */
  box-shadow: 0 4px 8px rgba(0,0,0,0.4); /* Add a subtle shadow */
}

#loadMoreBtn:hover {
  background-color: #827020; /* #4f4f4f;*/  
  background-color: #D4AF37; /* Metallic Gold */
  opacity: 1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4); /* Add a subtle shadow */
}

#loadMoreBtn:visited{
  background-color: #827020; /* #4f4f4f;*/  
  opacity: 1;
}

/* --- Hover styles ONLY for devices that can truly hover --- */
/*
@media (hover: hover) {
  #loadMoreBtn:hover {
    background-color: #827020; /* #4f4f4f;
    opacity: 1;
    transform: translateY(-3px); /* Move the button up slightly 
    box-shadow: 0 4px 8px rgba(0,0,0,0.4); /* Add a subtle shadow 
  }
}
*/


/* Default lightbox width */
.custom-lightbox {
  margin: 0.5rem auto;
  max-width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Base size for small devices */
.lightbox-nav i {
  font-size: 24px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
/*  color: #333;*/
  color: #827020; /* #4f4f4f;*/  
  font-size: 2rem;
/*  background: rgba(0, 0, 0, 0.4);*/
/*  background-color: white; */
  background-color: transparent;
  border: none;
  z-index: 1056;
}
.lightbox-prev { left: 0; padding: 0 5px; }
.lightbox-next { right: 0; padding: 0 5px; }

.modal-body { 
  position: relative; 
  padding: 0; 
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  background-color: white;
}

.modal-img {
  height: auto;
  max-height: 65vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0.5rem auto;
  padding-top: 1.5rem;
}

/* Caption positioned just inside bottom */
.modal-caption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  text-align: center;
  font-family: 'Jost', sans-serif;
  text-transform: uppercase;
  font-size: 1rem;
/*  background-color: rgba(184, 134, 11, 0.65);   /* #444;*/
/*  background: rgba(0, 0, 0, 0.65);*/

  color: #fff;
  color: #b8860b;
  
  font-weight: 700;
  z-index: 2000;
}


/* --- XS Custom Breakpoints: <576px --- */

@media (min-width: 360px) {

  #gallery-masonry {
    margin-right: 0;
  }
  .custom-lightbox {
    max-width: 90vw;
  }
  .lightbox-nav i {
    font-size: 24px;
    font-size: 1.8rem;
  }
}

/* Upper-range phones in portrait (480px - 575.98px) */
@media (min-width: 480px) {
  /* Styles for larger portrait phones */
  .custom-lightbox {
    max-width: 95vw;
  }
  .lightbox-nav i {
    font-size: 32px;
    font-family: 1.8rem;
  }
}

@media (min-width: 576px){

}

/* --- SM: 576px to 767.98px --- */
@media (min-width: 680px) {
  /* SM portrait styles */
  #filtered-gallery{
    padding-right:0px;
  }

  #gallery-masonry { 
    column-count: 2; 
    /* padding-right: 15px; */
  }
  
  .card-img-top {
    max-height: auto;
    max-width: auto;
    width: 100%;
    height: auto;
  }
  
  .lightbox-prev { left: 0; padding: 0 8px; }
  .lightbox-next { right: 0; padding: 0 8px; }

}

@media (min-width: 768px){

}


@media (min-width: 900px) {

  #gallery-masonry { 
    column-count: 3; 
/*    padding-right: 15px;*/
    width: 100%;
  }

  #gallery-masonry .gallery-item {
    width: 97%;
  }

  .filter-nav .text-button {
    padding: 0rem 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
  }

  #gallery-masonry .card-title {
    font-size: 1rem;      /* ≈ 20px */
    margin-bottom: 0.5rem;
    line-height: 1.3;
  }

  #gallery-masonry .card-text {
    font-size: 0.9rem;         /* ≈ 16px */
    line-height: 1.4;
  }
/*
  #gallery-masonry .card-text::first-line {
    font-weight: bold;
    text-transform: uppercase;
  }
*/
  .custom-lightbox {
    max-width: 95vw;
    width: 100%;
    max-width: 95%;
    max-height: 90vh;
  }

  .modal-body { 
    min-height: 80vh;
  }

  .lightbox-prev { left: 0; padding: 0 11px; }
  .lightbox-next { right: 0; padding: 0 11px; }

  /* Base size for small devices */
  .lightbox-nav i {
    font-size: 40px;
    font-size:1.8rem;
  }

}

/* --- LG: 992px to 1199.98px --- */
@media (min-width: 992px) {
  /* LG portrait styles */
  .custom-lightbox {
    max-width: 95vw;
    width: 100%;
  }

  .lightbox-prev { left: 0; padding: 0 15px; }
  .lightbox-next { right: 0; padding: 0 15px; }

}

/* --- XL: 1200px to 1399.98px --- */
@media (min-width: 1200px) {
  /* XL portrait styles */
  .custom-lightbox {
    max-width: 100vw;
    width: 100%;
  }
  .lightbox-nav i {
    font-size: 40px;
  }
}

/* --- XXL: 1400px and up --- */
@media (min-width: 1400px) {
  /* XXL portrait styles */
}

/* Large screens: cap max width */
@media (min-width: 1600px) {
  .custom-lightbox {
    max-width: 1400px;
  }
}
