/**
 * PHASE 5: JURY COLLAGE REFINEMENT
 * Absolute positioning, mixed card sizes, asymmetric layout
 */

.jury-collage-container {
  position: relative;
  width: 100%;
  min-height: 800px;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 5, 5, 0.9) 100%);
}

.jury-collage {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 700px;
}

/* Card Sizing System */
.jury-card {
  position: absolute;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  filter: grayscale(100%);
  will-change: transform, filter;
}

/* Large Cards (400x500) */
.jury-card.size-large {
  width: 400px;
  height: 500px;
}

/* Medium Cards (320x400) */
.jury-card.size-medium {
  width: 320px;
  height: 400px;
}

/* Small Cards (280x350) */
.jury-card.size-small {
  width: 280px;
  height: 350px;
}

/* Card Image */
.jury-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease-out;
}

/* Card Overlay */
.jury-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6), transparent);
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.4s ease-out;
  z-index: 10;
}

.jury-card-name {
  color: white;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: 0.025em;
}

.jury-card-title {
  color: #d4af37;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.jury-card-bio {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hover Effects */
.jury-card:hover {
  transform: translateY(-12px) scale(1.04);
  filter: grayscale(0%);
  border-color: rgba(139, 0, 0, 0.5);
  box-shadow: 0 20px 40px rgba(139, 0, 0, 0.3);
  z-index: 100;
}

.jury-card:hover .jury-card-image {
  transform: scale(1.08);
}

.jury-card:hover .jury-card-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax for Cards */
.jury-card.parallax-bg {
  --parallax-speed: 0.08;
}

.jury-card.parallax-mid {
  --parallax-speed: 0.15;
}

.jury-card.parallax-fg {
  --parallax-speed: 0.25;
}

/* Asymmetric Positioning Variations */

/* Row 1 - 3 cards */
.jury-card:nth-child(1) {
  top: 0;
  left: 0;
  z-index: 15;
}

.jury-card:nth-child(2) {
  top: 40px;
  left: 300px;
  z-index: 14;
}

.jury-card:nth-child(3) {
  top: 0;
  right: 0;
  z-index: 15;
}

/* Row 2 - Offset cards */
.jury-card:nth-child(4) {
  top: 350px;
  left: 80px;
  z-index: 12;
}

.jury-card:nth-child(5) {
  top: 320px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16; /* Bring to front */
}

.jury-card:nth-child(6) {
  top: 350px;
  right: 80px;
  z-index: 12;
}

/* Row 3 - Lower tier */
.jury-card:nth-child(7) {
  top: 600px;
  left: 150px;
  z-index: 11;
}

.jury-card:nth-child(8) {
  top: 580px;
  right: 150px;
  z-index: 11;
}

.jury-card:nth-child(9) {
  top: 550px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .jury-collage-container {
    min-height: auto;
    padding: 2rem 1rem;
  }

  .jury-collage {
    min-height: auto;
  }

  .jury-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin-bottom: 1.5rem;
    width: 100% !important;
    height: 300px !important;
  }

  .jury-card:nth-child(n) {
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }

  .jury-card:hover {
    transform: translateY(-8px) scale(1.02);
  }
}

/* Tablet Layout */
@media (max-width: 1024px) {
  .jury-collage {
    min-height: 600px;
  }

  .jury-card.size-large {
    width: 350px;
    height: 450px;
  }

  .jury-card.size-medium {
    width: 280px;
    height: 350px;
  }

  .jury-card.size-small {
    width: 240px;
    height: 300px;
  }

  /* Adjust positions for tablet */
  .jury-card:nth-child(1) {
    top: 0;
    left: 0;
  }

  .jury-card:nth-child(2) {
    top: 20px;
    left: 250px;
  }

  .jury-card:nth-child(3) {
    top: 0;
    right: 0;
  }

  .jury-card:nth-child(4) {
    top: 280px;
    left: 50px;
  }

  .jury-card:nth-child(5) {
    top: 250px;
    left: 50%;
    transform: translateX(-50%);
  }

  .jury-card:nth-child(6) {
    top: 280px;
    right: 50px;
  }

  .jury-card:nth-child(7),
  .jury-card:nth-child(8),
  .jury-card:nth-child(9) {
    display: none;
  }
}

/* Staggered Animation */
@keyframes collageStagger {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.jury-card {
  animation: collageStagger 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-fill-mode: both;
}

.jury-card:nth-child(1) { animation-delay: 0.1s; }
.jury-card:nth-child(2) { animation-delay: 0.2s; }
.jury-card:nth-child(3) { animation-delay: 0.3s; }
.jury-card:nth-child(4) { animation-delay: 0.15s; }
.jury-card:nth-child(5) { animation-delay: 0.25s; }
.jury-card:nth-child(6) { animation-delay: 0.35s; }
.jury-card:nth-child(7) { animation-delay: 0.2s; }
.jury-card:nth-child(8) { animation-delay: 0.3s; }
.jury-card:nth-child(9) { animation-delay: 0.4s; }

/* Focus Visible */
.jury-card:focus-visible {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .jury-card,
  .jury-card:hover {
    transition: none;
    animation: none;
  }

  .jury-card:hover .jury-card-image {
    transform: none;
  }

  .jury-card:hover .jury-card-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

/* High Contrast */
@media (prefers-contrast: more) {
  .jury-card {
    border-width: 2px;
  }

  .jury-card-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  }
}
