/* =========================================================
   GALERI PAGE
   ========================================================= */

/* hero shell → .page-hero in main.css */

.gl-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.25s var(--ease);
}

.gl-video-btn:hover {
  color: var(--ochre);
}

.gl-video-play {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(27, 36, 32, 0.18);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.65);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.gl-video-play svg {
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

.gl-video-btn:hover .gl-video-play {
  border-color: var(--ochre);
  background: rgba(197, 133, 93, 0.1);
}

.gl-video-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.gl-video-meta small {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ----- Toolbar ----- */
.gl-toolbar {
  padding: 8px 0 28px;
}

.gl-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.gl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gl-filter {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(27, 36, 32, 0.14);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.gl-filter:hover {
  border-color: rgba(27, 36, 32, 0.28);
  background: rgba(255, 255, 255, 0.55);
}

.gl-filter[aria-pressed="true"] {
  background: var(--moss-deep);
  border-color: var(--moss-deep);
  color: #f4f1eb;
}

/* ----- Masonry grid ----- */
.gl-grid-wrap {
  padding: 0 0 72px;
}

.gl-masonry {
  column-count: 3;
  column-gap: 14px;
}

.gl-item {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #ddd6cb;
  cursor: pointer;
  isolation: isolate;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  aspect-ratio: 4 / 5;
}

.gl-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s var(--ease);
}

.gl-item:hover img {
  transform: scale(1.04);
}

.gl-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 28, 24, 0.28));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.gl-item:hover::after {
  opacity: 1;
}

.gl-item[hidden] {
  display: none !important;
}

/* Aspect variety — columns pack these without holes */
.gl-item--a,
.gl-item--d,
.gl-item--f {
  aspect-ratio: 3 / 4;
}

.gl-item--b,
.gl-item--e {
  aspect-ratio: 5 / 4;
}

.gl-item--c {
  aspect-ratio: 1 / 1;
}

.gl-item--g,
.gl-item--h {
  aspect-ratio: 16 / 11;
}

/* ----- Responsive ----- */
@media (max-width: 1100px) {
  .gl-masonry {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .gl-masonry {
    column-count: 2;
    column-gap: 10px;
  }

  .gl-item {
    margin-bottom: 10px;
    border-radius: 16px;
  }

  .gl-filters {
    flex-wrap: nowrap;
    gap: 6px;
    margin-inline: calc(-1 * var(--page-pad));
    padding-inline: var(--page-pad);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--page-pad);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
	touch-action: pan-x pan-y pinch-zoom;
    scrollbar-width: none;
  }

  .gl-filters::-webkit-scrollbar {
    display: none;
  }

  .gl-filter {
    flex: 0 0 auto;
    padding: 9px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    scroll-snap-align: start;
  }
}

@media (max-width: 420px) {
  .gl-masonry {
    column-count: 2;
    column-gap: 8px;
  }

  .gl-item {
    margin-bottom: 8px;
    border-radius: 14px;
  }

  .gl-item--a,
  .gl-item--b,
  .gl-item--c,
  .gl-item--d,
  .gl-item--e,
  .gl-item--f,
  .gl-item--g,
  .gl-item--h {
    aspect-ratio: 4 / 5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gl-item img {
    transition: none;
  }

  .gl-item:hover img {
    transform: none;
  }
}
