/* ═══════════════════════════════════════════════════════════
   photos.css  —  Page-specific styles for photos.html
   All shared tokens and base styles live in global.css.
═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   HERO COMPACT VARIANT
───────────────────────────────────────── */
.hero-compact {
  min-height: unset;
}

.hero-content-compact {
  padding: var(--space-4xl) var(--space-lg) var(--space-3xl);
  gap: var(--space-lg);
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(189, 212, 240, 0.80);
  max-width: 520px;
  line-height: 1.6;
}

/* Active nav link */
.main-nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

/* ─────────────────────────────────────────
   SECTION INNER — WIDE VARIANT
   The photo grid needs more breathing room
   than the standard 960px content column.
───────────────────────────────────────── */
.section-inner-wide {
  max-width: 1200px;
}

/* ─────────────────────────────────────────
   GALLERY TOOLBAR
───────────────────────────────────────── */
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.gallery-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Filter chip — reuses the contacts page pattern */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  font-weight: 700;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  border: 1px solid #e5e7eb;
  background: var(--white);
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.filter-chip:hover {
  background: var(--blue-50);
  border-color: var(--blue-300);
  color: var(--blue-700);
  transform: translateY(-1px);
}

.filter-chip-active {
  background: var(--blue-950);
  color: var(--white);
  border-color: var(--blue-950);
}

.filter-chip-active:hover {
  background: var(--blue-800);
  border-color: var(--blue-800);
  color: var(--white);
}

.gallery-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-400);
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   PHOTO GRID
───────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
}

/* ── Individual photo tile ── */
.photo-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--blue-800);
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;

  /* Smooth in from hidden (set by JS filter) */
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.photo-item.item-hidden {
  display: none;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.photo-item:hover img {
  transform: scale(1.06);
}

/* ── Hover overlay ── */
.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.70), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: var(--space-md);
}

.photo-item:hover .photo-overlay,
.photo-item:focus-visible .photo-overlay {
  opacity: 1;
}

.photo-item:focus-visible {
  outline: 3px solid var(--amber-400);
  outline-offset: 2px;
}

.photo-overlay-label {
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ── Placeholder tile (shown when image fails to load) ── */
.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-900));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  color: rgba(255, 255, 255, 0.35);
}

.gallery-placeholder svg  { width: 40px; height: 40px; }
.gallery-placeholder span { font-size: 0.75rem; font-weight: 500; }

/* ─────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────── */
.gallery-empty {
  text-align: center;
  padding: var(--space-5xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.gallery-empty[hidden] {
  display: none;
}

.gallery-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-2xl);
  background: var(--blue-50);
  color: var(--blue-300);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-empty-icon svg {
  width: 36px;
  height: 36px;
}

.gallery-empty-msg {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-500);
}

/* ─────────────────────────────────────────
   LIGHTBOX — PHOTOS PAGE ADDITIONS
   The base lightbox styles live in global.css.
   These additions provide previous/next navigation
   and a photo counter unique to the full gallery.
───────────────────────────────────────── */

/* Make lightbox-inner a flex row so prev/next sit beside the image */
.lightbox-inner {
  position: relative;
  max-width: 960px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

/* Override the global rule that makes the image 100% wide so it
   leaves room for the nav arrows */
.lightbox-inner img {
  flex: 1;
  min-width: 0;
  width: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-2xl);
  display: block;
}

/* Shared arrow button base */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.lightbox-prev { left: -56px; }
.lightbox-next { right: -56px; }

.lightbox-prev:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-50%) scale(1.1); }
.lightbox-next:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-50%) scale(1.1); }

.lightbox-prev svg,
.lightbox-next svg {
  width: 20px;
  height: 20px;
}

/* Photo counter  e.g. "4 / 31" */
.lightbox-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

/* ─────────────────────────────────────────
   JOIN US CTA — dark section
───────────────────────────────────────── */
.photos-cta-card {
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-2xl);
  padding: var(--space-3xl) var(--space-4xl);
  flex-wrap: wrap;
}

.photos-cta-text {
  flex: 1;
  min-width: 220px;
}

.photos-cta-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.photos-cta-desc {
  font-size: 0.9rem;
  color: rgba(189, 212, 240, 0.75);
  line-height: 1.7;
}

.photos-cta-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 960px) {
  /* Tuck the arrows inside the lightbox on smaller screens */
  .lightbox-prev { left: var(--space-sm); }
  .lightbox-next { right: var(--space-sm); }

  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.45);
  }
}

@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
  }

  .gallery-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .photos-cta-card {
    flex-direction: column;
    padding: var(--space-2xl);
    gap: var(--space-xl);
  }

  .photos-cta-buttons {
    width: 100%;
    flex-direction: row;
  }

  .photos-cta-buttons .btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
  }

  .photo-item {
    border-radius: var(--radius-lg);
  }

  .gallery-filter-row {
    gap: var(--space-xs);
  }

  .filter-chip {
    font-size: 0.7rem;
    padding: var(--space-xs) var(--space-md);
  }

  .photos-cta-buttons {
    flex-direction: column;
  }

  .photos-cta-buttons .btn {
    width: 100%;
  }
}