/* =========================================================
   DLG HOTEL DANANG - GALLERY PAGE
   Scoped CSS only for gallery.html
   Standard matched with Dining / Spa / About pages
========================================================= */

.dlg-gallery-page {
  --gallery-green: #0b6f78;
  --gallery-dark: #07545c;
  --gallery-gold: #bc955c;
  --gallery-text: #283638;
  --gallery-muted: #687476;
  --gallery-line: rgba(11, 111, 120, 0.16);
  --gallery-bg: #f4f7f7;
  --gallery-container: 1280px;
  --gallery-gutter: 64px;

  width: 100%;
  overflow: hidden;
  background: var(--gallery-bg);
  color: var(--gallery-text);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.dlg-gallery-page *,
.dlg-gallery-page *::before,
.dlg-gallery-page *::after {
  box-sizing: border-box;
}

/* =========================
   BANNER - room-detail style
========================= */

.gallery-hero {
  position: relative;
  width: 100%;
  height: clamp(430px, 52.5vw, 610px);
  margin: 0;
  overflow: hidden;
  background: #111;
}

.gallery-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: none;
}

.gallery-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0.04) 42%, rgba(0, 0, 0, 0.15)),
    linear-gradient(to top, rgba(8, 95, 105, 0.52), rgba(8, 95, 105, 0.10) 47%, rgba(0, 0, 0, 0.06)),
    linear-gradient(to right, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.02) 45%, rgba(0, 0, 0, 0.10));
}

.gallery-hero__content {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 77%;
  width: min(980px, calc(100% - 64px));
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.gallery-hero__content span {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.88);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.30);
}

.gallery-hero__content h1 {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  color: #fff;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3.1vw, 46px);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0.018em;
  text-align: center;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

/* =========================
   CONTENT
========================= */

.gallery-section {
  padding: 82px 0 108px;
}

.gallery-container {
  width: min(var(--gallery-container), calc(100% - var(--gallery-gutter) * 2));
  margin: 0 auto;
}

.gallery-heading {
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.gallery-kicker {
  display: block;
  margin-bottom: 14px;
  color: var(--gallery-gold);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-heading h2 {
  margin: 0;
  color: var(--gallery-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(29px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.gallery-heading p {
  max-width: 690px;
  margin: 18px auto 0;
  color: var(--gallery-muted);
  font-size: 14px;
  line-height: 1.85;
  font-weight: 400;
}

/* =========================
   TABS
========================= */

.gallery-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 32px;
  border-bottom: 1px solid rgba(11, 111, 120, 0.32);
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-tabs::-webkit-scrollbar {
  display: none;
}

.gallery-tabs button {
  position: relative;
  min-width: 150px;
  padding: 0 22px 15px;
  border: 0;
  background: transparent;
  color: var(--gallery-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color 260ms ease;
}

.gallery-tabs button::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -1px;
  height: 4px;
  background: var(--gallery-green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 280ms ease;
}

.gallery-tabs button.active,
.gallery-tabs button:hover {
  color: var(--gallery-green);
}

.gallery-tabs button.active::after {
  transform: scaleX(1);
}

/* =========================
   GRID
========================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 22px;
}

.gallery-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.55 / 1;
  margin: 0;
  overflow: hidden;
  background: #e9eeee;
}

.gallery-card.is-hidden {
  display: none !important;
}

.gallery-card__btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 780ms cubic-bezier(0.22, 0.72, 0.22, 1), filter 780ms ease;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(8, 95, 105, 0.34), rgba(8, 95, 105, 0.02) 58%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.08));
  opacity: 0;
  transition: opacity 360ms ease;
}

.gallery-card:hover img {
  transform: scale(1.055);
  filter: saturate(1.04) contrast(1.02);
}

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

/* =========================
   LIGHTBOX
========================= */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 88px;
  background: rgba(2, 31, 34, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox img {
  display: block;
  max-width: min(1120px, 100%);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.gallery-lightbox__close {
  position: absolute;
  top: 28px;
  right: 34px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.gallery-lightbox__close::before,
.gallery-lightbox__close::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 20px;
  width: 24px;
  height: 1.5px;
  background: #fff;
}

.gallery-lightbox__close::before { transform: rotate(45deg); }
.gallery-lightbox__close::after { transform: rotate(-45deg); }

.gallery-lightbox__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 58px;
  height: 76px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  opacity: 0.88;
}

.gallery-lightbox__prev { left: 22px; }
.gallery-lightbox__next { right: 22px; }

.gallery-lightbox__arrow span {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  border-top: 2px solid rgba(255,255,255,.92);
  border-left: 2px solid rgba(255,255,255,.92);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.35));
}

.gallery-lightbox__prev span { transform: rotate(-45deg); }
.gallery-lightbox__next span { transform: rotate(135deg); }

.gallery-lock {
  overflow: hidden !important;
}

/* =========================
   SMOOTH FADE-IN
========================= */

.dlg-gallery-page .fadein-up,
.dlg-gallery-page .fadein-left,
.dlg-gallery-page .fadein-right {
  opacity: 0;
  transition:
    opacity 1s cubic-bezier(0.22, 0.72, 0.22, 1),
    transform 1s cubic-bezier(0.22, 0.72, 0.22, 1);
  transition-delay: var(--fade-delay, 0ms);
  will-change: opacity, transform;
}

.dlg-gallery-page .fadein-up { transform: translateY(30px); }
.dlg-gallery-page .fadein-left { transform: translateX(-32px); }
.dlg-gallery-page .fadein-right { transform: translateX(32px); }

.dlg-gallery-page .fadein-up.is-visible,
.dlg-gallery-page .fadein-left.is-visible,
.dlg-gallery-page .fadein-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .dlg-gallery-page *,
  .gallery-lightbox {
    transition: none !important;
    animation: none !important;
  }

  .dlg-gallery-page .fadein-up,
  .dlg-gallery-page .fadein-left,
  .dlg-gallery-page .fadein-right {
    opacity: 1;
    transform: none !important;
  }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1180px) {
  .dlg-gallery-page {
    --gallery-container: 1120px;
    --gallery-gutter: 40px;
  }

  .gallery-grid {
    gap: 16px;
  }
}

@media (max-width: 980px) {
  .dlg-gallery-page {
    --gallery-gutter: 32px;
  }

  .gallery-section {
    padding: 64px 0 86px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-tabs {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .gallery-tabs button {
    min-width: auto;
    padding-left: 18px;
    padding-right: 18px;
    font-size: 15px;
  }
}

@media (max-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .gallery-lightbox {
    padding: 62px 22px;
  }

  .gallery-lightbox__arrow {
    width: 42px;
    height: 58px;
  }

  .gallery-lightbox__prev { left: 4px; }
  .gallery-lightbox__next { right: 4px; }
}

@media (max-width: 600px) {
  .dlg-gallery-page {
    --gallery-gutter: 20px;
  }

  .gallery-hero {
    height: 390px;
  }

  .gallery-hero__content {
    top: 72%;
    width: calc(100% - 44px);
  }

  .gallery-hero__content h1 {
    font-size: 28px;
    line-height: 1.16;
  }

  .gallery-hero__content span {
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .gallery-section {
    padding: 52px 0 72px;
  }

  .gallery-heading {
    margin-bottom: 30px;
  }

  .gallery-heading h2 {
    font-size: 27px;
  }

  .gallery-heading p {
    font-size: 14px;
    line-height: 1.78;
  }

  .gallery-tabs {
    margin-bottom: 24px;
  }

  .gallery-tabs button {
    padding: 0 15px 13px;
    font-size: 14px;
  }

  .gallery-card {
    aspect-ratio: 1.38 / 1;
  }
}
