/* ==========================================================================
   HIREMATH FINVEST — SERVICE TEMPLATE LIGHTBOX
   True Fullscreen, Edge-to-Edge Image Viewer Component
   ========================================================================== */

/* --------------------------------------------------------------------------
   Backdrop Overlay / Lightbox Viewport
   Occupies complete viewport, flex-centered 16:9 presentation, dark forest-green
   -------------------------------------------------------------------------- */
.stlb-backdrop,
.service-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  width: 100vw;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background-color: #101713;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease-in-out, visibility 0.22s ease-in-out;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.stlb-backdrop.is-open,
.service-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Fixed Header Bar & Accessible Floating Controls
   Remains fixed at top of viewport so Close button stays accessible
   -------------------------------------------------------------------------- */
.stlb-header,
.service-lightbox__header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  z-index: 1000000;
  pointer-events: none;
  box-sizing: border-box;
}

/* Service Title Pill */
.stlb-header-info {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 14px;
  border-radius: 8px;
  background-color: rgba(16, 23, 19, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  max-width: calc(100vw - 140px);
}

.stlb-header-label {
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-growth-green, #A8C83F);
  line-height: 1;
}

.stlb-header-title {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   Close Button — Fixed at Top-Right, High Contrast, 44x44px minimum touch target
   -------------------------------------------------------------------------- */
.stlb-close-btn,
.service-lightbox__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill, 999px);
  background-color: rgba(16, 23, 19, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
  color: #FFFFFF;
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  pointer-events: auto;
}

.stlb-close-btn svg,
.service-lightbox__close svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.stlb-close-btn:hover,
.service-lightbox__close:hover {
  background-color: #EB5757;
  border-color: #EB5757;
  color: #FFFFFF;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(235, 87, 87, 0.45);
}

.stlb-close-btn:focus-visible,
.service-lightbox__close:focus-visible {
  box-shadow: 0 0 0 3px rgba(168, 200, 63, 0.7);
}

.stlb-close-btn:active,
.service-lightbox__close:active {
  transform: scale(0.96);
}

/* --------------------------------------------------------------------------
   Image Container — Edge-to-Edge Presentation (Full Viewport)
   -------------------------------------------------------------------------- */
.stlb-image-wrap,
.service-lightbox__content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.stlb-image,
.service-lightbox__image {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  object-fit: contain;
  object-position: center;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transform: none !important;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Body Scroll Lock (applied when lightbox is open)
   -------------------------------------------------------------------------- */
html.stlb-scroll-locked,
body.stlb-scroll-locked {
  overflow: hidden !important;
}

/* --------------------------------------------------------------------------
   Mobile & Responsive Viewports
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .stlb-header,
  .service-lightbox__header {
    padding: 12px 14px;
  }

  .stlb-header-info {
    padding: 4px 10px;
    max-width: calc(100vw - 80px);
  }

  .stlb-header-title {
    font-size: 0.875rem;
  }

  .stlb-close-btn,
  .service-lightbox__close {
    padding: 0 14px;
    min-height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 480px) {
  .stlb-header-label {
    display: none;
  }

  .stlb-header-title {
    max-width: 50vw;
    font-size: 0.8125rem;
  }

  .stlb-close-btn span,
  .service-lightbox__close span {
    display: none;
  }

  .stlb-close-btn,
  .service-lightbox__close {
    padding: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
  }
}
