/* ==========================================================================
   Clinic Gallery Styles - Dr. Kunal Patel
   Modern, Simple & Premium Visual Showcase (Pure Images, Filterable Grid & Lightbox)
   ========================================================================== */

/* ==========================================================================
   Gallery Hero Banner
   ========================================================================== */
.gallery-hero-section {
  position: relative;
  background: linear-gradient(135deg, #ebf3fd 0%, #f4f8fe 50%, #e8f2fc 100%);
  padding: 68px 0 54px;
  overflow: hidden;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.gallery-hero-bg-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52%;
  background-image: url('/assets/images/services-hero-bg.jpg');
  background-position: center right;
  background-size: cover;
  opacity: 0.11;
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.gallery-hero-container {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.gallery-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.18);
  color: #0284c7;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.gallery-hero-title {
  font-size: clamp(2.3rem, 4.2vw, 3.1rem);
  font-weight: 800;
  color: #0b2545;
  letter-spacing: -0.025em;
  line-height: 1.18;
  margin-bottom: 12px;
}

.gallery-hero-subtitle {
  font-size: clamp(1.02rem, 1.8vw, 1.14rem);
  color: #475569;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto;
  font-weight: 450;
}

/* ==========================================================================
   Filter Bar & Showcase Section
   ========================================================================== */
.gallery-showcase-section {
  padding: 48px 0 88px;
  background: #ffffff;
}

.gallery-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 42px;
  padding: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #475569;
  padding: 10px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
}

.gallery-filter-btn:hover {
  color: #0b2545;
  background: rgba(255, 255, 255, 0.8);
}

.gallery-filter-btn.active {
  background: #0b2545;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(11, 37, 69, 0.2);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.73rem;
  font-weight: 700;
  border-radius: 9999px;
  background: rgba(100, 116, 139, 0.13);
  color: #475569;
  transition: all 0.25s ease;
}

.gallery-filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* ==========================================================================
   Gallery Grid - Pure Minimalist Images (Zero Text Overlay)
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.gallery-item {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 6px 20px -6px rgba(11, 31, 58, 0.07);
  cursor: pointer;
  outline: none;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s ease,
    opacity 0.35s ease;
  animation: galleryCardReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes galleryCardReveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gallery-item.is-hidden {
  display: none;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 20px 36px -10px rgba(11, 31, 58, 0.15);
  border-color: rgba(2, 132, 199, 0.35);
}

.gallery-item:focus-visible {
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.35), 0 20px 36px -10px rgba(11, 31, 58, 0.15);
}

.gallery-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2e8f0;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-img,
.gallery-item:focus-visible .gallery-img {
  transform: scale(1.055);
}

/* Minimalist Hover Veil (Icon Only - Strictly No Text) */
.gallery-hover-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 20, 39, 0.02) 0%, rgba(6, 20, 39, 0.24) 100%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 18px;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.gallery-item:hover .gallery-hover-veil,
.gallery-item:focus-visible .gallery-hover-veil {
  opacity: 1;
}

.gallery-zoom-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #0b2545;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(6, 20, 39, 0.22);
  transform: translateY(8px) scale(0.92);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, color 0.25s ease;
}

.gallery-item:hover .gallery-zoom-btn,
.gallery-item:focus-visible .gallery-zoom-btn {
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   Full-Screen Minimalist Lightbox
   ========================================================================== */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 20, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lightbox-stage {
  position: relative;
  z-index: 2;
  max-width: min(90vw, 1120px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  object-fit: contain;
  transform: scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-counter {
  margin-top: 14px;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%) scale(1.06);
}

.lightbox-prev {
  left: 28px;
}

.lightbox-next {
  right: 28px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .gallery-hero-section {
    padding: 52px 0 42px;
  }

  .gallery-showcase-section {
    padding: 32px 0 64px;
  }

  .gallery-filter-bar {
    border-radius: 16px;
    padding: 6px;
    gap: 6px;
    width: 100%;
    justify-content: center;
  }

  .gallery-filter-btn {
    padding: 8px 15px;
    font-size: 0.85rem;
    flex: 1 1 auto;
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .lightbox-prev {
    left: 12px;
    width: 42px;
    height: 42px;
  }

  .lightbox-next {
    right: 12px;
    width: 42px;
    height: 42px;
  }
}
