/* Gallery — Activities-style card grid, Tarmak light theme */

.gallery-section {
  background: #ffffff;
  color: #1a1c1c;
}

#gallery.gallery-section {
  padding-top: clamp(2rem, 3.5vw, 3rem);
  padding-bottom: 120px;
}

@media (max-width: 1023px) {
  #gallery.gallery-section {
    padding-top: 2rem;
    padding-bottom: 80px;
  }
}

.gallery-section__head {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.gallery-section__label {
  display: inline-block;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #016644;
  margin-bottom: 1rem;
}

.gallery-section__title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  font-weight: 600;
  color: #014d33;
  margin-bottom: 1rem;
  max-width: 28rem;
}

.gallery-section__intro {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #3f4947;
  max-width: 36rem;
  margin: 0;
}

.gallery-section__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.gallery-section__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #016644;
  border-bottom: 2px solid #016644;
  padding-bottom: 0.2rem;
  transition: gap 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.gallery-section__link:hover {
  gap: 0.75rem;
  color: #014d33;
  border-color: #f7af28;
}

.gallery-section__link .material-symbols-outlined {
  font-size: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gallery-card {
  position: relative;
  display: block;
  aspect-ratio: 1;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(1, 102, 68, 0.06);
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
  margin: 0;
  text-decoration: none;
  color: inherit;
}

.gallery-card:hover {
  border-color: #f7af28;
  box-shadow: 0 16px 40px rgba(1, 102, 68, 0.14);
  transform: translateY(-3px);
}

.gallery-card--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.gallery-card__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform-origin: center center;
  transition: transform 0.8s ease;
  will-change: transform;
}

.gallery-card:hover .gallery-card__media {
  transform: scale(1.06);
}

.gallery-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  background: linear-gradient(
    to top,
    rgba(1, 45, 30, 0.92) 0%,
    rgba(1, 77, 51, 0.55) 48%,
    transparent 100%
  );
  margin: 0;
}

.gallery-card__index {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f7af28;
  margin-bottom: 0.35rem;
}

.gallery-card__title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.gallery-card__text {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-section__footer {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  text-align: center;
}

.gallery-section__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #251a00;
  background: #f7af28;
  padding: 0.95rem 1.75rem;
  transition: background 0.25s ease, gap 0.25s ease;
}

.gallery-section__cta:hover {
  background: #ffdf94;
  gap: 0.75rem;
}

/* Full gallery page */
.gallery-page {
  padding-top: 4.25rem;
  padding-bottom: 0;
  background: #ffffff;
  min-height: 100vh;
}

.gallery-page__top {
  padding-top: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: clamp(1.5rem, 3vw, 2rem);
  background: #ffffff;
  color: #1a1c1c;
  border-bottom: 1px solid #e2e8f0;
}

.gallery-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #016644;
  transition: gap 0.25s ease;
}

.gallery-page__back:hover {
  gap: 0.55rem;
}

.gallery-page__label {
  display: inline-block;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #016644;
  margin-bottom: 0.75rem;
}

.gallery-page__title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.1;
  font-weight: 700;
  color: #014d33;
  margin-bottom: 0.75rem;
}

.gallery-page__lead {
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #3f4947;
  max-width: 40rem;
  margin: 0;
}

.gallery-page__grid-wrap {
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: #f9f9f9;
}

.gallery-page .nav-link--active {
  color: #f7af28;
}

@media (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .gallery-card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 639px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery-card--wide {
    grid-column: span 1;
    aspect-ratio: 16 / 10;
  }

  .gallery-card {
    min-height: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card,
  .gallery-card__media {
    transition: none !important;
    transform: none !important;
  }
}
