/* Lightbox + lớp phủ xanh logo khi hover ảnh (không zoom ảnh, không giữ will-change) */

/* Khóa overflow để các hiệu ứng reveal/curtain không tràn đè sang ảnh bên cạnh */
.lb-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.lb-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 74, 0.58);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.25s ease;
}

@media (hover: hover) {
  .lb-item:hover::after {
    opacity: 1;
  }
}

/* Lightbox perspective strip & Xem Them gallery grid */
.lb-header {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 110px);
  pointer-events: auto;
}

.lb-back-grid {
  display: none;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: 600 12px/1 Montserrat, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lb-back-grid:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lb.is-gallery-item .lb-back-grid {
  display: inline-flex;
}

.lb-dots {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.lb-dots:empty {
  display: none;
}

.lb-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.lb-dot.is-active {
  width: 24px;
  background: #34b6eb;
}

.lb-gallery {
  display: none;
  position: relative;
  z-index: 4;
  width: min(1160px, 92vw);
  max-height: 82vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: 20px;
  background: rgba(12, 22, 54, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  color: #fff;
}

.lb.is-gallery .lb-gallery {
  display: block;
}

.lb.is-gallery .lb__stage,
.lb.is-gallery .lb__prev,
.lb.is-gallery .lb__next,
.lb.is-gallery .lb__bar,
.lb.is-gallery .lb-dots,
.lb.is-gallery .lb-header,
.lb.is-single .lb__prev,
.lb.is-single .lb__next,
.lb.is-single .lb__bar {
  display: none;
}

.lb__btn {
  z-index: 8;
}

.lb-gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.lb-gallery-title {
  font-family: "Space Grotesk", Montserrat, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.lb-gallery-sub {
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.lb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lb-gallery-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease;
}

.lb-gallery-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 182, 235, 0.65);
}

.lb-gallery-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0d1633;
}

.lb-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lb-gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 74, 0.58);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lb-gallery-card:hover .lb-gallery-thumb::after {
  opacity: 1;
}

.lb-gallery-cap {
  padding: 10px 12px;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

.lb-gallery-empty {
  text-align: center;
  padding: 46px 24px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.22);
}

.lb-gallery-empty h4 {
  font-family: "Space Grotesk", Montserrat, sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.lb-gallery-empty p {
  max-width: 520px;
  margin: 0 auto 22px;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.lb-gallery-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 9999px;
  border: 0;
  background: #ec8100;
  color: #fff;
  font: 700 13px/1 Montserrat, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.lb-gallery-cta:hover {
  background: #d87500;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .lb-gallery {
    padding: 18px;
    width: 94vw;
  }

  .lb-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lb-gallery-head {
    flex-direction: column;
    gap: 4px;
  }

  .lb-gallery-title {
    font-size: 18px;
  }

  .lb-header {
    top: 14px;
    left: 14px;
    max-width: calc(100vw - 80px);
  }
}

.lb-item:focus-visible {
  outline: 2px solid #ec8100;
  outline-offset: 3px;
}

/* Màn kéo 2 lớp (Dual-layer Curtain) cho hiệu ứng curtain */
.rv-curtain {
  position: absolute;
  inset: -1px;
  pointer-events: none;
  z-index: 3;
}
.rv-curtain__a,
.rv-curtain__b {
  position: absolute;
  inset: 0;
  transform-origin: 100% 50%;
}
.rv-curtain__a {
  background: #002565;
  z-index: 2;
}
.rv-curtain__b {
  background: #0381c8;
  z-index: 1;
}
.rv-curtain--left .rv-curtain__a,
.rv-curtain--left .rv-curtain__b {
  transform-origin: 0% 50%;
}

/* ===== Lightbox ===== */
html.lb-open {
  overflow: hidden;
}

.lb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lb.is-open {
  display: flex;
}

.lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 28, 0.92);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lb.is-visible .lb__backdrop {
  opacity: 1;
}

.lb.is-closing .lb__backdrop {
  opacity: 0;
}

.lb__stage {
  position: absolute;
  inset: 52px 72px 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.lb__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
}

.lb.is-visible .lb__img {
  opacity: 1;
}

.lb__btn {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: background-color 0.25s ease, opacity 0.35s ease;
}

.lb.is-visible .lb__btn {
  opacity: 1;
}

.lb.is-closing .lb__btn {
  opacity: 0;
}

.lb__btn:hover,
.lb__btn:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.lb__close {
  top: 14px;
  right: 14px;
}

.lb__prev,
.lb__next {
  top: 50%;
  margin-top: -23px;
}

.lb__prev {
  left: 14px;
}

.lb__next {
  right: 14px;
}

.lb__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.85);
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.lb.is-visible .lb__bar {
  opacity: 1;
}

.lb.is-closing .lb__bar {
  opacity: 0;
}

.lb__counter {
  flex: 0 0 auto;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .lb__stage {
    inset: 60px 10px 88px;
  }

  .lb-dots {
    bottom: 62px;
  }

  .lb__btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.16);
  }

  .lb__prev {
    left: 8px;
    top: auto;
    bottom: 14px;
    margin-top: 0;
  }

  .lb__next {
    right: 8px;
    top: auto;
    bottom: 14px;
    margin-top: 0;
  }

  .lb__close {
    top: 10px;
    right: 10px;
  }

  .lb__bar {
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 14px 60px;
    text-align: center;
    font-size: 12px;
  }
}
