/* ============================================
   GALLERY PAGE STYLES
   Project Cards + Lightbox
   ============================================ */

/* ============================================
   FILTER TABS
   ============================================ */
.gallery__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-xl);
}

.gallery__filter {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gray);
  background: transparent;
  border: 1px solid var(--gray-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery__filter:hover {
  color: var(--navy-dark);
  border-color: var(--navy-dark);
}

.gallery__filter.active {
  color: var(--white);
  background: var(--navy-dark);
  border-color: var(--navy-dark);
}

.gallery__filter-count {
  font-weight: 400;
  opacity: 0.7;
}

/* ============================================
   PROJECT CARDS GRID
   ============================================ */
.gallery__projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
  cursor: pointer;
  outline: none;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.project-card--coming-soon,
.project-card--no-images {
  cursor: default;
}

.project-card--coming-soon:hover,
.project-card--no-images:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* Card Image */
.project-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-light);
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-card__image img {
  transform: scale(1.05);
}

.project-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--gold);
}

.project-card__placeholder span {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* Image Count Badge */
.project-card__image-count {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.project-card__image-count svg {
  opacity: 0.8;
}

/* Card Content */
.project-card__content {
  padding: 1.5rem;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--navy-dark);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.project-card__location {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
}

.project-card__description {
  font-size: 0.9375rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-card__view {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-dark);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.project-card:hover .project-card__view {
  gap: 0.75rem;
  color: var(--gold);
}

/* Empty State */
.gallery__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-xl);
  color: var(--gray);
  font-size: 1.125rem;
}

/* ============================================
   GALLERY NOTICE
   ============================================ */
.gallery__notice {
  margin-top: var(--space-xl);
  padding: 2rem;
  background: var(--cream);
  border-left: 4px solid var(--gold);
}

.gallery__notice-content {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.gallery__notice-content svg {
  flex-shrink: 0;
  color: var(--gold);
}

.gallery__notice-content h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 0.5rem;
}

.gallery__notice-content p {
  font-size: 0.9375rem;
  color: var(--gray);
  margin: 0;
  line-height: 1.6;
}

.gallery__notice-content a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gallery__notice-content a:hover {
  color: var(--gold);
}

/* ============================================
   GALLERY CTA
   ============================================ */
.gallery-cta {
  text-align: center;
}

.gallery-cta__content {
  max-width: 600px;
  margin: 0 auto;
}

.gallery-cta__title {
  margin-bottom: var(--space-sm);
}

.gallery-cta__text {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-lg);
}

.gallery-cta__buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.lightbox.active {
  visibility: visible;
  opacity: 1;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.95);
}

.lightbox__container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* Lightbox Header */
.lightbox__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  flex-shrink: 0;
}

.lightbox__project-info {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.lightbox__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
  margin: 0;
}

.lightbox__location {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.lightbox__controls-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.lightbox__counter {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
}

.lightbox__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Lightbox Main Image Area */
.lightbox__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  padding: 0 4rem;
}

.lightbox__image-wrapper {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__image {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  display: block;
}

.lightbox__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Navigation Arrows */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  cursor: pointer;
  transition: background var(--transition-fast);
  z-index: 2;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: 0.5rem;
}

.lightbox__nav--next {
  right: 0.5rem;
}

/* Thumbnail Strip */
.lightbox__thumbnails {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  overflow-x: auto;
  flex-shrink: 0;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.lightbox__thumbnails::-webkit-scrollbar {
  height: 4px;
}

.lightbox__thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.lightbox__thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.lightbox__thumb {
  flex-shrink: 0;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  opacity: 0.5;
  transition: all var(--transition-fast);
  overflow: hidden;
}

.lightbox__thumb:hover {
  opacity: 0.8;
}

.lightbox__thumb.active {
  opacity: 1;
  border-color: var(--gold);
}

.lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

@media (max-width: 768px) {
  .gallery__filters {
    gap: 0.375rem;
  }

  .gallery__filter {
    padding: 0.625rem 1rem;
    font-size: 0.75rem;
  }

  .gallery__projects {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .gallery__notice-content {
    flex-direction: column;
    gap: 1rem;
  }

  .gallery-cta__buttons {
    flex-direction: column;
  }

  .gallery-cta__buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* Lightbox mobile */
  .lightbox__header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .lightbox__project-info {
    flex-direction: column;
    gap: 0.25rem;
  }

  .lightbox__title {
    font-size: 1rem;
  }

  .lightbox__main {
    padding: 0 3rem;
  }

  .lightbox__image {
    max-height: calc(100vh - 240px);
  }

  .lightbox__nav {
    width: 36px;
    height: 36px;
  }

  .lightbox__nav svg {
    width: 20px;
    height: 20px;
  }

  .lightbox__thumbnails {
    padding: 0.75rem 1rem;
    justify-content: flex-start;
  }

  .lightbox__thumb {
    width: 48px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .lightbox__main {
    padding: 0 2.5rem;
  }
}