.fan-section {
  padding: 0 0 100px;
  overflow: hidden;
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: auto;
}

.fan-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fan-cards {
  position: relative;
  height: 400px; /* Adjust based on image sizes */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 60px;
}

.fan-card {
  position: absolute;
  left: 50%;
  margin-left: -110px; /* Center horizontally */
  width: 220px; /* Base size */
  height: auto;
  transition: transform 0.4s ease, z-index 0.4s;
  transform-origin: 50% 150%; /* Pivot point below the image */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
}

.fan-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* Fan positioning */
/* 
   We have 6 items. 
   Let's spread them from -30deg to 30deg. 
   Step: ~12deg 
   -30, -18, -6, 6, 18, 30
   
   Or specific look from reference usually has the center ones overlap more on top?
   Usually "fanned out" means higher index on top or edges on top. 
   Let's assume standard deck fanning: left is bottom, right is top, or center is top.
   Center top (pyramid) looks best for "Review/Showcase".
   Let's try linear z-index for natural fanning left-to-right.
*/

/* Card Specific Positions & Hover States */
.fan-card:nth-child(1) {
  transform: translate(-250px, 40px) rotate(-20deg);
  z-index: 1;
  animation: float-bob 4s ease-in-out infinite 0s;
}
.fan-card:nth-child(1):hover {
  transform: translate(-250px, 0px) rotate(-22deg) scale(1.15);
  z-index: 50;
  transition-duration: 0.2s;
}

.fan-card:nth-child(2) {
  transform: translate(-150px, 10px) rotate(-12deg);
  z-index: 2;
  animation: float-bob 4.2s ease-in-out infinite 0.2s;
}
.fan-card:nth-child(2):hover {
  transform: translate(-150px, -30px) rotate(-14deg) scale(1.15);
  z-index: 50;
  transition-duration: 0.2s;
}

.fan-card:nth-child(3) {
  transform: translate(-50px, -10px) rotate(-4deg);
  z-index: 3;
  animation: float-bob 4.5s ease-in-out infinite 0.4s;
}
.fan-card:nth-child(3):hover {
  transform: translate(-50px, -50px) rotate(0deg) scale(1.15);
  z-index: 50;
  transition-duration: 0.2s;
}

.fan-card:nth-child(4) {
  transform: translate(50px, -10px) rotate(4deg);
  z-index: 4;
  animation: float-bob 4.3s ease-in-out infinite 0.1s;
}
.fan-card:nth-child(4):hover {
  transform: translate(50px, -50px) rotate(0deg) scale(1.15);
  z-index: 50;
  transition-duration: 0.2s;
}

.fan-card:nth-child(5) {
  transform: translate(150px, 10px) rotate(12deg);
  z-index: 5;
  animation: float-bob 4.1s ease-in-out infinite 0.3s;
}
.fan-card:nth-child(5):hover {
  transform: translate(150px, -30px) rotate(14deg) scale(1.15);
  z-index: 50;
  transition-duration: 0.2s;
}

.fan-card:nth-child(6) {
  transform: translate(250px, 40px) rotate(20deg);
  z-index: 6;
  animation: float-bob 4.6s ease-in-out infinite 0.5s;
}
.fan-card:nth-child(6):hover {
  transform: translate(250px, 0px) rotate(22deg) scale(1.15);
  z-index: 50;
  transition-duration: 0.2s;
}

/* Floating Animation using margin-top to avoid transform conflict */
@keyframes float-bob {
  0%,
  100% {
    margin-top: 0px;
  }
  50% {
    margin-top: -15px;
  }
}

.fan-title {
  font-family: var(--font-mono);
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--text-heading);
  margin-bottom: 40px;
  text-align: center;
  z-index: 10;
}

.fan-actions {
  display: flex;
  gap: 20px;
  z-index: 10;
}

@media (max-width: 768px) {
  .fan-section {
    padding-bottom: 60px; /* Reduce bottom padding on mobile */
    padding-top: 100px; /* Add top space for mobile */
  }

  .fan-cards {
    height: 160px; /* Adjusted height */
    width: 100%;
    margin-left: 0;
    transform: scale(0.65); /* Larger scale to fill width */
    transform-origin: bottom center;
    margin-bottom: 20px;
    margin-top: 50px;
  }

  /* Tweak translation for mobile to keep them tighter? 
     Actually scale(0.5) might be enough. 
     But let's ensure the title isn't too far.
  */

  .fan-title {
    font-size: 24px;
    margin-bottom: 24px;
    padding: 0 20px; /* Ensure text doesn't hit edges */
    line-height: 1.3;
  }

  .fan-actions .btn-large {
    width: 100%; /* Full width button on mobile */
    padding: 16px 20px;
  }

  .fan-actions {
    width: 100%;
    padding: 0 40px;
  }

  /* Mobile-specific tighter fan positions to fit screen */
  .fan-card:nth-child(1) {
    transform: translate(-160px, 40px) rotate(-20deg);
  }
  .fan-card:nth-child(1):hover {
    transform: translate(-160px, 0px) rotate(-22deg) scale(1.15);
  }

  .fan-card:nth-child(2) {
    transform: translate(-100px, 10px) rotate(-12deg);
  }
  .fan-card:nth-child(2):hover {
    transform: translate(-100px, -30px) rotate(-14deg) scale(1.15);
  }

  .fan-card:nth-child(3) {
    transform: translate(-35px, -10px) rotate(-4deg);
  }
  .fan-card:nth-child(3):hover {
    transform: translate(-35px, -50px) rotate(0deg) scale(1.15);
  }

  .fan-card:nth-child(4) {
    transform: translate(35px, -10px) rotate(4deg);
  }
  .fan-card:nth-child(4):hover {
    transform: translate(35px, -50px) rotate(0deg) scale(1.15);
  }

  .fan-card:nth-child(5) {
    transform: translate(100px, 10px) rotate(12deg);
  }
  .fan-card:nth-child(5):hover {
    transform: translate(100px, -30px) rotate(14deg) scale(1.15);
  }

  .fan-card:nth-child(6) {
    transform: translate(160px, 40px) rotate(20deg);
  }
  .fan-card:nth-child(6):hover {
    transform: translate(160px, 0px) rotate(22deg) scale(1.15);
  }
}
