/* ===================================================
   Athletes Community Section — RunEasy
   =================================================== */

/* ---------- Section Base ---------- */
.athletes-section {
  padding: 120px 0;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* ---------- Glow Background ---------- */
.athletes-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Grid Layout ---------- */
.athletes-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Card Base ---------- */
.athlete-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--white-10);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s;
  cursor: default;
}

.athlete-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 20, 0.05) 0%,
    rgba(7, 11, 20, 0.15) 50%,
    rgba(7, 11, 20, 0.55) 100%
  );
  pointer-events: none;
  transition: opacity 0.4s;
  z-index: 1;
}

.athlete-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(0, 212, 255, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
              0 0 40px rgba(0, 212, 255, 0.08);
}

.athlete-card:hover::after {
  opacity: 0.7;
}

.athlete-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.athlete-card:hover img {
  transform: scale(1.05);
}

/* Card caption overlay */
.athlete-card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
}

.athlete-card:hover .athlete-card-caption {
  opacity: 1;
  transform: translateY(0);
}

.athlete-card-caption span {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white-80);
  letter-spacing: 0.02em;
}

/* ---------- Grid Placement (Masonry-like) ---------- */

/* Card 1: Tall left — grupo correndo */
.athlete-card:nth-child(1) {
  grid-column: 1 / 5;
  grid-row: 1 / 3;
  height: 480px;
}

/* Card 2: Top center — comemorando */
.athlete-card:nth-child(2) {
  grid-column: 5 / 9;
  grid-row: 1 / 2;
  height: 230px;
}

/* Card 3: Top right — high-five */
.athlete-card:nth-child(3) {
  grid-column: 9 / 13;
  grid-row: 1 / 2;
  height: 230px;
}

/* Card 4: Bottom center — solo trail */
.athlete-card:nth-child(4) {
  grid-column: 5 / 8;
  grid-row: 2 / 3;
  height: 234px;
}

/* Card 5: Bottom right wide — grupo celebrando */
.athlete-card:nth-child(5) {
  grid-column: 8 / 13;
  grid-row: 2 / 3;
  height: 234px;
}

/* ---------- Float Animations ---------- */
.athlete-card:nth-child(1) {
  animation: athleteFloat1 6s ease-in-out infinite;
}

.athlete-card:nth-child(2) {
  animation: athleteFloat2 7s ease-in-out infinite;
}

.athlete-card:nth-child(3) {
  animation: athleteFloat3 5.5s ease-in-out infinite;
}

.athlete-card:nth-child(4) {
  animation: athleteFloat4 6.5s ease-in-out infinite;
}

.athlete-card:nth-child(5) {
  animation: athleteFloat5 7.5s ease-in-out infinite;
}

@keyframes athleteFloat1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes athleteFloat2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes athleteFloat3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes athleteFloat4 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes athleteFloat5 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---------- Bottom Quote ---------- */
.athletes-quote {
  text-align: center;
  margin-top: 48px;
  position: relative;
  z-index: 1;
}

.athletes-quote p {
  font-family: 'Manrope', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white-40);
  letter-spacing: 0.04em;
  font-style: italic;
}

.athletes-quote p span {
  color: var(--cyan);
}

/* ---------- Responsive: Tablet ---------- */
@media (max-width: 1024px) {
  .athletes-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }

  /* Card 1: Top full-width */
  .athlete-card:nth-child(1) {
    grid-column: 1 / 4;
    grid-row: 1 / 2;
    height: 280px;
  }

  /* Card 2 */
  .athlete-card:nth-child(2) {
    grid-column: 4 / 7;
    grid-row: 1 / 2;
    height: 280px;
  }

  /* Card 3 */
  .athlete-card:nth-child(3) {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    height: 220px;
  }

  /* Card 4 */
  .athlete-card:nth-child(4) {
    grid-column: 3 / 5;
    grid-row: 2 / 3;
    height: 220px;
  }

  /* Card 5 */
  .athlete-card:nth-child(5) {
    grid-column: 5 / 7;
    grid-row: 2 / 3;
    height: 220px;
  }
}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 768px) {
  .athletes-section {
    padding: 72px 0;
  }

  .athletes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 20px;
  }

  /* Card 1: Full-width */
  .athlete-card:nth-child(1) {
    grid-column: 1 / -1;
    grid-row: auto;
    height: 240px;
  }

  /* Card 2 & 3 side by side */
  .athlete-card:nth-child(2) {
    grid-column: 1 / 2;
    grid-row: auto;
    height: 200px;
  }

  .athlete-card:nth-child(3) {
    grid-column: 2 / 3;
    grid-row: auto;
    height: 200px;
  }

  /* Card 4 & 5 side by side */
  .athlete-card:nth-child(4) {
    grid-column: 1 / 2;
    grid-row: auto;
    height: 200px;
  }

  .athlete-card:nth-child(5) {
    grid-column: 2 / 3;
    grid-row: auto;
    height: 200px;
  }

  .athletes-glow {
    width: 100%;
    max-width: 500px;
  }

  .athletes-quote {
    margin-top: 32px;
  }

  .athletes-quote p {
    font-size: 1rem;
  }

  /* Show captions by default on mobile (no hover) */
  .athlete-card-caption {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Responsive: Small mobile ---------- */
@media (max-width: 480px) {
  .athletes-section {
    padding: 60px 0;
  }

  .athletes-grid {
    gap: 10px;
    padding: 0 16px;
  }

  .athlete-card:nth-child(1) {
    height: 200px;
  }

  .athlete-card:nth-child(2),
  .athlete-card:nth-child(3),
  .athlete-card:nth-child(4),
  .athlete-card:nth-child(5) {
    height: 160px;
  }

  .athletes-quote p {
    font-size: 0.9rem;
    padding: 0 16px;
  }
}

/* ---------- Extra small ---------- */
@media (max-width: 360px) {
  .athletes-grid {
    padding: 0 14px;
    gap: 8px;
  }

  .athlete-card:nth-child(1) {
    height: 180px;
  }

  .athlete-card:nth-child(2),
  .athlete-card:nth-child(3),
  .athlete-card:nth-child(4),
  .athlete-card:nth-child(5) {
    height: 140px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .athlete-card {
    animation: none !important;
  }
}
