/* =========================================
   Judges Section Styles
   ========================================= */

.card_wrapper {
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 1.2rem;
  background-color: rgba(var(--card-bg-rgb, 255, 255, 255), 0.75);
}

.judges {
  position: relative;
  overflow: hidden;
}

/* Judges Grid */
.judges__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 4rem;
  justify-content: center;
}

/* Add a new modifier class for when we have fewer judges */
.judges__grid--centered {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
  gap: 3rem;
  margin-top: 4rem;
  justify-content: center;
}

/* Judge Card */
.judge-card {
  /* Background and padding are now handled by has-border-glow class */
  /* background-color: var(--card-bg); */
  border-radius: 1.2rem;
  box-shadow: var(--card-shadow);
  /* padding: 3rem 2rem; */
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* display: flex; */
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.judge-card .card_wrapper {
  text-align: center;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem;
}

.judge-card:hover {
  transform: translateY(-1rem);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.judge-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.5rem;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-primary),
    transparent
  );
  opacity: 0.8;
}

/* Judge Avatar */
.judge-card__avatar {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 0.3rem solid var(--card-bg);
  position: relative;
}

.judge-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.judge-card:hover .judge-card__avatar img {
  transform: scale(1.1);
}

.judge-card__avatar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 20px rgba(0, 112, 243, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.judge-card:hover .judge-card__avatar::after {
  opacity: 1;
}

/* Judge Name */
.judge-card__name {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Judge Role */
.judge-card__role {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* Judge Bio */
.judge-card__bio {
  font-size: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Social Media Links */
.judge-card__social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.judge-card__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.judge-card__social-link:hover {
  background-color: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-0.3rem);
}

/* Unique accent color for each judge (for visual variety) */
.judge-card:nth-child(4n + 1)::before {
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-primary),
    transparent
  );
}

.judge-card:nth-child(4n + 2)::before {
  background: linear-gradient(90deg, transparent, #6c5ce7, transparent);
}

.judge-card:nth-child(4n + 3)::before {
  background: linear-gradient(90deg, transparent, #00cec9, transparent);
}

.judge-card:nth-child(4n + 4)::before {
  background: linear-gradient(90deg, transparent, #fd79a8, transparent);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .judges__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    justify-content: center;
  }

  .judges__grid--centered {
    grid-template-columns: repeat(auto-fit, minmax(230px, 280px));
  }
}

@media (max-width: 768px) {
  .judges__grid {
    gap: 2rem;
    justify-content: center;
  }

  .judges__grid--centered {
    grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
  }

  .judge-card__avatar {
    width: 10rem;
    height: 10rem;
  }

  .judge-card__name {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .judges__grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .judges__grid--centered {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: 100%;
  }

  .judge-card {
    padding: 2.5rem 1.5rem;
  }
}
