/* ===== PREMIUM LIGHTBOX ===== */
/* 
  IMPORTANT: position:fixed is broken when ANY ancestor element has:
  - transform property
  - filter property  
  - overflow:hidden on body
  Make sure body has NO transform animation and body has no overflow:hidden
*/

#lb-overlay {
  display: none;
  position: fixed;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 2147483647; /* max possible z-index */
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

#lb-overlay.active {
  display: flex !important;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#lb-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: lbZoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

#lb-img {
  display: block;
  max-width: 88vw;
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  object-fit: contain;
  transition: opacity 0.15s ease;
}

#lb-caption {
  text-align: center;
  color: #84C8B9;
  font-size: 14px;
  margin-top: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Raleway', sans-serif;
}

#lb-close {
  position: fixed;
  top: 20px;
  right: 25px;
  font-size: 42px;
  line-height: 1;
  color: #00CED1;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
  font-weight: 300;
  z-index: 2147483647;
  background: none;
  border: none;
  padding: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lb-close:hover {
  transform: rotate(90deg) scale(1.2);
  color: #ffffff;
}

#lb-prev, #lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 52px;
  line-height: 1;
  color: #00CED1;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 206, 209, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.3s, transform 0.3s;
  z-index: 2147483647;
}

#lb-prev { left: 12px; }
#lb-next { right: 12px; }

#lb-prev:hover, #lb-next:hover {
  background: rgba(0, 206, 209, 0.3);
  transform: translateY(-50%) scale(1.1);
}

/* Make portfolio boxes cursor pointer */
.portfolio_container .box,
.portfolio_section .portfolio_container .box {
  cursor: pointer;
}

/* Ensure link-box overlay doesn't swallow the click on the box itself */
.portfolio_section .portfolio_container .box .link-box {
  pointer-events: none;
}
.portfolio_section .portfolio_container .box .link-box a {
  pointer-events: auto;
}
