/* ─── PROJECT PAGE STYLES ─── */

.proyecto-hero {
  height: 80vh; min-height: 500px;
  position: relative;
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
  padding: 5rem 4rem;
  overflow: hidden;
}

/* Video hero */
.proyecto-hero-vid { background-image: none !important; background: #080808; }
.proyecto-hero-video-wrap {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.proyecto-hero-video-wrap iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 177.78vh;  /* 16:9 */
  height: 56.25vw;
  min-width: 100%; min-height: 100%;
  border: none; pointer-events: none;
}
.proyecto-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,.95) 0%, rgba(8,8,8,.4) 50%, rgba(8,8,8,.2) 100%);
}
.proyecto-hero-content {
  position: relative; z-index: 1;
}
.proyecto-cat {
  font-family: var(--sans); font-size: .68rem; font-weight: 500;
  letter-spacing: .3em; text-transform: uppercase; color: var(--gold);
  display: block; margin-bottom: 1rem;
}
.proyecto-title {
  font-family: var(--serif); font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300; line-height: 1; color: var(--text); margin-bottom: .8rem;
}
.proyecto-title em { font-style: italic; color: var(--gold); }
.proyecto-year {
  font-family: var(--sans); font-size: .8rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
}

.proyecto-body {
  padding: 5rem 4rem 8rem;
  max-width: 1400px; margin: 0 auto;
}
.proyecto-back { margin-bottom: 3rem; }

.proyecto-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem;
  margin-bottom: 5rem; padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}
.proyecto-subtitle {
  font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300; color: var(--text); margin-bottom: 1.2rem; line-height: 1.2;
}
.proyecto-desc p {
  font-size: .92rem; color: var(--muted); line-height: 1.9;
  margin-bottom: 1.2rem;
}
.proyecto-desc p:last-child { margin-bottom: 0; }

.credits-list {
  list-style: none; display: flex; flex-direction: column; margin-top: 1.5rem;
}
.credits-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .75rem 0; border-bottom: 1px solid rgba(201,168,76,.08);
  gap: 1rem;
}
.credits-list li:last-child { border-bottom: none; }
.credits-list li span:first-child {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  flex-shrink: 0;
}
.credits-list li span:last-child {
  font-family: var(--serif); font-size: 1rem; color: var(--text); text-align: right;
}

.proyecto-gallery { margin-bottom: 5rem; }
.proyecto-gallery .section-label { margin-bottom: 1.5rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3px;
}
.gallery-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  cursor: none; display: block;
  filter: brightness(.88) saturate(.85);
  transition: transform .5s cubic-bezier(.25,.46,.45,.94), filter .5s;
}
.gallery-img:hover { transform: scale(1.02); filter: brightness(1) saturate(1); }

/* wide first image */
.gallery-grid .gallery-img:first-child {
  grid-column: span 2;
}

.proyecto-video {
  margin-bottom: 5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}
.proyecto-video .section-label { margin-bottom: 1.5rem; }
.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
}
.video-embed iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: none;
}

.proyecto-nav {
  display: flex; gap: 1rem; flex-wrap: wrap; padding-top: 3rem;
  border-top: 1px solid var(--border);
}

/* ─── LIGHTBOX proyecto pages ─── */
#lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.97);
  display: none; align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox-img { max-width: 90vw; max-height: 88vh; object-fit: contain; user-select: none; transition: opacity .18s; }
#lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  font-size: 2rem; color: var(--muted);
  background: none; border: none; cursor: none;
  transition: color .2s; z-index: 1; line-height: 1;
}
#lightbox-close:hover { color: var(--gold); }
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  border: 1px solid rgba(201,168,76,.4);
  background: rgba(8,8,8,.6);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 1.2rem;
  cursor: none; transition: border-color .2s, background .2s; z-index: 1;
}
.lb-arrow:hover { border-color: var(--gold); background: rgba(201,168,76,.1); }
#lb-prev { left: 1.5rem; }
#lb-next { right: 1.5rem; }
#lb-counter {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}

@media (max-width: 900px) {
  .proyecto-hero { padding: 4rem 1.8rem; height: 60vh; }
  .proyecto-body { padding: 3rem 1.8rem 5rem; }
  .proyecto-info { grid-template-columns: 1fr; gap: 3rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .gallery-grid .gallery-img:first-child { grid-column: span 1; }
}
