/* ============================================
   PAGE TITLE — PLAIN (no image, name only)
   Used on: training.php, function.php, achievements.php
   ============================================ */
.page-title-plain {
  background: var(--navy);
  padding: 150px 0 50px;
  text-align: center;
}
.page-title-plain h1 {
  color: var(--white);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  margin: 0;
  animation: textRiseIn 0.7s ease both;
}

/* ============================================
   GALLERY (3x3 grid with hover + entrance animation)
   Used on: training.php, function.php, achievements.php
   ============================================ */
.training-gallery { padding: 90px 0 110px; background: var(--white); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  animation: cardRiseIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: 0 16px 36px -22px rgba(6,21,48,0.3);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-item:hover img {
  transform: scale(1.12);
}
.gallery-caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  background: linear-gradient(180deg, transparent 40%, rgba(6,21,48,0.85) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; }
.gallery-caption span {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  transform: translateY(10px);
  transition: transform 0.35s ease;
}
.gallery-item:hover .gallery-caption span { transform: translateY(0); }

.gi-delay-1 { animation-delay: 0.05s; }
.gi-delay-2 { animation-delay: 0.2s; }
.gi-delay-3 { animation-delay: 0.35s; }

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ============================================
   SHARED ENTRANCE KEYFRAMES
   (also relied on by other sections across the site)
   ============================================ */
@keyframes textRiseIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardRiseIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
