/* ============================================================
   FOVERO — projects.css
   Page-specific styles for projects.html gallery page
   ============================================================ */


/* ============================================================
   PROJECTS HERO (smaller, 50vh)
   ============================================================ */
.projects-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  background-color: var(--color-dark);
  overflow: hidden;
  padding-top: var(--nav-height);
  padding-bottom: var(--space-12);
}

.projects-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(35, 31, 32, 0.6) 0%,
    rgba(35, 31, 32, 0.8) 100%
  );
  z-index: 1;
}

.projects-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 2;
  pointer-events: none;
}

.projects-hero-content {
  position: relative;
  z-index: 3;
}

.projects-hero-breadcrumb {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.projects-hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.projects-hero-breadcrumb a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.projects-hero-breadcrumb span {
  margin: 0 var(--space-2);
  color: rgba(255, 255, 255, 0.25);
}

.projects-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 300;
  color: var(--color-white);
  line-height: 1.05;
  letter-spacing: -0.02em;
}


/* ============================================================
   PROJECTS GALLERY GRID
   ============================================================ */
.projects-gallery-section {
  padding-block: var(--space-16);
  background-color: var(--color-cream);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

/* Each gallery cell */
.gallery-cell {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #2d2829 0%, #1a1718 50%, #2d2829 100%);
}

.gallery-cell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.65s ease;
  display: block;
}

.gallery-cell:hover img {
  transform: scale(1.05);
}

/* Hover overlay — hidden; zoom handled on img */
.gallery-overlay {
  display: none;
}

/* Always show subtle gradient at bottom */
.gallery-cell::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(to top, rgba(35, 31, 32, 0.45) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.gallery-project-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-white);
  line-height: 1.2;
  position: relative;
  z-index: 3;
}

.gallery-project-location {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 3;
}


/* ============================================================
   PROJECTS PAGE CTA SECTION
   ============================================================ */
.projects-page-cta {
  padding-block: var(--space-16);
  background-color: var(--color-dark);
  text-align: center;
}

.projects-page-cta .section-tag {
  color: rgba(237, 27, 36, 0.85);
  display: block;
  margin-bottom: var(--space-4);
}

.projects-page-cta h2 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 300;
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.projects-page-cta p {
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.55);
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}


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


/* ============================================================
   RESPONSIVE — MOBILE (768px)
   ============================================================ */
@media (max-width: 768px) {
  .projects-hero {
    min-height: 40vh;
    padding-bottom: var(--space-8);
  }

  .projects-hero h1 {
    font-size: var(--text-3xl);
  }

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

  .gallery-cell {
    aspect-ratio: 1;
  }

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

  /* gallery-overlay is hidden site-wide */
}


/* ============================================================
   RESPONSIVE — SMALL (480px)
   ============================================================ */
@media (max-width: 480px) {
  /* 3-column grid maintained from 768px breakpoint */
}


/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.lb-close:hover { opacity: 1; }
.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
  padding: 8px 16px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
}
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-prev:hover, .lb-next:hover { opacity: 1; background: rgba(255,255,255,0.2); }
.lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  font-family: 'Inter', sans-serif;
}
@media (max-width: 480px) {
  .lb-prev, .lb-next { font-size: 2rem; padding: 6px 12px; }
}
