/* ===== Gallery – Amorismo ===== */

.am-gallery {
  padding: var(--am-sp-8) var(--am-sp-6);
  max-width: var(--am-max-w);
  margin: 0 auto;
}

.am-gallery__main {
  max-width: var(--am-max-w);
  margin: var(--am-sp-8) auto 0;
  display: none;
}

.am-gallery__main--active {
  display: block;
  animation: fadeInGallery 0.4s ease forwards;
}

@keyframes fadeInGallery {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.am-gallery__frame {
  background: var(--am-home-surface);
  aspect-ratio: 16 / 9;
  border-radius: var(--am-radius-sm);
  overflow: hidden;
  box-shadow: var(--am-shadow-card);
}

.am-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.am-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: var(--am-sp-3);
  max-width: var(--am-max-w);
  margin: 0 auto;
}

.am-gallery__thumb {
  background: var(--am-home-surface);
  aspect-ratio: 1;
  border-radius: var(--am-radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  box-shadow: var(--am-shadow-thumb);
  padding: 0;
}

.am-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.am-gallery__thumb:hover {
  border-color: var(--am-home-accent);
  box-shadow: var(--am-shadow-thumb-hover);
}

.am-gallery__thumb:hover img {
  transform: scale(1.05);
}

.am-gallery__thumb--active {
  border-color: var(--am-home-accent);
  box-shadow: var(--am-shadow-thumb-active);
}

.am-gallery__thumb:focus-visible {
  border-color: var(--am-home-accent-soft);
}
