.circular-gallery {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  perspective: 1200px;
  user-select: none;
  /* background: radial-gradient(
    ellipse at center,
    rgba(20, 20, 20, 0.8) 0%,
    rgba(0, 0, 0, 0.95) 70%,
    rgba(0, 0, 0, 1) 100%
  ); */
  outline: none; /* Remove focus outline for better UX */
  position: relative;
  z-index: var(--z-content);
}

.circular-gallery:active {
  cursor: grabbing;
}

.circular-gallery:focus {
  /* Add subtle focus indicator for keyboard navigation */
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.circular-gallery__carousel {
  width: 100%;
  height: 100%;
  position: absolute;
  transform-style: preserve-3d;
  transition: transform 0.05s ease-out;
  z-index: 2;
}

.circular-gallery__item {
  position: absolute;
  width: 250px;
  height: 350px;
  left: 50%;
  top: 50%;
  margin-left: -125px;
  margin-top: -175px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.circular-gallery__item:hover .circular-gallery__image-container {
  transform: scale(1.05);
  border: 3px solid rgba(152, 245, 225, 0.6);
  box-shadow:
    0 0 50px rgba(152, 245, 225, 0.6),
    0 0 100px rgba(152, 245, 225, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 0 30px rgba(152, 245, 225, 0.2);
}

.circular-gallery__item:active .circular-gallery__image-container {
  transform: scale(0.95);
}

.circular-gallery__image-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    rgba(40, 40, 40, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
  border: 2px solid rgba(152, 245, 225, 0.3);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 30px rgba(152, 245, 225, 0.4),
    0 0 60px rgba(152, 245, 225, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 20px rgba(152, 245, 225, 0.1);
  transform-style: preserve-3d;
  border-radius: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.circular-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(1px);
}

.circular-gallery__title {
  position: absolute;
  bottom: -40px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(152, 245, 225, 0.6),
    0 0 40px rgba(152, 245, 225, 0.4);
  transform: translateZ(20px);
  width: 100%;
  color: #ffffff;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
  position: relative;
}

.circular-gallery__description {
  display: none;
}

/* Enhanced active state styling */
.circular-gallery__item.active {
  transform: scale(1.1) translateZ(50px);
}

.circular-gallery__item.active .circular-gallery__image-container {
  border: 4px solid rgba(152, 245, 225, 0.8);
  box-shadow:
    0 0 80px rgba(152, 245, 225, 0.8),
    0 0 120px rgba(152, 245, 225, 0.4),
    0 0 200px rgba(152, 245, 225, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 40px rgba(152, 245, 225, 0.3);
}

/* Enhanced title and description for active item */
.circular-gallery__item.active .circular-gallery__title {
  opacity: 1;
  font-size: 1.4rem;
  transform: translateZ(30px) scale(1.1);
}


/* Mobile Responsive Design */
@media (max-width: 768px) {
  .circular-gallery {
    perspective: 800px;
  }
  
  .circular-gallery__item {
    width: 180px;
    height: 250px;
    margin-left: -90px;
    margin-top: -125px;
  }
  
  .circular-gallery__image-container {
    border-radius: 15px;
    border: 1.5px solid rgba(152, 245, 225, 0.3);
    box-shadow:
      0 0 20px rgba(152, 245, 225, 0.3),
      0 0 40px rgba(152, 245, 225, 0.15),
      0 6px 24px rgba(0, 0, 0, 0.4),
      0 2px 6px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 0 15px rgba(152, 245, 225, 0.08);
  }
  
  .circular-gallery__item:hover .circular-gallery__image-container {
    border: 2px solid rgba(152, 245, 225, 0.5);
    box-shadow:
      0 0 30px rgba(152, 245, 225, 0.5),
      0 0 60px rgba(152, 245, 225, 0.25),
      0 15px 45px rgba(0, 0, 0, 0.6),
      0 6px 15px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      inset 0 0 20px rgba(152, 245, 225, 0.15);
  }
  
  .circular-gallery__item.active .circular-gallery__image-container {
    border: 3px solid rgba(152, 245, 225, 0.7);
    box-shadow:
      0 0 50px rgba(152, 245, 225, 0.6),
      0 0 80px rgba(152, 245, 225, 0.3),
      0 0 120px rgba(152, 245, 225, 0.15),
      0 15px 45px rgba(0, 0, 0, 0.6),
      0 6px 24px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 0 25px rgba(152, 245, 225, 0.2);
  }
  
  .circular-gallery__title {
    font-size: 1rem;
    bottom: -30px;
  }
  
  .circular-gallery__item.active .circular-gallery__title {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .circular-gallery {
    perspective: 600px;
  }
  
  .circular-gallery__item {
    width: 140px;
    height: 200px;
    margin-left: -70px;
    margin-top: -100px;
  }
  
  .circular-gallery__image-container {
    border-radius: 12px;
    border: 1px solid rgba(152, 245, 225, 0.25);
    box-shadow:
      0 0 15px rgba(152, 245, 225, 0.25),
      0 0 30px rgba(152, 245, 225, 0.1),
      0 4px 16px rgba(0, 0, 0, 0.4),
      0 1px 4px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      inset 0 0 10px rgba(152, 245, 225, 0.05);
  }
  
  .circular-gallery__item:hover .circular-gallery__image-container {
    border: 1.5px solid rgba(152, 245, 225, 0.4);
    box-shadow:
      0 0 20px rgba(152, 245, 225, 0.4),
      0 0 40px rgba(152, 245, 225, 0.2),
      0 10px 30px rgba(0, 0, 0, 0.5),
      0 4px 10px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      inset 0 0 15px rgba(152, 245, 225, 0.1);
  }
  
  .circular-gallery__item.active .circular-gallery__image-container {
    border: 2px solid rgba(152, 245, 225, 0.6);
    box-shadow:
      0 0 35px rgba(152, 245, 225, 0.5),
      0 0 60px rgba(152, 245, 225, 0.25),
      0 0 90px rgba(152, 245, 225, 0.1),
      0 10px 30px rgba(0, 0, 0, 0.5),
      0 4px 16px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      inset 0 0 20px rgba(152, 245, 225, 0.15);
  }
  
  .circular-gallery__title {
    font-size: 0.9rem;
    bottom: -25px;
  }
  
  .circular-gallery__item.active .circular-gallery__title {
    font-size: 1rem;
  }
}