/* ==========================================================================
   Gallery Page — Premium Gallery Styles
   Uses the site's existing CSS custom properties defined in main.css:
   --gt-theme (gold), --gt-header (deep brown), --gt-text, --gt-bg3, --gt-box-shadow
   ========================================================================== */

.gt-gallery-section {
  position: relative;
  overflow: hidden;
  background-color: var(--gt-bg3);
  z-index: 1;
}

.gt-gallery-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 26, 8, 0.08) 1.5px, transparent 0);
  background-size: 26px 26px;
  opacity: 0.5;
  z-index: -1;
}

.gt-gallery-glow-1,
.gt-gallery-glow-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
}

.gt-gallery-glow-1 {
  width: 420px;
  height: 420px;
  top: -160px;
  left: -140px;
  background: rgba(235, 204, 54, 0.25);
}

.gt-gallery-glow-2 {
  width: 380px;
  height: 380px;
  bottom: -140px;
  right: -120px;
  background: rgba(61, 26, 8, 0.12);
}

/* ---------- Intro ---------- */
.gt-gallery-intro-text {
  max-width: 640px;
  margin: 0 auto;
  color: var(--gt-text);
  font-size: 17px;
}

/* ---------- Video Tour Banner ---------- */
.gt-gallery-video {
  margin: 10px 0 55px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--gt-box-shadow);
}

.gt-gallery-video-media {
  position: relative;
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gt-gallery-video-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 10, 3, 0.35) 0%, rgba(15, 10, 3, 0.75) 100%);
}

.gt-gallery-video-btn {
  position: relative;
  z-index: 2;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: none;
  background-color: var(--gt-theme);
  color: #221a05;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.35s ease;
}

.gt-gallery-video-btn i {
  position: relative;
  z-index: 1;
  margin-left: 4px;
}

.gt-gallery-video-btn:hover {
  transform: scale(1.08);
}

.gt-gallery-video-btn .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  animation: gtVideoRing 2.6s ease-out infinite;
}

.gt-gallery-video-btn .ring-delay {
  animation-delay: 1.3s;
}

@keyframes gtVideoRing {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.gt-gallery-video-caption {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  color: var(--gt-white);
}

.gt-gallery-video-caption h3 {
  font-family: "Gilda Display", sans-serif;
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 6px;
}

.gt-gallery-video-caption p {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Video Modal ---------- */
.gt-video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 7, 2, 0.96);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gt-video-modal.active {
  display: flex;
  opacity: 1;
}

.gt-video-modal-inner {
  width: 100%;
  max-width: 960px;
  padding: 0 20px;
  transform: scale(0.92);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gt-video-modal.active .gt-video-modal-inner {
  transform: scale(1);
  opacity: 1;
}

.gt-video-modal-inner video {
  width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  background: #000;
}

.gt-video-modal-close {
  position: fixed;
  top: 26px;
  right: 26px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--gt-white);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.gt-video-modal-close:hover {
  background: var(--gt-theme);
  color: #221a05;
  border-color: var(--gt-theme);
}

@media (max-width: 767px) {
  .gt-gallery-video-media {
    height: 320px;
  }
  .gt-gallery-video-btn {
    width: 70px;
    height: 70px;
    font-size: 19px;
  }
  .gt-gallery-video-caption h3 {
    font-size: 24px;
  }
  .gt-video-modal-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }
}

/* ---------- Filter Pills ---------- */
.gt-gallery-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 45px 0 70px;
}

.gt-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(61, 26, 8, 0.18);
  background-color: var(--gt-white);
  color: var(--gt-header);
  font-family: "Barlow", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: capitalize;
  padding: 12px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.35s ease;
}

.gt-filter-btn .count {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  background: rgba(61, 26, 8, 0.08);
  color: var(--gt-header);
  border-radius: 50px;
  padding: 1px 8px;
  transition: all 0.35s ease;
}

.gt-filter-btn:hover {
  border-color: var(--gt-theme);
  color: var(--gt-header);
  transform: translateY(-2px);
}

.gt-filter-btn.active {
  background-color: var(--gt-theme);
  border-color: var(--gt-theme);
  color: #221a05;
  box-shadow: 0 10px 24px -8px rgba(235, 204, 54, 0.65);
}

.gt-filter-btn.active .count {
  background: rgba(34, 26, 5, 0.15);
  color: #221a05;
}

/* ---------- Gallery Group ---------- */
.gt-gallery-group {
  margin-bottom: 90px;
  scroll-margin-top: 130px;
}

.gt-gallery-group:last-child {
  margin-bottom: 0;
}

.gt-gallery-group-head {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(61, 26, 8, 0.12);
}

.gt-gallery-index {
  font-family: "Gilda Display", sans-serif;
  font-size: 56px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(61, 26, 8, 0.35);
  flex-shrink: 0;
}

.gt-gallery-group-text {
  flex-grow: 1;
}

.gt-gallery-group-text h3 {
  font-family: "Gilda Display", sans-serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--gt-header);
  margin-bottom: 6px;
  text-transform: capitalize;
}

.gt-gallery-group-text p {
  margin: 0;
  color: var(--gt-text);
  font-size: 15px;
  max-width: 560px;
}

.gt-gallery-group-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Barlow", sans-serif;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gt-header);
  white-space: nowrap;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gt-theme);
  transition: color 0.3s ease, gap 0.3s ease;
}

.gt-gallery-group-link i {
  transition: transform 0.3s ease;
}

.gt-gallery-group-link:hover {
  color: var(--gt-theme);
  gap: 12px;
}

.gt-gallery-group-link:hover i {
  transform: translateX(3px);
}

/* ---------- Mosaic Grid ---------- */
.gt-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  grid-auto-flow: dense;
  gap: 18px;
}

.gt-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: var(--gt-box-shadow);
  background-color: #e9e2d3;
  opacity: 0;
  transform: translateY(26px);
  animation: gtGalleryFadeUp 0.7s ease forwards;
}

@keyframes gtGalleryFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gt-gallery-grid .gt-gallery-item:nth-child(6n+1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gt-gallery-grid .gt-gallery-item:nth-child(6n+4) {
  grid-column: span 2;
}

.gt-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.5s ease;
}

.gt-gallery-item:hover img {
  transform: scale(1.1);
}

.gt-gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(15, 10, 3, 0) 40%, rgba(15, 10, 3, 0.85) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gt-gallery-item:hover .gt-gallery-overlay {
  opacity: 1;
}

.gt-gallery-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--gt-white);
  font-size: 15px;
  opacity: 0;
  transform: scale(0.6) rotate(-20deg);
  transition: all 0.4s ease;
}

.gt-gallery-item:hover .gt-gallery-zoom {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  background: var(--gt-theme);
  color: #221a05;
  border-color: var(--gt-theme);
}

.gt-gallery-cap {
  color: var(--gt-white);
  font-family: "Barlow", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.45s ease 0.05s;
}

.gt-gallery-item:hover .gt-gallery-cap {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- Lightbox ---------- */
.gt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 7, 2, 0.96);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gt-lightbox.active {
  display: flex;
  opacity: 1;
}

.gt-lightbox-inner {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 88vh;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.92);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gt-lightbox.active .gt-lightbox-inner {
  transform: scale(1);
  opacity: 1;
}

.gt-lightbox-inner img {
  max-width: 100%;
  max-height: 74vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  object-fit: contain;
}

.gt-lightbox-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  color: var(--gt-white);
  font-family: "Barlow", sans-serif;
}

.gt-lightbox-meta #gtLightboxCaption {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.gt-lightbox-meta #gtLightboxCounter {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding-left: 16px;
}

.gt-lightbox-close,
.gt-lightbox-prev,
.gt-lightbox-next {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: var(--gt-white);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}

.gt-lightbox-close:hover,
.gt-lightbox-prev:hover,
.gt-lightbox-next:hover {
  background: var(--gt-theme);
  color: #221a05;
  border-color: var(--gt-theme);
}

.gt-lightbox-close {
  top: 26px;
  right: 26px;
}

.gt-lightbox-prev {
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
}

.gt-lightbox-next {
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
}

body.gt-lightbox-open {
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .gt-gallery-grid {
    grid-auto-rows: 190px;
  }
}

@media (max-width: 991px) {
  .gt-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 210px;
  }
  .gt-gallery-group-head {
    flex-wrap: wrap;
  }
  .gt-gallery-index {
    font-size: 42px;
  }
  .gt-lightbox-prev,
  .gt-lightbox-next {
    width: 42px;
    height: 42px;
    font-size: 15px;
  }
  .gt-lightbox-prev {
    left: 12px;
  }
  .gt-lightbox-next {
    right: 12px;
  }
  .gt-lightbox-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 575px) {
  .gt-gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
    gap: 14px;
  }
  .gt-gallery-grid .gt-gallery-item:nth-child(6n+1),
  .gt-gallery-grid .gt-gallery-item:nth-child(6n+4) {
    grid-column: span 1;
    grid-row: span 1;
  }
  .gt-gallery-filter {
    gap: 8px;
    margin: 30px 0 45px;
  }
  .gt-filter-btn {
    padding: 10px 18px;
    font-size: 13px;
  }
  .gt-gallery-group {
    margin-bottom: 60px;
  }
  .gt-gallery-group-text h3 {
    font-size: 26px;
  }
}
