/* Custom Cinematic Horizontal Scroll Container */
.gallery-scroll-container {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-md) var(--space-xs) var(--space-xl) var(--space-xs);
  margin-top: var(--space-xl);
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--accent-crimson) rgba(255, 255, 255, 0.05);
  -webkit-overflow-scrolling: touch;
}

/* Beautiful Custom Obsidian Crimson Scrollbar for Webkit */
.gallery-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.gallery-scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.gallery-scroll-container::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--accent-crimson) 0%, hsl(342, 90%, 35%) 100%);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 10px var(--accent-crimson-glow);
}

/* Gallery card is now styled directly as a link block inside the scroll container */
.gallery-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: auto;
  min-width: 180px;
  max-width: min(72vw, 520px);
  height: clamp(190px, 28vw, 340px);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.035), var(--bg-surface) 70%);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  z-index: 2;
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 46, 99, 0.4);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 46, 99, 0.25);
}

/* Image styling */
.gallery-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity var(--transition-normal);
}

.gallery-card:hover .gallery-img {
  opacity: 0.95;
}

/* Subtle premium dark ambient vignette overlay inside the card */
.gallery-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 40%, rgba(10, 12, 18, 0.4) 100%);
  pointer-events: none;
  z-index: 3;
  transition: opacity var(--transition-normal);
}

.gallery-card:hover::after {
  opacity: 0.2;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .gallery-scroll-container {
    gap: var(--space-md);
    padding-bottom: var(--space-lg);
  }
  
  .gallery-card {
    min-width: 160px;
    max-width: 82vw;
    height: clamp(170px, 52vw, 260px);
  }
}
