/* ===== GALLERY PAGE CSS ===== */

/* re-use page-hero from services - copy base */
.page-hero {
  position: relative;
  height: 280px;
  background: url("https://images.unsplash.com/photo-1621905251918-f9da98e22e3d?w=1400&q=80")
    center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding-bottom: 48px;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 20, 40, 0.7) 0%,
    rgba(15, 20, 40, 0.92) 100%
  );
}
.page-hero-content {
  position: relative;
  z-index: 2;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.3s;
}
.breadcrumb a:hover {
  color: var(--orange);
}
.bc-sep {
  color: var(--orange);
}
.page-hero-content h1 {
  font-size: clamp(36px, 6vw, 64px);
  color: #fff;
  margin-bottom: 10px;
}
.page-hero-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  max-width: 480px;
}

/* ===== GALLERY SECTION ===== */
.gallery-section {
  padding: 90px 0 100px;
  background: #fff;
}

.gallery-intro-text {
  text-align: center;
  max-width: 560px;
  margin: -20px auto 44px;
  color: var(--gray);
  font-size: 15px;
  line-height: 1.7;
}

/* ===== FILTER TABS ===== */
.gallery-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* ===== MASONRY GRID ===== */
.gallery-grid {
  columns: 3;
  column-gap: 14px;
}

.gal-item {
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 14px;
  cursor: pointer;
  background: var(--dark2);
}

/* Tall items take up more visual space via taller image */
.gal-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  height: 260px;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gal-item.tall img {
  height: 380px;
}
.gal-item.wide img {
  height: 300px;
}

.gal-item:hover img {
  transform: scale(1.07);
}

/* Overlay */
.gal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 20, 40, 0.92) 0%,
    rgba(240, 90, 26, 0.55) 55%,
    rgba(240, 90, 26, 0.08) 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.gal-item:hover .gal-overlay {
  opacity: 1;
}

.gal-icon {
  font-size: 30px;
  margin-bottom: 14px;
  transform: scale(0.7);
  transition: transform 0.35s ease 0.05s;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
.gal-item:hover .gal-icon {
  transform: scale(1);
}

.gal-info {
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.35s ease 0.05s;
}
.gal-item:hover .gal-info {
  transform: translateY(0);
}

.gal-cat {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 3px;
  margin-bottom: 8px;
}
.gal-name {
  display: block;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  padding: 0 16px;
  line-height: 1.2;
}

/* Hidden filter state */
.gal-item.hidden {
  display: none;
}

/* Fade-in animation for items */
.gal-item.reveal-in {
  animation: galReveal 0.45s ease both;
}
@keyframes galReveal {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 24, 0.96);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.lb-content {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 36px;
  align-items: center;
  max-width: 1100px;
  width: 90%;
  padding: 20px;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lightbox.open .lb-content {
  transform: scale(1);
}

.lb-img-wrap {
  flex: 1.4;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  max-height: 80vh;
}
.lb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 75vh;
}

.lb-info {
  flex: 0.6;
  color: #fff;
}
.lb-cat {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 3px;
  margin-bottom: 16px;
}
.lb-info h3 {
  font-size: clamp(24px, 3vw, 36px);
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.1;
}
.lb-info p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  line-height: 1.75;
}

/* Nav buttons */
.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  z-index: 10;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition:
    color 0.25s,
    transform 0.25s;
  line-height: 1;
}
.lb-close {
  top: 24px;
  right: 28px;
  font-size: 28px;
}
.lb-close:hover {
  color: var(--orange);
  transform: rotate(90deg);
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 64px;
  font-weight: 300;
  padding: 0 16px;
}
.lb-prev {
  left: 8px;
}
.lb-next {
  right: 8px;
}
.lb-prev:hover,
.lb-next:hover {
  color: var(--orange);
}

.lb-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
}

/* ===== ACTIVE NAV ===== */
.main-nav a.active {
  color: var(--orange) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .gallery-grid {
    columns: 2;
  }
  .lb-content {
    flex-direction: column;
    gap: 20px;
  }
  .lb-img-wrap {
    flex: none;
    width: 100%;
  }
  .lb-info {
    flex: none;
  }
  .lb-prev {
    left: 4px;
    font-size: 48px;
  }
  .lb-next {
    right: 4px;
    font-size: 48px;
  }
}

@media (max-width: 560px) {
  .gallery-grid {
    columns: 1;
  }
  .gal-item img,
  .gal-item.tall img,
  .gal-item.wide img {
    height: 240px;
  }
  .page-hero {
    height: 200px;
  }
}
