.galerias_content {
  --height: 500px;
  --color-primary: #7b2c2c;
  --bg-primary: rgba(33, 33, 33, 0.7);
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 15px 15px;
  height: var(--height);
}

.galerias_content.markwater::before {
  content: "";
  position: absolute;
  bottom: 90px;
  right: 0;
  background: url(../images/logo-thumb.png);
  /* clip-path: polygon(35% 15%, 65% 15%, 95% 40%, 95% 65%, 80% 80%, 25% 80%, 5% 70%, 5% 40%); */
  width: 150px;
  height: 35px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.galerias_content img,
.galerias_content video {
  object-fit: cover;
  height: var(--height);
  width: 100%;
}

.galerias_content .caption {
  position: absolute;
  bottom: 0;
  background: var(--bg-primary);
  border-top: 3px solid var(--color-primary);
  border-bottom: 3px solid var(--color-primary);
  border-radius: 15px;
  width: 100%;
  height: initial !important;
  padding: 10px 15px;
  font-size: 16px;

  display: grid;
  grid-template-rows: 0fr;
  /* max-height: 110px; */
  max-height: 84px;
  transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.galerias_content .caption>.description {
  min-height: 0;
}

.galerias_content:hover .caption {
  grid-template-rows: 1fr;
  max-height: 500px;
}

.lb-caption h6 {
  color: #fff !important;
}

.title-img {
  position: absolute;
  top: 10px;
  left: 25px;
  background: var(--bg-primary);
  border: 3px solid var(--color-primary);
  color: var(--color-primary);
  width: 130px;
  text-align: center;
  border-radius: 12px;
}

.galerias_content.effect-none .caption {
  max-height: initial !important;
}

.galerias_content:hover .caption {
  max-height: 300px;
}

.galerias_content .caption .title {
  color: var(--color-primary);
  font-size: 23px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.galerias_content .caption .description {
  color: #e1e1e1 !important;
  font-size: 24px;
  font-size: 18px;
  /* line-height: 25px; */
}

.galerias_content .hover {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: var(--height);
  justify-content: center;
  align-items: center;
  gap: 10px;
  top: 0;
  left: 50%;
  opacity: 0;
  transform: translateX(-50%);
  transition: all 0.5s ease;
  border-radius: 12px;
  background: rgb(0 0 0 /0.5);
  color: #fff !important;
}

.galerias_content .hover label {
  color: #fff !important;
}

.galerias_content:hover .hover {
  opacity: 1;
}

.galerias_content .hover i {
  font-size: 30px;
}

.caption svg {
  position: absolute;
  right: 20px;
  top: 50%;
  color: var(--color-primary);
  transform: translateY(-50%);
}

.caption svg~.description {
  width: calc(100% - 48px);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0 15px;
  justify-content: center;
  align-items: center;
}

/* Filter Galleries */

.gallery-container {
  --color-primary: #7b2c2c;
  position: relative;
  min-height: 30px;
  transition: filter 0.4s ease, opacity 0.4s ease;
}

.gallery-container.loading {
  overflow: hidden;
  filter: blur(8px);
  opacity: 0.7;
  pointer-events: none;
}

.gallery-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(164, 172, 145, 0.15);
  z-index: 10;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.gallery-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 6px;
  background: var(--color-primary);
  z-index: 11;
  display: none;

  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 10"><path d="M0,5 Q10,0 20,5 T40,5 T60,5 T80,5 T100,5 T120,5 T140,5 T160,5 T180,5 T200,5 L200,10 L0,10 Z" fill="white"/></svg>');
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 10"><path d="M0,5 Q10,0 20,5 T40,5 T60,5 T80,5 T100,5 T120,5 T140,5 T160,5 T180,5 T200,5 L200,10 L0,10 Z" fill="white"/></svg>');

  -webkit-mask-size: 200px 100%;
  mask-size: 200px 100%;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
}

.gallery-container.loading::before {
  transform: scaleY(1);
}

.gallery-container.loading::after {
  display: block;
  animation: wave-slide 2s linear infinite;
}

@keyframes wave-slide {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.controls {
  --color-primary: #7b2c2c;
  padding: 24px 20px;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.filter-group:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.filter-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 128px;
  color: #000;
  padding: 14px 20px;
  border: none;
  background: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--color-primary);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.filter-btn:hover {
  background: #f8f9fa;
  color: var(--color-primary);
}

.filter-btn.active,
.filter-btn:focus {
  background: var(--color-primary);
  color: white;
  border: none !important;
}

.filter-btn.active::before {
  width: 100%;
}

.navigation-galleries {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navigation-galleries .nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  background: white;
  color: #0e121d;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  max-width: 150px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navigation-galleries .nav-btn:hover {
  border-color: #0e121d;
  background: #0e121d;
  color: white;
  transform: translateY(-2px);
}

.navigation-galleries .nav-btn:active {
  transform: translateY(0);
}

.navigation-galleries .nav-btn:disabled {
  opacity: 0;
}

.navigation-galleries .page-indicator {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  color: #0e121d;
  font-size: 16px;
  min-width: 80px;
  text-align: center;
}

.mb-4 {
  margin-bottom: 1.7rem;
}

@media (min-width: 576px) {
  .filter-group {
    gap: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
  }
}

@media (min-width: 768px) {
  .navigation-galleries .nav-btn:disabled {
    cursor: not-allowed;
    pointer-events: none;
    max-width: 0;
    padding: 0;
  }

  .filter-group {
    justify-content: initial;
  }
}

@media (min-width: 992px) {
  .justify-content-lg-between {
    justify-content: space-between !important;
  }

  .justify-content-lg-end {
    justify-content: flex-end !important;
  }
}