/* ==========================================================================
   Gallery & Portfolio - Dedicated Stylesheet
   Dr. Dilip S. Kiyawat Neurosurgical & Spine Care
   ========================================================================== */

/* 1. Hero Breadcrumb Section */
.gallery-hero-section {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-blue) 100%);
  padding: 4.5rem 0 3.5rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.gallery-hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content-wrap {
  position: relative;
  z-index: 2;
}

.gallery-hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 0.6rem;
}

.gallery-hero-section .hero-title {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.8rem;
  line-height: 1.25;
}

.gallery-hero-section .hero-breadcrumbs {
  font-family: var(--font-primary);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gallery-hero-section .hero-breadcrumbs a {
  color: var(--accent-teal);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.gallery-hero-section .hero-breadcrumbs a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.gallery-hero-section .hero-breadcrumbs i {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* 2. Gallery Grid Section */
.gallery-grid-section {
  background-color: #f8fafc;
  padding: 4.5rem 0;
}

.section-head-wrap {
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.section-head-wrap.text-center {
  text-align: center;
}

.section-tagline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(94, 18, 94, 0.08);
  color: var(--primary-purple);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.8rem;
}

.section-main-heading {
  font-family: var(--font-primary);
  font-size: clamp(1.6rem, 2.5vw, 2.3rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.section-main-desc {
  font-family: var(--font-secondary);
  font-size: 1.02rem;
  line-height: 1.7;
  color: #64748b;
  margin: 0;
}

/* 3. Filter Controls Bar */
.gallery-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 0.65rem 1.3rem;
  border-radius: 50px;
  font-family: var(--font-primary);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.gallery-filter-btn:hover {
  background: #f1f5f9;
  color: var(--primary-purple);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.gallery-filter-btn.active {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-blue) 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(94, 18, 94, 0.25);
}

.badge-count {
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}

.gallery-filter-btn:not(.active) .badge-count {
  background: #e2e8f0;
  color: #475569;
}

/* 4. Cards Grid (3 Columns) */
.gallery-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.gallery-card-item {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-fast);
}

.gallery-card-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-teal);
}

.gallery-img-box {
  position: relative;
  width: 100%;
  height: 240px;
  background: #0f172a;
  overflow: hidden;
}

.gallery-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card-item:hover .gallery-img-box img {
  transform: scale(1.08);
}

.gallery-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-cat-badge.brain {
  background: #e0e7ff;
  color: #3730a3;
}

.gallery-cat-badge.spine {
  background: #fce7f3;
  color: #9d174d;
}

.gallery-cat-badge.ot {
  background: #ccfbf1;
  color: #115e59;
}

.gallery-cat-badge.clinic {
  background: #fef3c7;
  color: #92400e;
}

.gallery-cat-badge.general {
  background: #f1f5f9;
  color: #334155;
}

.gallery-zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card-item:hover .gallery-zoom-overlay {
  opacity: 1;
}

.zoom-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gallery-card-item:hover .zoom-circle {
  transform: scale(1);
}

.gallery-card-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.gallery-card-title {
  font-family: var(--font-primary);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.gallery-card-caption {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

/* 5. Our Story Section (2 Columns Grid) */
.gallery-story-section {
  background: #ffffff;
  padding: 5rem 0;
  border-top: 1px solid #e2e8f0;
}

.story-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: center;
}

.story-image-col {
  position: relative;
}

.story-img-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  border: 5px solid #ffffff;
}

.story-img-frame img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.story-experience-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-blue) 100%);
  color: #ffffff;
  padding: 1.2rem 1.6rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 25px rgba(94, 18, 94, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.exp-number {
  font-family: var(--font-primary);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent-teal);
  margin-bottom: 0.2rem;
}

.exp-label {
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  max-width: 140px;
}

.story-text-col {
  display: flex;
  flex-direction: column;
}

.story-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--secondary-blue);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 0.8rem;
}

.story-heading {
  font-family: var(--font-primary);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 1.2rem;
}

.story-intro {
  font-family: var(--font-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
  font-weight: 500;
  margin-bottom: 1rem;
}

.story-detail {
  font-family: var(--font-secondary);
  font-size: 0.98rem;
  line-height: 1.75;
  color: #64748b;
  margin-bottom: 2rem;
}

.story-pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin-bottom: 2.5rem;
}

.story-pillar-item {
  display: flex;
  gap: 1rem;
  background: #f8fafc;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.story-pillar-item .pillar-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(94, 18, 94, 0.08);
  color: var(--primary-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.story-pillar-item .pillar-content h4 {
  font-family: var(--font-primary);
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.3rem;
}

.story-pillar-item .pillar-content p {
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

.story-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.btn-primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-blue) 100%);
  color: #ffffff;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(94, 18, 94, 0.25);
  transition: var(--transition-fast);
}

.btn-primary-cta:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(94, 18, 94, 0.35);
}

.story-cta-row .btn-whatsapp-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #25D366;
  color: #ffffff;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  transition: var(--transition-fast);
}

.story-cta-row .btn-whatsapp-cta:hover {
  background: #20bd5a;
  color: #ffffff;
  transform: translateY(-2px);
}

/* 6. Consultation Help Strip */
.gallery-help-strip {
  background: #0f172a;
  color: #ffffff;
  padding: 3rem 0;
}

.help-strip-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.help-text h3 {
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.help-text p {
  font-family: var(--font-secondary);
  font-size: 0.98rem;
  color: #94a3b8;
  margin: 0;
}

.btn-help-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #ef4444;
  color: #ffffff;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  transition: var(--transition-fast);
}

.btn-help-phone:hover {
  background: #dc2626;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* 7. Interactive Lightbox Modal */
.gallery-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-lightbox-modal.lightbox-show {
  display: flex;
  opacity: 1;
}

.lightbox-content-box {
  position: relative;
  max-width: 920px;
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  animation: modalScaleUp 0.3s ease;
  display: flex;
  flex-direction: column;
}

@keyframes modalScaleUp {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.lightbox-img-wrapper {
  background: #0f172a;
  width: 100%;
  max-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption-panel {
  padding: 1.5rem 2rem;
  background: #ffffff;
  position: relative;
}

.lightbox-category-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--secondary-blue);
  background: rgba(35, 82, 147, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.lightbox-title-text {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.lightbox-desc-text {
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.lightbox-counter-text {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: var(--transition-fast);
  z-index: 100;
}

.lightbox-close-btn:hover {
  background: #ef4444;
  transform: scale(1.1);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 100;
}

.lightbox-nav-btn:hover {
  background: var(--accent-teal);
  color: #0f172a;
  transform: translateY(-50%) scale(1.1);
}

.prev-nav-btn {
  left: 30px;
}

.next-nav-btn {
  right: 30px;
}

/* 8. Responsive Media Queries */
@media (max-width: 1024px) {
  .gallery-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-layout-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .story-img-frame img {
    height: 380px;
  }
}

@media (max-width: 768px) {
  .gallery-hero-section {
    padding: 3.5rem 0 2.5rem;
  }

  .gallery-grid-section,
  .gallery-story-section {
    padding: 3rem 0;
  }

  .gallery-cards-grid {
    grid-template-columns: 1fr;
  }

  .story-pillars-grid {
    grid-template-columns: 1fr;
  }

  .help-strip-wrap {
    flex-direction: column;
    text-align: center;
  }

  .btn-help-phone {
    width: 100%;
    justify-content: center;
  }

  .prev-nav-btn {
    left: 10px;
  }

  .next-nav-btn {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .gallery-filter-bar {
    gap: 0.5rem;
  }

  .gallery-filter-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .story-cta-row {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary-cta,
  .story-cta-row .btn-whatsapp-cta {
    width: 100%;
    justify-content: center;
  }
}
