/* Gallery — Photos / Videos view toggle + video grid */
.section-gallery .gallery-view-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: clamp(0.55rem, 1.6vw, 0.75rem);
  margin: 0 0 clamp(1.35rem, 3vw, 1.75rem);
}

.section-gallery .gallery-view-nav__btn {
  padding: 0.58rem 1.28rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0d6d66;
  background: #ffffff;
  border: 1px solid rgba(13, 109, 102, 0.22);
  border-radius: 999px;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color var(--duration-fast) ease,
    background-color var(--duration-fast) ease,
    color var(--duration-fast) ease;
}

.section-gallery .gallery-view-nav__btn:hover,
.section-gallery .gallery-view-nav__btn:focus-visible {
  color: #0a5c56;
  background: #ffffff;
  border-color: rgba(13, 109, 102, 0.42);
  outline: none;
}

.section-gallery .gallery-view-nav__btn.is-active {
  color: #ffffff;
  background: #0d6d66;
  border-color: #0d6d66;
}

.section-gallery .gallery-view-nav__btn.is-active:hover,
.section-gallery .gallery-view-nav__btn.is-active:focus-visible {
  color: #ffffff;
  background: #0a5c56;
  border-color: #0a5c56;
}

.gallery-panel[hidden] {
  display: none !important;
}

.gallery-video-grid {
  display: grid;
  gap: clamp(1.1rem, 3vw, 1.65rem);
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
}

.gallery-video-item {
  margin: 0;
}

.gallery-video-item__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  border: 1px solid rgba(13, 109, 102, 0.06);
  text-decoration: none;
  color: inherit;
  transition:
    transform var(--duration-touch) var(--ease-smooth),
    box-shadow var(--duration-touch) var(--ease-smooth),
    border-color var(--duration-fast) ease;
}

.gallery-video-item__link:hover,
.gallery-video-item__link:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(13, 109, 102, 0.12);
  outline: none;
}

.gallery-video-item__media {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.gallery-video-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-video-item__link:hover .gallery-video-item__media img,
.gallery-video-item__link:focus-visible .gallery-video-item__media img {
  transform: scale(1.04);
}

.gallery-video-item__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 18, 34, 0.28);
  transition: background var(--duration-fast) ease;
}

.gallery-video-item__link:hover .gallery-video-item__play,
.gallery-video-item__link:focus-visible .gallery-video-item__play {
  background: rgba(12, 18, 34, 0.38);
}

.gallery-video-item__play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(3rem, 10vw, 3.75rem);
  height: clamp(3rem, 10vw, 3.75rem);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #0d6d66;
  box-shadow: 0 8px 24px rgba(12, 18, 34, 0.22);
}

.gallery-video-item__play-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 0.15rem;
}

.gallery-video-caption {
  margin: 0;
  padding: 0.72rem 0.95rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0c1222;
  background: var(--color-surface);
}

.gallery-video-note {
  margin: clamp(1.25rem, 3vw, 1.65rem) 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #4a5d78;
}

.gallery-video-note a {
  color: #0d6d66;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (max-width: 640px) {
  .section-gallery .gallery-view-nav__btn {
    padding: 0.52rem 1.05rem;
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-video-item__link,
  .gallery-video-item__media img,
  .gallery-video-item__play {
    transition: none;
  }

  .gallery-video-item__link:hover,
  .gallery-video-item__link:focus-visible {
    transform: none;
  }
}
