.filter-btn {
  border-radius: 50px;
  padding: 8px 25px;
  font-weight: 500;
  border: 1px solid #dee2e6;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-btn.active {
  background-color: #f38431;
  color: white;
  border-color: #f38431;
}

.gallery-item {
  border-radius: 25px;
  overflow: hidden;
  height: 100%;
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.h-large {
  min-height: 350px;
}

.h-small {
  min-height: 250px;
}

@media (max-width: 768px) {
  .h-large,
  .h-small {
    min-height: 225px;
  }
}

.btn-back-album {
  background: #f8f9fa;
  border: 1px solid #ddd;
  color: #333;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 6px;
  transition: all 0.25s ease;
  font-size: 14px;
}

.btn-back-album:hover {
  background: #212529;
  color: #fff;
  border-color: #212529;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* Album thumbnails keep each source image's original aspect ratio. */
.album-image-grid {
  column-count: 3;
  column-gap: 1.25rem;
}

.album-image-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.25rem;
  break-inside: avoid;
}

.album-image-grid .gallery-item {
  position: relative;
  height: auto;
  overflow: hidden;
  border: 1px solid rgba(17, 45, 83, .1);
  border-radius: 16px;
  background: #edf1f6;
  box-shadow: 0 9px 22px rgba(18, 47, 85, .12);
}

.album-image-grid .gallery-item a {
  display: block;
}

.album-image-grid .gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform .3s ease;
}

.album-image-grid .gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 29, 62, .48));
  transition: opacity .25s ease;
}

.album-image-grid .gallery-item::before {
  content: '\f00e';
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #f36b11;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2);
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  opacity: 0;
  transform: translate(-50%, -42%);
  transition: opacity .25s ease, transform .25s ease;
}

.album-image-grid .gallery-item:hover::after,
.album-image-grid .gallery-item:hover::before { opacity: 1; }
.album-image-grid .gallery-item:hover::before { transform: translate(-50%, -50%); }
.album-image-grid .gallery-item:hover img { transform: scale(1.025); }

/* Fancybox keeps originals fully visible and centered when an album image is opened. */
.fancybox__container,
.fancybox-container { z-index: 2147483647 !important; }

.fancybox__slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 72px 24px 24px !important;
}

.fancybox__content {
  display: flex !important;
  max-width: 100% !important;
  max-height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
}

.fancybox__content img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 48px) !important;
  max-height: calc(100vh - 96px) !important;
  margin: auto !important;
  object-fit: contain !important;
}

body:has(.fancybox__container) .mm-header,
body.fancybox-active .mm-header { z-index: 1 !important; }

@media (max-width: 575.98px) {
  .fancybox__slide { padding: 64px 12px 12px !important; }
  .fancybox__content img {
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 76px) !important;
  }
}

@media (max-width: 991.98px) {
  .album-image-grid { column-count: 2; }
}

@media (max-width: 575.98px) {
  .album-image-grid { column-count: 1; }
  .album-image-card { margin-bottom: 1rem; }
}
