/* ============================================================
   FORTIS — GALLERY Page Styles
   Page Header, 3D Tilt Gallery Grid & Lightbox Viewer
   ============================================================ */

/* ---------- PAGE HEADER BANNER ---------- */
.page-header {
  position: relative;
  padding: 140px 0 70px;
  background: var(--brand-navy, #231F20);
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.4) contrast(1.15);
  transform: scale(1.05);
  transition: transform 10s ease;
}

.page-header:hover .page-header-bg {
  transform: scale(1);
}

.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(35, 31, 32, 0.7) 0%, rgba(35, 31, 32, 0.95) 100%);
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header .eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #EB193D;
  margin-bottom: 12px;
}

.page-header h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: 16px;
}

.page-header h1 span {
  color: #EB193D;
}

.page-header p {
  max-width: 680px;
  margin: 0 auto 20px;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: #D1D5DB;
  line-height: 1.6;
}

.crumb {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.crumb a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.crumb a:hover {
  color: #EB193D;
}

.crumb span {
  color: #EB193D;
}

/* ---------- GALLERY SECTION ---------- */
.gallery-sec {
  background: #191617;
  color: #FFFFFF;
  position: relative;
  padding: 80px 0 100px;
}

.gallery-sec .section-head .eyebrow {
  color: #EB193D;
}

.gallery-sec .section-head h2 {
  color: #FFFFFF;
}

.gallery-sec .section-head p {
  color: #A1A1AA;
}

/* Category Filter Tabs */
.gallery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.gallery-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #D1D5DB;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 300ms ease;
  outline: none;
}

.gallery-tab:hover {
  background: rgba(235, 25, 61, 0.2);
  border-color: #EB193D;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.gallery-tab.active {
  background: #EB193D;
  border-color: #EB193D;
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(235, 25, 61, 0.45);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.gallery-card {
  background: rgba(35, 31, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 300ms ease, opacity 350ms ease, box-shadow 300ms ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.gallery-card:hover {
  border-color: rgba(235, 25, 61, 0.7);
  box-shadow: 0 16px 40px -10px rgba(235, 25, 61, 0.35);
}

.gallery-img-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}

.gallery-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1), filter 300ms ease;
}

.gallery-card:hover .gallery-img-frame img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

.gallery-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #EB193D, #C2122C);
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.gallery-expand-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(35, 31, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 250ms ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  outline: none;
}

.gallery-expand-btn:hover {
  background: #EB193D;
  border-color: #EB193D;
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(235, 25, 61, 0.6);
}

.gallery-card-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gallery-location {
  font-family: var(--font-head);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #EB193D;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-card-body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  text-transform: uppercase;
  margin-bottom: 8px;
  line-height: 1.3;
}

.gallery-card-body p {
  font-size: 0.88rem;
  color: #A1A1AA;
  line-height: 1.5;
  margin: 0;
}

/* ---------- LIGHTBOX MODAL ---------- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease-out, visibility 300ms ease-out;
}

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

.gallery-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.gallery-lightbox-dialog {
  position: relative;
  z-index: 10;
  max-width: 900px;
  width: 100%;
  background: #231F20;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  transform: scale(0.92);
  transition: transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-lightbox.is-open .gallery-lightbox-dialog {
  transform: scale(1);
}

.gallery-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 250ms ease;
  outline: none;
}

.gallery-lightbox-close:hover {
  background: #EB193D;
  border-color: #EB193D;
  transform: rotate(90deg) scale(1.08);
}

.gallery-lightbox-img-wrap {
  width: 100%;
  max-height: 65vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  max-height: 65vh;
  object-fit: contain;
}

.gallery-lightbox-info {
  padding: 24px 28px;
  background: #231F20;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-lightbox-info h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.gallery-lightbox-info p {
  font-size: 0.92rem;
  color: #D1D5DB;
  line-height: 1.5;
  margin: 0;
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-filters {
    gap: 8px;
  }
  .gallery-tab {
    font-size: 0.74rem;
    padding: 8px 18px;
  }
}