/* ─────────────────────────────────────────────
   Estilos compartidos de las páginas de proyecto
   (se cargan después de styles.css)
   ───────────────────────────────────────────── */

/* Barra superior de las páginas de proyecto */

.pnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 233, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.pnav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pnav__back {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.pnav__back:hover { color: var(--accent); }

.pnav__brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
}

.pnav__brand span { color: var(--accent); }

/* Cabecera del proyecto */

.phero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 32px 48px;
}

.phero__number {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1;
  color: var(--accent-pale);
}

.phero__category {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 16px 0 10px;
}

.phero__title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(38px, 5.5vw, 56px);
  line-height: 1.1;
}

.phero__lead {
  margin: 0;
  max-width: 720px;
  font-size: 16.5px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* Secciones */

.psection {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 32px;
}

.psection--full { max-width: none; padding-left: 0; padding-right: 0; }

.psection__title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
}

.psection__note {
  margin: 0 0 32px;
  max-width: 680px;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-soft);
}

.psection__hint {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Galerías de láminas / fotos */

.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.pcard {
  background: #fff;
  border: 1px solid var(--border);
  padding: 14px;
}

.pcard img { width: 100%; height: auto; }

.pcard figcaption,
.pcard__caption {
  margin-top: 12px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.pcard--photo { padding: 0; border: none; background: none; }

.pcard--photo img {
  aspect-ratio: 4 / 4.7;
  object-fit: cover;
}

figure.pcard { margin: 0; }

/* Lightbox compartido (js/lightbox.js) */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(33, 29, 36, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Pie común */

.pfooter {
  margin-top: 80px;
  border-top: 1px solid var(--border);
}

.pfooter__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-muted);
}

.pfooter__next {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (max-width: 640px) {
  .pnav__inner, .phero, .psection, .pfooter__inner { padding-left: 20px; padding-right: 20px; }
  .phero { padding-top: 48px; }
}
