/* Project details page — gallery viewer, spec grid, lightbox. */

body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--text); }

/* ── GALLERY VIEWER ── */
.gallery-viewer {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  height: 560px;
}

/* Thumbnail column */
.thumb-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-right: 2px;
}
.thumb-col::-webkit-scrollbar { width: 3px; }
.thumb-col::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* Horizontal thumb row (mobile) */
.thumb-col.horizontal {
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  padding-right: 0;
  padding-bottom: 2px;
}
.thumb-col.horizontal::-webkit-scrollbar { height: 3px; width: auto; }

.thumb-item {
  width: 96px;
  height: 72px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  transition: border-color 0.25s, transform 0.2s;
}
.thumb-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s, filter 0.3s;
  filter: brightness(0.72) saturate(0.8);
}
.thumb-item:hover img { filter: brightness(0.9) saturate(1); transform: scale(1.06); }
.thumb-item.active { border-color: var(--gold); }
.thumb-item.active img { filter: brightness(1) saturate(1.05); }

/* active indicator — left side on vertical, bottom on horizontal */
.thumb-item.active::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; height: auto;
  background: var(--gold);
}
.thumb-col.horizontal .thumb-item.active::after {
  left: 0; right: 0; top: auto; bottom: 0;
  width: auto; height: 3px;
}

/* thumb number badge */
.thumb-num {
  position: absolute; bottom: 5px; right: 6px;
  font-size: 0.55rem; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  font-family: 'DM Sans', sans-serif;
}

/* Main image pane */
.main-img-pane {
  position: relative;
  overflow: hidden;
  background: #000;
}
.main-img-pane img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.35s ease, transform 0.5s ease;
}
.main-img-pane img.switching { opacity: 0; transform: scale(1.03); }
/* Bottom caption bar */
.img-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(26,24,20,0.9) 0%, transparent 100%);
  padding: 28px 20px 16px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.img-caption-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem; font-weight: 300; color: #fff;
}
.img-caption-tag {
  font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-light);
}
/* nav arrows on main image */
.img-nav-btn {
  width: 38px; height: 38px;
  background: rgba(26,24,20,0.6); border: 1px solid rgba(196,151,58,0.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s;
}
.img-nav-btn:hover { background: var(--gold); }
.img-nav-btn svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; }
.img-nav-btn:hover svg { stroke: #111; }
/* counter badge */
.img-counter {
  position: absolute; top: 14px; right: 14px;
  background: rgba(26,24,20,0.65);
  padding: 4px 10px;
  font-size: 0.62rem; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.6);
  font-family: 'DM Sans', sans-serif;
}
/* expand icon */
.img-expand {
  position: absolute; top: 14px; left: 14px;
  width: 32px; height: 32px;
  background: rgba(26,24,20,0.6); border: 1px solid rgba(196,151,58,0.22);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transition: opacity 0.25s;
}
.main-img-pane:hover .img-expand { opacity: 1; }
@media (hover: none) {
  .img-expand { opacity: 1 !important; }
}
.img-expand svg { width: 14px; height: 14px; stroke: var(--gold-light); fill: none; stroke-width: 1.8; }

/* ── DIVIDER ── */
.gold-divider {
  width: 48px; height: 2px;
  background: linear-gradient(to right, var(--gold), var(--gold-light));
  margin: 14px 0 20px;
}

/* ── SPEC TABLE ── */
.spec-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  margin-top: 20px;
}
.spec-cell {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}
.spec-cell:nth-child(even) { border-right: none; }
.spec-cell:last-child, .spec-cell:nth-last-child(2) { border-bottom: none; }
.spec-cell:hover { background: rgba(196,151,58,0.05); }
.spec-label {
  font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 4px;
}
.spec-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem; color: var(--dark);
}

/* ── STATUS BADGE ── */
.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(196,151,58,0.1); border: 1px solid rgba(196,151,58,0.25);
  padding: 5px 12px;
  font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease infinite;
}

/* ── CTA BUTTON ── */
.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: #111;
  padding: 13px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.25s, gap 0.25s, transform 0.2s;
}
.cta-btn:hover { background: var(--gold-light); gap: 16px; transform: translateY(-1px); }
.cta-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

.cta-btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); color: var(--muted);
  padding: 12px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.cta-btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* ── FULLSCREEN LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(26,24,20,0);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s, background 0.35s;
}
.lightbox.open { opacity: 1; pointer-events: auto; background: rgba(26,24,20,0.97); }
.lb-img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain;
  transform: scale(0.93);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), opacity 0.3s;
  opacity: 0;
}
.lightbox.open .lb-img { transform: scale(1); opacity: 1; }
.lb-close {
  position: absolute; top: 24px; right: 28px;
  width: 42px; height: 42px;
  border: 1px solid rgba(196,151,58,0.25); background: transparent;
  color: rgba(255,255,255,0.5); font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.lb-close:hover { border-color: var(--gold); color: var(--gold); }

/* ── SECTION LABEL ── */
.sec-label {
  font-size: 0.6rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); display: flex; align-items: center; gap: 10px;
}
.sec-label::before { content:''; width: 24px; height: 1px; background: var(--gold); }

/* ── FEATURE PILLS ── */
.feat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); padding: 6px 14px;
  font-size: 0.72rem; color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.feat-pill svg { width: 13px; height: 13px; stroke: var(--gold); fill: none; stroke-width: 1.5; }
.feat-pill:hover { border-color: var(--gold); color: var(--text); }

/* ════════════════════════════════════
   RESPONSIVE STYLES
════════════════════════════════════ */

/* ── Outer section padding ── */
.project-section {
  background: var(--cream);
  padding: 100px 0 80px;
}
.project-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Two-column layout ── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* ── CTA row ── */
.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ── TABLET (≤ 1024px) ── */
@media (max-width: 1024px) {
  .project-container { padding: 0 32px; }
  .project-grid { gap: 40px; }
  .gallery-viewer { height: 460px; }
}

/* ── MOBILE LANDSCAPE / TABLET PORTRAIT (≤ 768px) ── */
@media (max-width: 768px) {
  .project-section { padding: 72px 0 56px; }
  .project-container { padding: 0 20px; }

  /* Stack columns */
  .project-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  /* Gallery: shift thumbs below the main image */
  .gallery-viewer {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    height: auto;
  }
  .thumb-col {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 0;
    padding-bottom: 2px;
    order: 2;
  }
  .thumb-col::-webkit-scrollbar { height: 3px; width: auto; }
  .thumb-item {
    width: 72px;
    height: 54px;
  }
  .thumb-item.active::after {
    left: 0; right: 0; top: auto; bottom: 0;
    width: 100%; height: 3px;
  }
  .main-img-pane {
    order: 1;
    height: 320px;
  }

  /* Spec grid: single column on small screens */
  .spec-grid {
    grid-template-columns: 1fr;
  }
  .spec-cell { border-right: none; }
  .spec-cell:nth-child(even) { border-right: none; }
  .spec-cell:last-child { border-bottom: none; }
  .spec-cell:nth-last-child(2) { border-bottom: 1px solid var(--border); }

  /* CTA buttons full-width */
  .cta-row { flex-direction: column; }
  .cta-btn, .cta-btn-outline {
    width: 100%;
    justify-content: center;
  }

  /* Right column: remove top offset */
  .project-right { padding-top: 0 !important; }
}

/* ── SMALL MOBILE (≤ 480px) ── */
@media (max-width: 480px) {
  .project-section { padding: 60px 0 48px; }
  .project-container { padding: 0 16px; }

  .main-img-pane { height: 260px; }

  .img-caption-title { font-size: 0.9rem; }
  .img-caption-tag { display: none; }

  .thumb-item {
    width: 60px;
    height: 46px;
  }

  /* Feature pills: 2 per row */
  .feat-pills-row { gap: 6px; }
  .feat-pill { padding: 5px 10px; font-size: 0.68rem; }

  /* Spec grid stays single column */
  .spec-cell { padding: 12px 14px; }

  /* Breadcrumb: shorten on tiny screens */
  .breadcrumb-text { display: none; }
}

/* Gallery dot indicator */
.dot { height: 2px; cursor: pointer; transition: width 0.3s, background 0.3s; }

/* Breadcrumb / title helpers (formerly inline styles) */
.breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.breadcrumb a, .breadcrumb-text { font-size: 0.72rem; letter-spacing: 0.08em; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb-text { color: var(--gold); }
.breadcrumb-sep { color: var(--border); font-size: 0.8rem; }
.project-title {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  font-weight: 300; color: var(--dark); line-height: 1.15; letter-spacing: -0.01em;
}
.project-title em { display: block; font-style: italic; color: var(--gold); }
.project-address { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; }
.feat-pills-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.project-disclaimer { font-size: 0.68rem; color: var(--muted); margin-top: 18px; line-height: 1.7; border-left: 2px solid var(--border); padding-left: 12px; }
.thumb-count { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 0.65rem; color: var(--muted); letter-spacing: 0.1em; }
.thumb-count #activeThumbNum { color: var(--gold); font-family: 'Cormorant Garamond', serif; font-size: 1rem; }
.dot-strip { display: flex; gap: 6px; }
.img-nav { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
.caption-rule { height: 1px; width: 36px; background: var(--gold); margin: 6px 0; }
[hidden] { display: none !important; }
