/* ==============================
   WORKSHOP SECTION
============================== */
.workshop-section {
  padding: 80px 0;
  background: #ffffff;
  color: #000000;
  font-family: 'Poppins', 'Segoe UI', sans-serif;

  /* IMPORTANT: do not trap footer */
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* ==============================
   TITLE & SUBTITLE
============================== */
.workshop-title {
  text-align: center;
  font-size: 44px;
  font-weight: 600;
  margin-bottom: 10px;
}

.workshop-subtitle {
  text-align: center;
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 50px;
  opacity: 0.85;
}

/* ==============================
   GALLERY GRID
============================== */
.workshop-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;

  position: relative;
  z-index: 1;
}

/* ==============================
   IMAGE CARD
============================== */
.gallery-item {
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  background: #000;
}

.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ==============================
   LIGHTBOX
============================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;

  z-index: 9999;

  /* CRITICAL: do not block footer when hidden */
  pointer-events: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  animation: zoomIn 0.4s ease;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* ==============================
   ANIMATION
============================== */
@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 992px) {
  .workshop-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .workshop-gallery {
    grid-template-columns: 1fr;
  }
}

/* ==============================
   FOOTER SAFETY FIX (DO NOT REMOVE)
============================== */
.ijaro-footer {
  position: relative !important;
  z-index: 100 !important;
  display: block !important;
}



/* Ensure full page scroll */
body {
  overflow-y: auto !important;
}



/* ================= PERFORMANCE OPTIMIZATIONS ================= */

/* GPU Acceleration */
.gallery-item,
.lightbox,
.lightbox-img {
  will-change: transform, opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Smooth Gallery Grid */
.workshop-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.gallery-item {
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
  
  /* Performance boost */
  content-visibility: auto;
  loading: lazy;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Smooth Page Sections */
.page-banner,
.workshop-section,
.catalogue-section {
  contain: layout style paint;
}

/* Reduce animation complexity */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}