/* ============================================================
   CARE DENTAL HOSPITAL — ULTRA-PREMIUM BENTO GALLERY
   ============================================================ */

/* ── Section Canvas & Ambient Atmosphere ── */
.gallery-section {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #0a162c 0%, #050c1a 60%, #030813 100%);
  border-top: 1px solid rgba(0, 207, 255, 0.12);
  border-bottom: 1px solid rgba(0, 207, 255, 0.12);
}

.gallery-bg-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(0, 207, 255, 0.12) 0%, rgba(0, 91, 255, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.gallery-bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(0, 207, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 207, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.gallery-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  animation: floatOrb 12s ease-in-out infinite alternate;
}
.gallery-orb-1 {
  top: 20%;
  left: -80px;
  width: 320px;
  height: 320px;
  background: rgba(0, 207, 255, 0.12);
}
.gallery-orb-2 {
  bottom: 15%;
  right: -80px;
  width: 380px;
  height: 380px;
  background: rgba(168, 85, 247, 0.12);
  animation-delay: -6s;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(40px) scale(1.15); }
}

.gallery-section .container {
  position: relative;
  z-index: 1;
}

.gallery-tagline {
  max-width: 760px;
  margin: 12px auto 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #b8d4f0;
}

/* ── Stats Strip ── */
.gallery-stats-row {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 10px 24px;
  margin: 28px auto 0;
  background: rgba(13, 26, 53, 0.65);
  border: 1px solid rgba(0, 207, 255, 0.22);
  border-radius: 50px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.gallery-section .section-header {
  text-align: center;
}

.gstat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}
.gstat-item i {
  color: #00cfff;
  font-size: 0.9rem;
}
.gstat-divider {
  width: 1px;
  height: 16px;
  background: rgba(0, 207, 255, 0.25);
}

/* ── Filter Pills ── */
.gallery-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 36px 0 32px;
}

.gallery-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  background: rgba(13, 26, 53, 0.6);
  border: 1px solid rgba(0, 207, 255, 0.2);
  border-radius: 50px;
  color: #a0aec0;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  backdrop-filter: blur(8px);
}
.gallery-pill i {
  font-size: 0.85rem;
  transition: transform 0.3s ease;
}

.gallery-pill:hover {
  border-color: rgba(0, 207, 255, 0.6);
  color: #00cfff;
  background: rgba(0, 207, 255, 0.1);
  transform: translateY(-2px);
}
.gallery-pill:hover i {
  transform: scale(1.15);
}

.gallery-pill.active {
  background: linear-gradient(135deg, #00cfff, #005bff);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 207, 255, 0.4);
  transform: translateY(-2px);
}

/* ── BENTO GRID ARCHITECTURE ── */
.gallery-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 270px;
  gap: 20px;
  margin-bottom: 30px;
}

/* Hero Panel (Night View) spans 2 columns & 1 row */
.gbento-hero {
  grid-column: span 2;
  grid-row: span 1;
}

/* Tall Panel (OT 1) spans 2 rows */
.gbento-tall {
  grid-row: span 2;
}

/* Base Bento Card */
.gbento-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #081226;
  border: 1px solid rgba(0, 207, 255, 0.16);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              border-color 0.35s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.gbento-item:hover {
  transform: translateY(-6px) scale(1.012);
  box-shadow: 0 20px 50px rgba(0, 207, 255, 0.22), 0 0 30px rgba(0, 91, 255, 0.15);
  border-color: rgba(0, 207, 255, 0.45);
}

.gbento-img-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gbento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
  display: block;
}

.gbento-img.img-reception {
  object-position: center 30%;
}
.gbento-img.img-ot1 {
  object-position: center 20%;
}
.gbento-img.img-ot2 {
  object-position: center 40%;
}
.gbento-img.img-night {
  object-position: center center;
}
.gbento-img.img-waiting {
  object-position: center 35%;
}

.gbento-item:hover .gbento-img {
  transform: scale(1.08);
}

/* Shimmer Border/Light Effect on Hover */
.gbento-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  transition: left 0.75s ease;
}
.gbento-item:hover .gbento-shimmer {
  left: 200%;
}

/* Corner Number Badge (01, 02, etc.) */
.gbento-num-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  background: rgba(5, 12, 26, 0.7);
  border: 1px solid rgba(0, 207, 255, 0.3);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #00cfff;
  letter-spacing: 1px;
  backdrop-filter: blur(6px);
  z-index: 2;
  transition: all 0.3s ease;
}
.gbento-item:hover .gbento-num-badge {
  background: #00cfff;
  color: #050c1a;
  border-color: #00cfff;
}

/* Featured Badge */
.gbento-badge-featured {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  background: rgba(0, 91, 255, 0.5);
  border: 1px solid rgba(0, 207, 255, 0.4);
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  backdrop-filter: blur(6px);
  z-index: 2;
}
.gbento-badge-featured.blue-badge {
  background: rgba(14, 165, 233, 0.4);
}

/* Overlay & Text Info */
.gbento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 12, 26, 0.15) 0%,
    rgba(5, 12, 26, 0.4) 40%,
    rgba(3, 8, 19, 0.94) 100%
  );
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}

.gbento-tag {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(0, 207, 255, 0.15);
  border: 1px solid rgba(0, 207, 255, 0.35);
  border-radius: 50px;
  color: #00cfff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  backdrop-filter: blur(8px);
}
.gbento-tag.night-chip {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}
.gbento-tag.featured-chip {
  background: rgba(0, 91, 255, 0.25);
  border-color: rgba(0, 91, 255, 0.5);
  color: #60a5fa;
}

.gbento-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.gbento-title-block h3 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}
.gbento-title-block p {
  color: #a0aec0;
  font-size: 0.82rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gbento-title-block p i {
  color: #00cfff;
  font-size: 0.8rem;
}

.gbento-expand-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 207, 255, 0.15);
  border: 1px solid rgba(0, 207, 255, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.gbento-item:hover .gbento-expand-btn {
  background: linear-gradient(135deg, #00cfff, #005bff);
  border-color: transparent;
  color: #ffffff;
  transform: scale(1.1) rotate(45deg);
  box-shadow: 0 4px 15px rgba(0, 207, 255, 0.4);
}

/* ── HORIZONTAL FILMSTRIP PREVIEW ── */
.gallery-filmstrip {
  margin: 10px 0 36px;
  padding: 16px 20px;
  background: rgba(13, 26, 53, 0.5);
  border: 1px solid rgba(0, 207, 255, 0.15);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  backdrop-filter: blur(10px);
}

.filmstrip-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #00cfff;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.filmstrip-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: thin;
}
.filmstrip-track::-webkit-scrollbar {
  height: 4px;
}
.filmstrip-track::-webkit-scrollbar-thumb {
  background: rgba(0, 207, 255, 0.3);
  border-radius: 10px;
}

.fstrip-thumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 207, 255, 0.18);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.fstrip-thumb img {
  width: 38px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
}
.fstrip-thumb span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #b8d4f0;
}
.fstrip-thumb:hover {
  background: rgba(0, 207, 255, 0.12);
  border-color: #00cfff;
  transform: translateY(-2px);
}
.fstrip-thumb.active {
  border-color: #00cfff;
  background: rgba(0, 207, 255, 0.18);
  box-shadow: 0 2px 10px rgba(0, 207, 255, 0.25);
}

/* ── CTA Strip ── */
.gallery-cta-strip {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 36px;
  background: linear-gradient(135deg, rgba(0, 207, 255, 0.08) 0%, rgba(0, 91, 255, 0.06) 100%);
  border: 1px solid rgba(0, 207, 255, 0.24);
  border-radius: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.gallery-cta-text {
  display: flex;
  align-items: center;
  gap: 18px;
}

.gallery-cta-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 207, 255, 0.2), rgba(0, 91, 255, 0.15));
  border: 1px solid rgba(0, 207, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #00cfff;
  flex-shrink: 0;
}

.gallery-cta-text strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}
.gallery-cta-text span {
  font-size: 0.88rem;
  color: #a0aec0;
}

.gallery-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #ffffff;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
  transition: all 0.3s ease;
}
.gallery-wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

/* ============================================================
   ENHANCED LIGHTBOX MODAL
   ============================================================ */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 16, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: zoom-out;
}

.lightbox-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(94vw, 1150px);
  max-height: 94vh;
  animation: lbZoomIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes lbZoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Lightbox Topbar */
.lightbox-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 12px;
}

.lightbox-hospital-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #00cfff;
}

.lightbox-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lightbox-counter {
  padding: 4px 12px;
  background: rgba(0, 207, 255, 0.15);
  border: 1px solid rgba(0, 207, 255, 0.3);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #00cfff;
}

.lightbox-close {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}
.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.7);
  border-color: #ef4444;
  transform: rotate(90deg) scale(1.1);
}

/* Lightbox Image Container */
.lightbox-img-wrap {
  position: relative;
  width: 100%;
  height: min(65vh, 600px);
  border-radius: 18px;
  overflow: hidden;
  background: #040914;
  border: 1px solid rgba(0, 207, 255, 0.25);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 207, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
  display: block;
}

.lightbox-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  color: #00cfff;
  font-size: 2rem;
  background: rgba(4, 9, 20, 0.8);
}

/* Image Caption Overlay */
.lightbox-img-caption {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  padding: 24px 24px 16px;
  background: linear-gradient(to top, rgba(3, 8, 19, 0.92) 0%, rgba(3, 8, 19, 0.5) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lightbox-caption-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.lightbox-caption-sub {
  font-size: 0.85rem;
  color: #a0aec0;
}

/* Navigation Buttons */
.lightbox-nav {
  position: absolute;
  top: 48%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(13, 26, 53, 0.85);
  border: 1px solid rgba(0, 207, 255, 0.35);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

.lightbox-nav:hover {
  background: linear-gradient(135deg, #00cfff, #005bff);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(0, 207, 255, 0.4);
  transform: translateY(-50%) scale(1.12);
}

/* Lightbox Thumbnail Strip */
.lightbox-thumb-strip {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 4px;
  overflow-x: auto;
  max-width: 100%;
}

.lbthumb {
  width: 64px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.lbthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lbthumb:hover {
  opacity: 1;
  border-color: rgba(0, 207, 255, 0.7);
  transform: scale(1.05);
}
.lbthumb.active {
  opacity: 1;
  border-color: #00cfff;
  box-shadow: 0 0 12px rgba(0, 207, 255, 0.5);
  transform: scale(1.05);
}

/* ── Responsive Adaptations ── */
@media (max-width: 1024px) {
  .gallery-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }
  .gbento-hero {
    grid-column: span 2;
  }
  .gbento-tall {
    grid-row: span 1;
  }
  .lightbox-prev { left: -20px; }
  .lightbox-next { right: -20px; }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 75px 0 60px;
  }
  .gallery-stats-row {
    display: none;
  }
  .gallery-bento {
    grid-template-columns: 1fr;
    grid-auto-rows: 230px;
    gap: 14px;
  }
  .gbento-hero,
  .gbento-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  .gallery-filter-pills {
    gap: 8px;
  }
  .gallery-pill {
    padding: 7px 16px;
    font-size: 0.8rem;
  }
  .gallery-filmstrip {
    display: none;
  }
  .gallery-cta-strip {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }
  .gallery-cta-text {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .gallery-cta-actions {
    justify-content: center;
    width: 100%;
  }
  .gallery-cta-actions .btn-primary,
  .gallery-cta-actions .btn-ghost,
  .gallery-cta-actions .gallery-wa-btn {
    width: 100%;
    justify-content: center;
  }
  .lightbox-img-wrap {
    height: 52vh;
  }
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}