.gallery-section {
  width: 100%;
  padding: 80px 24px;
  background: #f5f7fb;
}

.gallery-container {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.gallery-header {
  text-align: center;
  margin-bottom: 36px;
}

.gallery-tag {
  display: inline-block;
  margin-bottom: 10px;
  color: #ff007a;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gallery-header h2 {
  margin: 0;
  color: #002b5b;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
}

.gallery-header p {
  max-width: 720px;
  margin: 12px auto 0;
  color: #634b61;
  font-size: 1.05rem;
  line-height: 1.6;
}

.gallery-viewer {
  position: relative;
  width: 100%;
}

.gallery-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(0, 43, 91, 0.18);
}

.gallery-frame img {
  display: block;
  width: 100%;
  height: min(620px, 68vw);
  object-fit: cover;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-frame img.is-changing {
  opacity: 0;
  transform: scale(1.02);
}

.gallery-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(
    to top,
    rgba(0, 43, 91, 0.88),
    rgba(0, 43, 91, 0)
  );
}

.gallery-frame figcaption strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
}

.gallery-frame figcaption span {
  display: block;
  margin-top: 4px;
  font-size: 0.98rem;
}

.gallery-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 43, 91, 0.9);
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.25s ease, transform 0.25s ease;
}

.gallery-btn:hover {
  background: #ff007a;
  transform: translateY(-50%) scale(1.08);
}

.gallery-btn-prev {
  left: 18px;
}

.gallery-btn-next {
  right: 18px;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

#gallery-counter {
  color: #002b5b;
  font-weight: 800;
}

.gallery-dots {
  display: flex;
  gap: 8px;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.gallery-dot.active {
  width: 28px;
  background: #ff007a;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.gallery-thumb {
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.gallery-thumb.active {
  border-color: #ff007a;
}

.gallery-thumb img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-thumb:hover img {
  transform: scale(1.08);
}

@media (max-width: 640px) {
  .gallery-section {
    padding: 56px 16px;
  }

  .gallery-frame img {
    height: 360px;
  }

  .gallery-btn {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .gallery-frame figcaption {
    padding: 18px;
  }
}