/* ============================================================
   FASTEST FINGERS FIRST PAGE — Competition Gallery
   ============================================================ */

/* ============================================
   PAGE WRAPPER
   ============================================ */
.fastest-fingers-page {
  padding: 40px 20px 80px;
  background: var(--bg-color-primary);
  min-height: 100vh;
}

.fastest-fingers-page .container {
  max-width: 1100px;
  margin: 0 auto;
}

  .text-center-fff {
    padding: 80px 16px 10px;
  }

  .page-title,
  .page-subtitle{
    text-align: center;
  }

/* ============ PODIUM (TOP 3) ============ */
.podium {
  display: flex;
  align-items: flex-end;
  /* so 2nd & 3rd sit at the bottom, 1st is raised */
  justify-content: center;
  gap: 24px;
  margin: 40px auto 60px;
  max-width: 900px;
}

.podium-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Image box */
.podium-img {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background-color: #f0f0f0;
}

.podium-img img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

/* 1st place is taller / bigger */
.podium-first .podium-img img {
  height: 240px;
  /* taller image */
}

.podium-first {
  transform: translateY(-20px);
  /* lifts it up slightly */
  z-index: 2;
}

.podium-second,
.podium-third {
  transform: translateY(40px);
  /* ← pushes them down */
}

/* Rank label */
.podium-rank {
  margin-top: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* School name */
.podium-school {
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
}

/* Optional: color accents per rank */
.podium-first .podium-rank {
  color: #facc15;
}

/* gold */
.podium-second .podium-rank {
  color: #c0c0c0;
}

/* silver */
.podium-third .podium-rank {
  color: #cd7f32;
}

/* bronze */

/* Mobile: stack them, 1st on top */
@media (max-width: 640px) {
  .text-center-fff {
    padding: 80px 16px 10px;
  }

  .page-title,
  .page-subtitle{
    text-align: center;
  }

  .podium {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .podium-first {
    transform: none;
    order: -1;
  }

  /* Make every card the same width */
  .podium-item {
    flex: 0 0 auto;
    width: 100%;
    max-width: 320px;
    /* adjust to taste */
  }

  .podium-img img,
  .podium-first .podium-img img {
    height: 200px;
    width: 100%;
    object-fit: cover;
  }
}

/* ============ BACK BUTTON ============ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-color-primary, #333);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.back-btn:hover {
  background-color: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  border-color: #a78bfa;
  transform: translateX(-3px);
}

.back-btn:focus,
.back-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
}

/* ============================================
   COMPETITION GALLERY — RESPONSIVE GRID
   ============================================ */
.competition-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 992px) {
  .competition-gallery {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .fastest-fingers-page {
    padding: 20px 12px 60px;
  }

  .competition-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-item {
    border-radius: 10px;
  }
}

/* ============================================
   EXTRA SMALL SCREENS
   ============================================ */
@media (max-width: 480px) {
  .competition-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}