/* ========================================
   TRAINERS SECTION BASE
======================================== */
.trainers-section {
  position: relative;
  /* CHANGED: 100px is now 40px */
  padding: 5px 5vw 80px; 
  background: radial-gradient(circle at top, #0a0f2a 0%, #020617 70%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========================================
   RIBBON HEADER
======================================== */
.trainers-header-wrap {
  text-align: center;
  margin-bottom: 50px;
  width: 100%;
}

.trainers-ribbon-title {
  margin: 0;
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: white;
}

.trainers-ribbon-accent {
  position: relative;
  display: inline-block;
}

.trainers-ribbon-accent::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: linear-gradient(90deg, #f97316, #facc15);
  opacity: 0.9;
}

/* ========================================
   THE GRID LAYOUT
======================================== */
.trainer-cards {
  display: grid;
  /* Automatically creates responsive columns! */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* ========================================
   INDIVIDUAL CARDS (The Hover Effect)
======================================== */
.trainer-card {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.trainer-card-img-wrap {
  width: 100%;
  height: 350px;
  overflow: hidden;
  position: relative;
}

.trainer-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* PREMIUM EFFECT: Starts dark and slightly grayscale */
  filter: grayscale(60%) brightness(0.7);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.trainer-card-info {
  padding: 1.5rem;
  text-align: center;
  background: #0f172a;
}

.trainer-card-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  margin-bottom: 0.25em;
  letter-spacing: 0.05em;
}

.trainer-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #facc15;
  margin-bottom: 0.8em;
}

.trainer-card-tagline {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}

/* THE HOVER MAGIC */
.trainer-card:hover {
  transform: translateY(-10px);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 20px 40px rgba(249, 115, 22, 0.15);
}

.trainer-card:hover .trainer-card-img {
  transform: scale(1.08);
  /* Snaps to full, vibrant color on hover! */
  filter: grayscale(0%) brightness(1.1);
}

/* ========================================
   MODAL OVERLAYS (Cleaned up)
======================================== */
.trainer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.trainer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.trainer-profile {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 24px;
  padding: 3rem;
  max-width: 900px;
  width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.trainer-overlay.active .trainer-profile {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* The New Close Button */
.close-overlay-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-overlay-btn:hover {
  background: #f97316;
}

.trainer-profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
}

.trainer-profile-img {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
}

.trainer-profile-name {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
}

.trainer-profile-role {
  font-size: 1rem;
  color: #facc15;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.trainer-profile-bio {
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.trainer-profile-highlights {
  color: white;
  padding-left: 1.2rem;
}

.trainer-profile-highlights li {
  margin-bottom: 0.5rem;
}

/* ========================================
   MOBILE RESPONSIVENESS
======================================== */
@media (max-width: 900px) {
  .trainer-profile-layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .trainer-profile-img {
    width: 200px;
    margin: 0 auto;
  }
  .trainer-profile-highlights {
    text-align: left;
  }
  .trainer-profile {
    padding: 2.5rem 1.5rem;
  }
}