/* ==========================================================================
   GALLERY SECTION (PREMIUM MEDICAL BENTO)
   ========================================================================== */
.gallery-section {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  background-color: var(--bg-primary, #070d10);
}

.gallery-ambient-glow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 400px;
  background: radial-gradient(ellipse at bottom, rgba(34, 115, 176, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

.gallery-bento-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  z-index: 1;
}

.gallery-bento-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.gallery-bento-card {
  position: relative;
  aspect-ratio: 16 / 12;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(19, 30, 37, 0.92) 0%, rgba(11, 18, 23, 0.97) 100%);
  border: 1px solid rgba(34, 115, 176, 0.16);
  cursor: pointer;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.55), 
              inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

.gallery-bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #2273B0 35%, #4DA8DA 65%, transparent);
  opacity: 0.35;
  transition: opacity 0.4s ease, height 0.3s ease;
  z-index: 3;
}

.gallery-bento-card__shine {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 115, 176, 0.3) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 2;
}

.gallery-bento-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  position: relative;
  z-index: 1;
}

.gallery-bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(34, 115, 176, 0.1) 0%, rgba(7, 13, 16, 0.8) 100%);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.gallery-bento-zoom {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2273B0 0%, #4DA8DA 100%);
  color: #070d10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transform: scale(0.5) translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(34, 115, 176, 0.4);
}

.gallery-bento-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 115, 176, 0.4);
  box-shadow: 0 24px 50px -12px rgba(34, 115, 176, 0.2), 
              0 0 0 1px rgba(34, 115, 176, 0.2);
}

.gallery-bento-card:hover::before {
  opacity: 1;
  height: 4px;
}

.gallery-bento-card:hover .gallery-bento-card__shine {
  opacity: 1;
}

.gallery-bento-card:hover img {
  transform: scale(1.1);
  filter: brightness(0.6) sepia(0.2) hue-rotate(120deg);
}

.gallery-bento-card:hover .gallery-bento-overlay {
  opacity: 1;
}

.gallery-bento-card:hover .gallery-bento-zoom {
  transform: scale(1) translateY(0);
  opacity: 1;
}

@media (max-width: 991px) {
  .gallery-section { padding: 80px 0; }
  .gallery-bento-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .gallery-bento-grid {
    gap: 20px;
  }
}

@media (max-width: 575px) {
  .gallery-section { padding: 60px 0; }
  .gallery-bento-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .gallery-bento-grid {
    gap: 12px;
  }
  .gallery-bento-card {
    border-radius: 14px;
  }
  .gallery-bento-zoom {
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-radius: 10px;
  }
}
