/* Gallery page — modern grid, filters, hover zoom */

.nm-gallery-intro {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.nm-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2.5rem;
}

.nm-gallery-filter-btn {
  font-family: var(--body-font);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  border: 2px solid var(--border-color);
  background: var(--white-color);
  color: var(--heading-color);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.nm-gallery-filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.nm-gallery-filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white-color);
  box-shadow: 0 8px 24px rgba(12, 119, 53, 0.28);
}

.nm-gallery-item {
  margin-bottom: 1.5rem;
}

.nm-gallery-item__card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--white-color);
  box-shadow: 0 4px 24px rgba(24, 39, 30, 0.06);
  border: 1px solid rgba(221, 221, 221, 0.8);
  height: 100%;
  transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

.nm-gallery-item__card:hover {
  box-shadow: 0 20px 48px rgba(12, 119, 53, 0.12);
  transform: translateY(-6px);
  border-color: rgba(12, 119, 53, 0.25);
}

.nm-gallery-item__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #f0f4f1 0%, #e8ebe6 100%);
}

.nm-gallery-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.nm-gallery-item__card:hover .nm-gallery-item__media img {
  transform: scale(1.1);
}

.nm-gallery-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, rgba(5, 27, 13, 0) 0%, rgba(5, 27, 13, 0.55) 45%, rgba(5, 27, 13, 0.88) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.nm-gallery-item__card:hover .nm-gallery-item__overlay {
  opacity: 1;
}

.nm-gallery-item__zoom {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: var(--heading-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transform: scale(0.85);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.nm-gallery-item__card:hover .nm-gallery-item__zoom {
  transform: scale(1);
}

.nm-gallery-item__label {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nm-gallery-item__body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.nm-gallery-item__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.nm-gallery-item__cat {
  font-size: 0.8125rem;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: capitalize;
}

@media (max-width: 575.98px) {
  .nm-gallery-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .nm-gallery-filter-btn {
    flex: 0 0 auto;
  }

  .nm-gallery-item__media {
    aspect-ratio: 16 / 11;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nm-gallery-item__card,
  .nm-gallery-item__media img,
  .nm-gallery-item__overlay,
  .nm-gallery-filter-btn {
    transition: none;
  }

  .nm-gallery-item__card:hover {
    transform: none;
  }

  .nm-gallery-item__card:hover .nm-gallery-item__media img {
    transform: none;
  }
}
