/* ============================================================
   PROJECT DETAIL PAGES — Supplemental styles
   ============================================================ */

/* ── Project Hero ── */
.project-hero {
  position: relative;
  height: 65vh;
  min-height: 440px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
}

.project-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,27,42,0.88) 0%,
    rgba(13,27,42,0.3) 50%,
    rgba(13,27,42,0.1) 100%
  );
}

.project-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 52px;
}

.project-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}

.project-breadcrumb a {
  color: rgba(255,255,255,0.6);
  transition: color 0.25s;
}

.project-breadcrumb a:hover { color: var(--wood-pale); }

.project-breadcrumb-sep { opacity: 0.4; }

.project-hero-category {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wood-pale);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.project-hero-category::before {
  content: '';
  display: block;
  width: 28px;
  height: 1.5px;
  background: var(--wood-pale);
}

.project-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 12px;
}

.project-hero-meta {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.65);
}

/* ── Gallery section ── */
.project-gallery-section {
  background: var(--navy);
  padding: 4px 0 0;
}

.project-gallery-container {
  max-width: 1440px;
  margin: 0 auto;
}

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

/* ── Gallery item ── */
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--navy-light);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.05);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,27,42,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  color: rgba(255,255,255,0);
}

.gallery-item:hover .gallery-item-overlay,
.gallery-item:focus-visible .gallery-item-overlay {
  background: rgba(13,27,42,0.45);
  color: rgba(255,255,255,0.9);
}

.gallery-item-overlay svg {
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.gallery-item:hover .gallery-item-overlay svg,
.gallery-item:focus-visible .gallery-item-overlay svg {
  opacity: 1;
  transform: scale(1);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--wood-light);
  outline-offset: -3px;
  z-index: 1;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  z-index: 2;
}

.lb-close:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
  transform: scale(1.08);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  z-index: 2;
}

.lb-nav:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
}

.lb-prev {
  left: 20px;
}

.lb-next {
  right: 20px;
}

.lb-prev:hover { transform: translateY(-50%) translateX(-2px); }
.lb-next:hover { transform: translateY(-50%) translateX(2px); }

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

.lb-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 4px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.lb-img.is-transitioning {
  opacity: 0;
}

.lb-footer {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
}

.lb-counter {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  background: rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}

/* ── Project body (description + sidebar) ── */
.project-body {
  background: var(--cream-light);
}

.project-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px 100px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 64px;
  align-items: start;
}

/* ── Project description ── */
.project-description h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.25;
}

.project-description p {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Sidebar ── */
.project-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.project-specs {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
  margin-bottom: 20px;
}

.project-specs h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #EDE7DD;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F0EBE3;
}

.spec-row:last-child { border-bottom: none; }

.spec-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
}

.spec-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
  text-align: right;
}

.project-cta-box {
  background: var(--navy);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
}

.project-cta-box h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}

.project-cta-box p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 24px;
  line-height: 1.6;
}

.project-cta-box .btn-primary { width: 100%; justify-content: center; }

/* ── Related projects ── */
.project-related {
  padding: 72px 0 100px;
  background: var(--white);
}

.project-related .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.project-related .projects-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .project-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 960px) {
  .project-container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 24px 72px;
  }
  .project-sidebar { position: static; }
  .project-related .projects-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .project-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lightbox {
    padding: 52px 16px 48px;
  }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-nav { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .project-hero { height: 55vh; }
  .project-hero-content { padding: 0 24px 40px; }
  .project-gallery-grid { grid-template-columns: 1fr; }
  .project-related .projects-grid { grid-template-columns: 1fr; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gallery-item img,
  .gallery-item-overlay,
  .gallery-item-overlay svg,
  .lightbox,
  .lb-img { transition: none; }
}
