/* ==========================================================================
   CXO GLOBAL ALLIANCE - GALLERY STYLESHEET (gallery.css)
   Matches Image 11. Gallery with video hero, filter tabs, 3x3 photo grid,
   lightbox preview modal, and shared footer.
   ========================================================================== */

:root {
  --navy-darker: #061322;
  --navy-dark: #08182b;
  --navy-primary: #0b1a2d;
  --navy-card: #0e223d;

  --gold-primary: #e5a83b;
  --gold-light: #f5be5d;
  --gold-dark: #c98e29;
  --gold-subtle: rgba(229, 168, 59, 0.12);

  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-white: #ffffff;

  --bg-white: #ffffff;
  --bg-soft: #f8fafc;
  --border-card: #e2e8f0;

  --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(8, 24, 43, 0.04);
  --shadow-hover: 0 14px 30px rgba(8, 24, 43, 0.15);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-soft);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Header & Navbar
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--navy-dark);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
}

.site-header .container.header-inner,
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 36px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-white);
  flex-shrink: 0;
}

.logo-icon-svg {
  width: 38px;
  height: 38px;
  color: var(--gold-primary);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-white);
  line-height: 1;
}

.logo-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  margin-top: 3px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 0;
  position: relative;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--gold-primary);
  border-radius: 2px;
}

.btn-join-alliance {
  background-color: var(--gold-primary);
  color: var(--navy-darker);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(229, 168, 59, 0.3);
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-join-alliance:hover {
  background-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(229, 168, 59, 0.45);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-white);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Hero Section with YouTube Background Video
   -------------------------------------------------------------------------- */
.gallery-hero {
  position: relative;
  padding-top: 175px;
  padding-bottom: 95px;
  text-align: center;
  overflow: hidden;
  background-color: var(--navy-darker);
}

.video-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.video-bg-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%);
  border: none;
  opacity: 1;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(8, 24, 43, 0.32) 0%,
    rgba(8, 24, 43, 0.5) 50%,
    rgba(6, 19, 34, 0.9) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-white);
  margin-bottom: 12px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero-divider {
  width: 55px;
  height: 3px;
  background-color: var(--gold-primary);
  margin: 0 auto 16px auto;
  border-radius: 2px;
}

.hero-tagline {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Filter Tabs Strip (Matches Image 11. Gallery)
   -------------------------------------------------------------------------- */
.gallery-filter-section {
  padding: 50px 0 35px 0;
  display: flex;
  justify-content: center;
}

.gallery-tabs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gallery-tab-btn {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--border-card);
  background-color: var(--bg-white);
  color: var(--navy-dark);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.gallery-tab-btn:hover {
  background-color: var(--navy-dark);
  color: #ffffff;
  border-color: var(--navy-dark);
}

.gallery-tab-btn.active {
  background-color: var(--navy-dark);
  color: var(--gold-primary);
  border-color: var(--navy-dark);
  box-shadow: 0 4px 14px rgba(8, 24, 43, 0.25);
}

/* --------------------------------------------------------------------------
   Gallery Photo Grid (3 x 3 = 9 Cards) Matches Image 11
   -------------------------------------------------------------------------- */
.gallery-grid-section {
  padding-bottom: 90px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.gallery-item {
  position: relative;
  height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--navy-dark);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Gradient Overlay & Captions on Hover */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(6, 19, 34, 0.15) 0%,
    rgba(6, 19, 34, 0.85) 100%
  );
  opacity: 0.85;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  background: linear-gradient(
    180deg,
    rgba(6, 19, 34, 0.3) 0%,
    rgba(6, 19, 34, 0.92) 100%
  );
}

.gallery-tag {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy-darker);
  background-color: var(--gold-primary);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.gallery-caption {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Interactive Lightbox Modal
   -------------------------------------------------------------------------- */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(6, 19, 34, 0.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.lightbox-img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--gold-primary);
  transform: scale(1.15);
}

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

@media (max-width: 1320px) {
  .nav-menu {
    gap: 13px;
  }
  .nav-link {
    font-size: 0.78rem;
    letter-spacing: 0.3px;
  }
  .btn-join-alliance {
    padding: 9px 15px;
    font-size: 0.78rem;
  }
}

@media (max-width: 1080px) {
  .nav-menu,
  .site-header .btn-join-alliance {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .site-header.mobile-open .nav-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--navy-darker);
    padding: 24px;
    border-bottom: 2px solid var(--gold-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    gap: 16px;
    align-items: flex-start;
  }

  .site-header.mobile-open .btn-join-alliance {
    display: inline-flex;
    width: 100%;
    margin-top: 10px;
  }

  .hero-title {
    font-size: 2.3rem;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .gallery-tabs-row {
    gap: 8px;
  }

  .gallery-tab-btn {
    font-size: 0.75rem;
    padding: 8px 16px;
  }
}
