/* ==========================================================================
   DIMURA ARCHITECTURE - PROJECT DETAIL PAGE STYLES
   Foster + Partners Aesthetic: Editorial Layout, Data Grid & Image Gallery
   File: css/project.css (Under 700 lines)
   ========================================================================== */

/* Main Wrapper */
.proj-page-main {
  padding-top: calc(var(--header-height) + 28px);
  padding-bottom: clamp(60px, 6vw, 100px);
  background-color: var(--bg-primary);
  min-height: 80vh;
}

/* Breadcrumb */
.proj-breadcrumb-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: clamp(24px, 2.5vw, 36px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.proj-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fp-pure-black);
  text-decoration: none;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.proj-back-btn:hover {
  transform: translateX(-4px);
  color: var(--fp-grey-base);
}

.proj-breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.proj-breadcrumb-trail a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.proj-breadcrumb-trail a:hover {
  color: var(--fp-pure-black);
}

.proj-breadcrumb-trail strong {
  color: var(--fp-pure-black);
  font-weight: 600;
}

/* Project Hero Header */
.proj-hero-header {
  margin-bottom: clamp(28px, 3vw, 44px);
}

.proj-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.proj-category-pill {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fp-pure-black);
  background-color: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

.proj-dot {
  color: var(--text-muted);
}

.proj-year-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.proj-main-title {
  font-size: clamp(2rem, 3.8vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--fp-pure-black);
  margin-bottom: 14px;
}

.proj-location-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--fp-grey-1);
}

/* Architectural Metrics Strip */
.proj-metrics-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background-color: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: clamp(32px, 3.5vw, 56px);
}

.proj-metric-item {
  background-color: var(--bg-surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proj-metric-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.proj-metric-val {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fp-pure-black);
  line-height: 1.35;
}

/* Cover Image Wrap */
.proj-cover-wrap {
  width: 100%;
  height: clamp(360px, 45vw, 680px);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-secondary);
  margin-bottom: clamp(44px, 4.5vw, 72px);
  box-shadow: var(--shadow-md);
}

.proj-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Two-Column Editorial Layout */
.proj-editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: clamp(40px, 5vw, 84px);
  margin-bottom: clamp(60px, 6vw, 100px);
}

.proj-section-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fp-grey-1);
  margin-bottom: 12px;
}

.proj-lead-paragraph {
  font-size: clamp(1.1rem, 1.35vw, 1.35rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--fp-pure-black);
  margin-bottom: 24px;
}

.proj-story-content {
  font-size: clamp(0.95rem, 1.05vw, 1.05rem);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.proj-story-content p {
  margin-bottom: 16px;
}

.proj-scope-box {
  background-color: var(--bg-secondary);
  border-left: 3px solid var(--fp-pure-black);
  padding: 20px 24px;
  border-radius: var(--radius-xs);
}

.proj-scope-box h4 {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fp-pure-black);
  margin-bottom: 6px;
}

.proj-scope-box p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* Aside Cards */
.proj-aside-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.proj-spec-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 24px;
}

.proj-aside-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fp-pure-black);
  margin-bottom: 12px;
}

.proj-materials-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.proj-inquiry-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 28px 24px;
}

.proj-inquiry-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--fp-pure-black);
  margin-bottom: 8px;
}

.proj-inquiry-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Multiple Gallery Photos Section */
.proj-gallery-section {
  padding-top: clamp(40px, 4vw, 64px);
  border-top: 1px solid var(--border-subtle);
  margin-bottom: clamp(60px, 6vw, 100px);
}

.proj-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.proj-gallery-heading {
  font-size: clamp(1.6rem, 2.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fp-pure-black);
}

.proj-gallery-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Asymmetrical Architectural Gallery Grid */
.proj-gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 1.8vw, 28px);
}

.proj-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: var(--bg-secondary);
  cursor: pointer;
}

.proj-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.proj-gallery-item:hover img {
  transform: scale(1.04);
}

.proj-gallery-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
  color: #FFFFFF;
}

.proj-gallery-item:hover .proj-gallery-overlay {
  opacity: 1;
}

/* Asymmetrical layouts for 12-column grid */
.proj-gallery-span-12 { grid-column: span 12; height: clamp(340px, 35vw, 540px); }
.proj-gallery-span-8  { grid-column: span 8;  height: clamp(280px, 28vw, 420px); }
.proj-gallery-span-6  { grid-column: span 6;  height: clamp(260px, 25vw, 380px); }
.proj-gallery-span-4  { grid-column: span 4;  height: clamp(240px, 24vw, 360px); }

/* Related Projects Section */
.proj-related-section {
  padding-top: clamp(40px, 4vw, 64px);
  border-top: 1px solid var(--border-subtle);
}

.proj-related-heading {
  font-size: clamp(1.6rem, 2.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fp-pure-black);
}

/* Lightbox Modal with Full-Res Original & Interactive Pan/Zoom */
.proj-lightbox {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(8, 9, 11, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
}

.proj-lightbox.open {
  opacity: 1;
  visibility: visible;
}

/* Floating Top Toolbar */
.lightbox-toolbar { position: absolute; top: 18px; left: 20px; right: 20px; z-index: 100000; display: flex; flex-direction: row; justify-content: space-between; align-items: center; pointer-events: none; }
.lightbox-toolbar-left, .lightbox-toolbar-right { display: flex; flex-direction: row; align-items: center; gap: 12px; pointer-events: auto; }

/* Original Resolution Button (RAW) */
.lightbox-hd-btn { display: inline-flex; align-items: center; gap: 8px; background: rgba(22, 25, 31, 0.88); border: 1px solid rgba(255, 255, 255, 0.18); color: #FFFFFF; padding: 8px 16px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; transition: all 0.2s ease; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
.lightbox-hd-btn:hover { background: rgba(36, 42, 52, 0.95); border-color: rgba(255, 255, 255, 0.35); transform: translateY(-1px); }
.lightbox-hd-btn.active { background: rgba(184, 134, 11, 0.28); border-color: rgba(212, 175, 55, 0.7); color: #F8E7B2; }
.hd-badge { font-size: 0.6875rem; font-weight: 800; padding: 2px 7px; border-radius: 4px; background: #C49B66; color: #121212; letter-spacing: 0.05em; line-height: 1.2; }
.lightbox-hd-btn.active .hd-badge { background: #D4AF37; color: #0E0E0E; }
.hd-label { display: inline-block; }
.hd-spinner { width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #FFFFFF; border-radius: 50%; animation: hdSpin 0.7s linear infinite; }
@keyframes hdSpin { to { transform: rotate(360deg); } }
.lightbox-res-info { font-size: 0.75rem; color: rgba(255, 255, 255, 0.6); letter-spacing: 0.04em; padding: 6px 12px; background: rgba(0, 0, 0, 0.45); border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(8px); }

/* Zoom Controls */
.lightbox-zoom-controls { display: inline-flex; flex-direction: row; align-items: center; background: rgba(22, 25, 31, 0.88); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 3px 8px; gap: 2px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
.lightbox-tool-btn { background: transparent; border: none; color: #FFFFFF; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.18s ease, transform 0.18s ease; }
.lightbox-tool-btn:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.08); }
.lightbox-zoom-level { font-size: 0.75rem; font-weight: 700; color: rgba(255, 255, 255, 0.95); padding: 0 8px; min-width: 48px; text-align: center; }
.lightbox-close-btn { background: rgba(22, 25, 31, 0.88); border: 1px solid rgba(255, 255, 255, 0.18); color: #FFFFFF; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(10px); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); transition: all 0.2s ease; }
.lightbox-close-btn:hover { background: rgba(220, 38, 38, 0.85); border-color: rgba(220, 38, 38, 0.9); transform: scale(1.06); }

/* Viewport & Pannable Stage */
.lightbox-viewport { position: absolute; inset: 0; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; z-index: 99990; }
.lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; transform-origin: center center; transition: transform 0.05s linear; will-change: transform; }
.lightbox-stage.smooth-transition { transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.lightbox-stage.grab-cursor { cursor: grab; }
.lightbox-stage.grabbing-cursor { cursor: grabbing !important; }
.lightbox-stage img { max-width: 88vw; max-height: 82vh; width: auto; height: auto; object-fit: contain; border-radius: var(--radius-sm, 8px); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75); pointer-events: none; display: block; }

/* Navigation & Hints */
.lightbox-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(22, 25, 31, 0.75); border: 1px solid rgba(255, 255, 255, 0.18); color: #FFFFFF; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 100000; transition: all 0.2s ease; backdrop-filter: blur(8px); }
.lightbox-nav-btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) scale(1.08); }
.lightbox-nav-prev { left: 24px; }
.lightbox-nav-next { right: 24px; }
.lightbox-hint { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: rgba(255, 255, 255, 0.6); background: rgba(14, 16, 20, 0.8); padding: 6px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(10px); pointer-events: none; z-index: 100000; text-align: center; white-space: nowrap; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); }

@media (max-width: 768px) {
  .lightbox-toolbar { top: 12px; left: 12px; right: 12px; flex-wrap: wrap; gap: 8px; }
  .lightbox-res-info, .lightbox-hint { display: none; }
  .lightbox-hd-btn { padding: 6px 12px; font-size: 0.75rem; }
  .lightbox-nav-prev { left: 10px; width: 40px; height: 40px; }
  .lightbox-nav-next { right: 10px; width: 40px; height: 40px; }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .proj-metrics-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .proj-editorial-grid {
    grid-template-columns: 1fr;
  }
  .proj-gallery-span-8,
  .proj-gallery-span-4,
  .proj-gallery-span-6 {
    grid-column: span 6;
    height: clamp(240px, 30vw, 360px);
  }
}

@media (max-width: 640px) {
  .proj-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .proj-gallery-grid {
    grid-template-columns: 1fr;
  }
  .proj-gallery-span-12,
  .proj-gallery-span-8,
  .proj-gallery-span-6,
  .proj-gallery-span-4 {
    grid-column: span 1;
    height: 240px;
  }
  .proj-breadcrumb-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}
