/* =============================================================
   Luxury Hotel Gallery – gallery.css
   ============================================================= */

/* ── Reset & Base ───────────────────────────────────────────── */
.lhg-widget-wrap *,
.lhg-widget-wrap *::before,
.lhg-widget-wrap *::after {
  box-sizing: border-box;
}

.lhg-widget-wrap {
  position: relative;
  font-family: inherit;
}

/* ── Grid ───────────────────────────────────────────────────── */
.lhg-grid {
  display: grid;
  width: 100%;
}

/* ── Shared Item ─────────────────────────────────────────────── */
.lhg-item {
  position: relative;
  display: block;
}

.lhg-item-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #1a1a1a;
}

/* Grid uses aspect-ratio set inline; Slider uses explicit height */
.lhg-grid .lhg-item-inner {
  /* aspect-ratio applied inline per setting */
}

/* ── Image ───────────────────────────────────────────────────── */
.lhg-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.5s ease;
  will-change: transform;
}

.lhg-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e1e1e 0%, #2e2e2e 50%, #1a1a1a 100%);
  position: relative;
}

.lhg-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,255,255,0.02) 10px,
    rgba(255,255,255,0.02) 20px
  );
}

/* ── Zoom on hover ───────────────────────────────────────────── */
.lhg-zoom .lhg-item-inner:hover .lhg-image {
  transform: scale(1.07);
}

/* ── Overlay ─────────────────────────────────────────────────── */
.lhg-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  /* background set via Elementor control */
  background: rgba(0, 0, 0, 0.45);
}

.lhg-overlay-slider {
  opacity: 1;
}

.lhg-item-inner:hover .lhg-overlay:not(.lhg-overlay-slider) {
  opacity: 1;
}

.lhg-caption-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateY(8px);
  transition: transform 0.4s ease;
}

.lhg-item-inner:hover .lhg-caption-wrap {
  transform: translateY(0);
}

.lhg-overlay-slider .lhg-caption-wrap {
  transform: translateY(0);
}

.lhg-caption {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.2;
}

.lhg-subcaption {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.3;
}

/* ── Lightbox trigger icon ───────────────────────────────────── */
.lhg-lightbox-trigger {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.2s ease;
  cursor: pointer;
  pointer-events: all;
  backdrop-filter: blur(4px);
}

.lhg-lightbox-trigger svg {
  width: 16px;
  height: 16px;
}

.lhg-item-inner:hover .lhg-lightbox-trigger {
  opacity: 1;
}

.lhg-lightbox-trigger:hover {
  background: rgba(201, 169, 110, 0.8) !important;
}

/* cursor pointer on clickable items */
.lhg-grid-item[data-lightbox-src] .lhg-item-inner {
  cursor: pointer;
}

/* ── Swiper / Slider ─────────────────────────────────────────── */
.lhg-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.lhg-slider .swiper-wrapper {
  align-items: stretch;
}

.lhg-slider .swiper-slide {
  height: auto;
}

.lhg-slider .lhg-item-inner {
  height: 480px; /* default, overridden by Elementor slider */
}

/* ── Navigation Arrows ───────────────────────────────────────── */
.lhg-btn-prev,
.lhg-btn-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  background: rgba(20, 20, 20, 0.65);
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(6px);
  outline: none;
}

.lhg-btn-prev { left: 16px; }
.lhg-btn-next { right: 16px; }

.lhg-btn-prev:hover,
.lhg-btn-next:hover {
  background: rgba(201, 169, 110, 0.85);
  border-color: rgba(201, 169, 110, 0.85);
  transform: translateY(-50%) scale(1.08);
}

.lhg-btn-prev svg,
.lhg-btn-next svg {
  width: 20px;
  height: 20px;
  stroke: #c9a96e;
  transition: stroke 0.25s ease;
}

.lhg-btn-prev:hover svg,
.lhg-btn-next:hover svg {
  stroke: #ffffff;
}

.lhg-btn-prev.swiper-button-disabled,
.lhg-btn-next.swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ── Pagination Dots ─────────────────────────────────────────── */
.lhg-pagination {
  margin-top: 1.25rem;
  text-align: center;
  line-height: 1;
}

.lhg-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(0, 0, 0, 0.25);
  opacity: 1;
  border-radius: 50%;
  transition: background 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.lhg-pagination .swiper-pagination-bullet-active {
  background: #c9a96e;
  transform: scale(1.3);
}

/* ── Lightbox Modal ──────────────────────────────────────────── */
.lhg-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lhg-lightbox-modal.lhg-lb-open {
  opacity: 1;
  pointer-events: all;
}

.lhg-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.lhg-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lhg-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.85);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

.lhg-lightbox-modal.lhg-lb-open .lhg-lightbox-img {
  transform: scale(1);
}

.lhg-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.lhg-lightbox-close:hover {
  background: rgba(201,169,110,0.7);
  transform: rotate(90deg);
}

.lhg-lightbox-close svg {
  width: 20px;
  height: 20px;
}

.lhg-lightbox-prev,
.lhg-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 2;
}

.lhg-lightbox-prev { left: 20px; }
.lhg-lightbox-next { right: 20px; }

.lhg-lightbox-prev:hover,
.lhg-lightbox-next:hover {
  background: rgba(201,169,110,0.7);
}

.lhg-lightbox-prev svg,
.lhg-lightbox-next svg {
  width: 22px;
  height: 22px;
}

/* ── Responsive helpers ──────────────────────────────────────── */
@media (max-width: 767px) {
  .lhg-btn-prev { left: 8px; }
  .lhg-btn-next { right: 8px; }

  .lhg-lightbox-prev { left: 6px; }
  .lhg-lightbox-next { right: 6px; }

  .lhg-lightbox-content { max-width: 100vw; }
  .lhg-lightbox-img     { max-width: 100vw; max-height: 80vh; }
}

/* ── Elementor editor preview skeleton ──────────────────────── */
.elementor-editor-active .lhg-overlay {
  opacity: 1 !important;
}

.elementor-editor-active .lhg-overlay-slider {
  opacity: 1 !important;
}
