/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 24, 0.94);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}
.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: min(1200px, 90vw);
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,0.2); }

.lightbox__close { top: var(--space-6); right: var(--space-6); }
.lightbox__nav--prev { left: var(--space-6); top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: var(--space-6); top: 50%; transform: translateY(-50%); }

.lightbox__count {
  position: absolute;
  bottom: var(--space-6);
  left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
}

/* === TM TOWER DETAIL — specific === */
.project-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--color-text-inverse);
  isolation: isolate;
  padding-block: var(--space-32) var(--space-16);
}
.project-hero__media { position: absolute; inset: 0; z-index: -2; }
.project-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.project-hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(10,18,24,0.85) 0%, rgba(10,18,24,0.2) 45%, rgba(10,18,24,0.0) 75%, rgba(10,18,24,0.4) 100%);
}

.project-hero__meta {
  display: flex; gap: var(--space-6);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.project-hero__title {
  font-size: var(--text-hero);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.98;
  color: var(--color-text-inverse);
}
.project-hero__title em { font-style: italic; color: var(--color-accent); font-weight: 400; }

.project-hero__lead {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  max-width: 56ch;
  line-height: 1.5;
  margin-block: var(--space-6) var(--space-10);
}

/* Spec grid for project detail */
.project-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}
.project-spec {
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-right: 1px solid var(--color-divider);
}
.project-spec:last-child { border-right: none; }

.project-spec__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}
.project-spec__value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.project-spec__value em { font-style: italic; color: var(--color-primary); }

/* Two-column detail layout */
.detail-section {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: start;
}

.detail-section.reverse {
  grid-template-columns: 1.2fr 1fr;
}

.detail-section__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
}
.detail-section__media img { width: 100%; height: 100%; object-fit: cover; }

.detail-section__content h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-5);
  max-width: 18ch;
}
.detail-section__content p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  max-width: 56ch;
}

.detail-section__content ul {
  display: flex; flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.detail-section__content li {
  display: flex; align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.detail-section__content li::before {
  content: "";
  flex-shrink: 0;
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  margin-top: 9px;
}

/* Units table */
.units-table {
  width: 100%;
  border-collapse: collapse;
}
.units-table thead th {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  text-align: left;
  padding: var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-weight: 500;
}
.units-table tbody td {
  padding: var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
  font-size: var(--text-base);
}
.units-table tbody tr:hover { background: var(--color-surface-2); }

.units-table .price {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

/* Gallery grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-3);
}
.gallery > * {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.gallery > *:nth-child(1) { grid-column: span 8; aspect-ratio: 16/10; }
.gallery > *:nth-child(2) { grid-column: span 4; }
.gallery > *:nth-child(3) { grid-column: span 4; }
.gallery > *:nth-child(4) { grid-column: span 4; }
.gallery > *:nth-child(5) { grid-column: span 4; }
.gallery > *:nth-child(6) { grid-column: span 6; }
.gallery > *:nth-child(7) { grid-column: span 6; }
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.gallery > *:hover img { transform: scale(1.04); }

@media (max-width: 1024px) {
  .project-specs { grid-template-columns: repeat(2, 1fr); }
  .project-spec { border-right: none; border-bottom: 1px solid var(--color-divider); }
  .project-spec:nth-child(odd) { border-right: 1px solid var(--color-divider); }
  .project-spec:nth-last-child(-n+2) { border-bottom: none; }
  .detail-section, .detail-section.reverse { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .project-specs { grid-template-columns: 1fr; }
  .project-spec { border-right: none !important; border-bottom: 1px solid var(--color-divider); }
  .project-spec:last-child { border-bottom: none; }
  .gallery { grid-template-columns: 1fr; }
  .gallery > * { grid-column: span 1 !important; aspect-ratio: 4/3 !important; }
  .units-table { font-size: var(--text-sm); }
  .units-table thead { display: none; }
  .units-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-divider);
    gap: var(--space-2);
  }
  .units-table tbody td {
    padding: 0;
    border-bottom: none;
  }
  .units-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
  }
}
