/* ============================================================
   Página de un proyecto del portafolio

   Reconstruye la maqueta que antes se publicaba como imagen: portada,
   franja de cifras, "sobre el proyecto", evaluación MIEMFP, componentes,
   cierre y acceso a otros proyectos. Usa las variables del sitio.
   ============================================================ */

.pp {
  --pp-navy: #0b2545;
  --pp-blue: #1c4e8a;
  --pp-amber: #f4c20d;
  --pp-borde: #e3e9f2;
  --pp-suave: #f4f7fb;
  --pp-texto: #33415c;
  background: #fff;
}

.pp section {
  width: min(calc(100% - 40px), 1400px);
  margin-inline: auto;
}

.pp-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pp-blue);
}

.pp-eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  background: var(--pp-amber);
}

/* ---------- Ruta ---------- */

.pp-ruta {
  width: min(calc(100% - 40px), 1400px);
  margin: 14px auto;
  font-size: 12.5px;
  color: var(--pp-texto);
}

.pp-ruta a { color: var(--pp-blue); text-decoration: none; }
.pp-ruta a:hover { text-decoration: underline; }
.pp-ruta span { margin: 0 6px; color: #9aa8bd; }
.pp-ruta b { color: var(--pp-navy); }

/* ---------- Portada ---------- */

.pp-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.45fr);
  align-items: stretch;
  overflow: hidden;
  border-radius: 14px;
  background: var(--pp-navy);
  color: #fff;
}

.pp-hero__texto {
  grid-area: 1 / 1;
  z-index: 2;
  padding: clamp(24px, 3.4vw, 46px);
  align-self: center;
}

.pp-hero__foto {
  grid-area: 1 / 2;
  position: relative;
}

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

/* La foto se funde con el panel de texto en vez de cortarse en seco. */
.pp-hero__foto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--pp-navy) 0%, rgba(11, 37, 69, 0.74) 10%,
      rgba(11, 37, 69, 0.28) 26%, rgba(11, 37, 69, 0.06) 42%, rgba(11, 37, 69, 0) 56%);
}

.pp-hero__eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.72);
}

.pp-hero__eyebrow span {
  color: var(--pp-amber);
  font-weight: 800;
}

.pp-hero h1 {
  margin: 0 0 12px;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(1.9rem, 3.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.pp-hero__bajada {
  margin: 0 0 16px;
  max-width: 34ch;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.pp-hero__lugar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
}

.pp-hero__lugar i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pp-amber);
  box-shadow: inset 0 0 0 4px var(--pp-navy);
}

.pp-hero__resumen {
  margin: 0 0 18px;
  max-width: 44ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.76);
}

.pp-hero__codigo {
  display: inline-block;
  margin: 0;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ---------- Cifras ---------- */

.pp-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--pp-borde);
  border-radius: 12px;
  background: #fff;
}

.pp-fact {
  padding: 16px 18px;
  border-right: 1px solid var(--pp-borde);
}

.pp-fact:last-of-type { border-right: 0; }

.pp-fact__v {
  margin: 0;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--pp-navy);
}

.pp-fact__l {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--pp-texto);
}

.pp-facts__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--pp-amber);
  color: #201800;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.pp-facts__cta:hover { transform: translateY(-1px); }

/* ---------- Sobre el proyecto ---------- */

.pp-sobre {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 22px;
  margin-top: 34px;
}

.pp-sobre h2 {
  margin: 0 0 12px;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--pp-navy);
}

.pp-sobre__texto p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--pp-texto);
}

.pp-cita {
  margin: 0;
  padding: 26px 24px;
  border-radius: 12px;
  background: var(--pp-suave);
}

.pp-cita::before {
  content: "“";
  display: block;
  margin-bottom: 4px;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 44px;
  line-height: 0.6;
  color: #b9cbe4;
}

.pp-cita p {
  margin: 0;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-style: normal;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pp-blue);
}

.pp-apoyo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
}

.pp-apoyo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.pp-apoyo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 18px 14px;
  background: linear-gradient(0deg, rgba(8, 24, 45, 0.88), rgba(8, 24, 45, 0));
  color: #fff;
}

.pp-apoyo figcaption b { display: block; font-size: 14px; }
.pp-apoyo figcaption span { font-size: 12px; color: rgba(255, 255, 255, 0.8); }

/* ---------- Evaluación ---------- */

.pp-eval {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 2.4fr);
  gap: 22px;
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--pp-borde);
}

.pp-eval__intro h2 {
  margin: 0 0 10px;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pp-navy);
}

.pp-eval__intro p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--pp-texto);
}

.pp-eval__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.pp-eval__item {
  padding: 18px 16px;
  border: 1px solid var(--pp-borde);
  border-radius: 12px;
  background: var(--pp-suave);
  text-align: center;
}

/* El anillo dibuja el puntaje con un degradado cónico, sin imágenes. */
.pp-eval__ring {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: conic-gradient(var(--pp-blue) calc(var(--pp-pct) * 1%), #dfe7f2 0);
}

.pp-eval__ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #fff;
}

.pp-eval__ring b {
  grid-area: 1 / 1;
  z-index: 1;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--pp-navy);
  transform: translateX(-4px);
}

.pp-eval__ring i {
  grid-area: 1 / 1;
  z-index: 1;
  font-style: normal;
  font-size: 11px;
  color: #8c9bb3;
  transform: translate(26px, 6px);
}

.pp-eval__badge {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  padding: 8px;
  border: 3px solid var(--pp-amber);
  border-radius: 50%;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--pp-navy);
}

.pp-eval__item h3 {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--pp-navy);
}

.pp-eval__item p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--pp-texto);
}

.pp-vision {
  grid-column: 1 / -1;
  padding: 20px 22px;
  border-radius: 12px;
  background: linear-gradient(120deg, #eef4fc, #f7fbff);
}

.pp-vision h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--pp-navy);
}

.pp-vision p {
  margin: 0;
  max-width: 80ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--pp-texto);
}

/* ---------- Componentes ---------- */

.pp-comps { margin-top: 36px; }

.pp-comps__head h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--pp-texto);
}

.pp-comps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.pp-comp {
  overflow: hidden;
  border: 1px solid var(--pp-borde);
  border-radius: 12px;
  background: #fff;
}

.pp-comp img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.pp-comp h3 {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--pp-navy);
}

/* ---------- Cierre ---------- */

.pp-cierre {
  position: relative;
  margin-top: 36px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--pp-navy);
}

.pp-cierre img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.pp-cierre__texto {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(24px, 3vw, 40px);
  background: linear-gradient(90deg, rgba(8, 24, 45, 0.92) 30%, rgba(8, 24, 45, 0.45));
  color: #fff;
}

.pp-cierre .pp-eyebrow { color: rgba(255, 255, 255, 0.82); }

.pp-cierre h2 {
  margin: 0;
  max-width: 22ch;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.12;
}

.pp-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--pp-amber);
  color: #201800;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.pp-btn:hover { transform: translateY(-2px); }

/* ---------- Otros proyectos ---------- */

.pp-otros { margin: 40px auto 56px; }

.pp-otros__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.pp-otros__head h2 {
  margin: 0;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--pp-navy);
}

.pp-otros__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.pp-otro {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--pp-borde);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pp-otro:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -20px rgba(11, 37, 69, 0.6);
}

.pp-otro img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.pp-otro__sector {
  margin: 14px 16px 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pp-blue);
}

.pp-otro h3 {
  margin: 6px 16px 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--pp-navy);
}

.pp-otro p {
  margin: 4px 16px 0;
  font-size: 12.5px;
  color: var(--pp-texto);
}

.pp-otro__ir {
  margin: 12px 16px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pp-blue);
}

/* ---------- Adaptación ---------- */

@media (max-width: 1000px) {
  .pp-sobre { grid-template-columns: 1fr; }
  .pp-eval { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .pp-hero { grid-template-columns: 1fr; }
  .pp-hero__foto { grid-area: 1 / 1; }
  .pp-hero__texto { padding: 26px 22px 30px; background: linear-gradient(0deg, var(--pp-navy) 55%, rgba(11, 37, 69, 0.75)); }
  .pp-hero__foto::after { background: linear-gradient(0deg, var(--pp-navy) 6%, rgba(11, 37, 69, 0.25)); }
  .pp-fact { border-right: 0; border-bottom: 1px solid var(--pp-borde); }
  .pp-comp img { height: 140px; }
}

/* ============================================================
   Portafolio de proyectos - listado
   ============================================================ */

.pa {
  --pp-navy: #0b2545;
  --pp-blue: #1c4e8a;
  --pp-amber: #f4c20d;
  --pp-borde: #e3e9f2;
  --pp-suave: #f4f7fb;
  --pp-texto: #33415c;
  padding-bottom: 60px;
  background: #fff;
}

.pa > * {
  width: min(calc(100% - 40px), 1400px);
  margin-inline: auto;
}

/* ---------- Entrada ---------- */

.pa-intro { padding: 34px 0 22px; }

.pa-intro h1 {
  margin: 0 0 12px;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--pp-navy);
}

.pa-intro__lead {
  margin: 0 0 22px;
  max-width: 64ch;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.6;
  color: var(--pp-texto);
}

.pa-intro__cifras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0;
  border: 1px solid var(--pp-borde);
  border-radius: 12px;
  overflow: hidden;
}

.pa-intro__cifras article {
  padding: 16px 18px;
  border-right: 1px solid var(--pp-borde);
}

.pa-intro__cifras article:last-child { border-right: 0; }

.pa-intro__cifras b {
  display: block;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--pp-navy);
}

.pa-intro__cifras span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--pp-texto);
}

.pa-intro__fuente {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #7c8aa3;
}

.pa-intro__fuente b { color: var(--pp-texto); }

/* ---------- Filtros ---------- */

.pa-filtros {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--pp-borde);
}

.pa-filtro { display: flex; flex-direction: column; gap: 5px; }
.pa-filtro--buscar { flex: 1 1 260px; }

.pa-filtro label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pp-blue);
}

.pa-filtro input,
.pa-filtro select {
  padding: 9px 12px;
  border: 1px solid var(--pp-borde);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--pp-navy);
}

.pa-filtro input:focus,
.pa-filtro select:focus {
  outline: none;
  border-color: var(--pp-blue);
  box-shadow: 0 0 0 3px rgba(28, 78, 138, 0.14);
}

.pa-filtros__estado {
  margin: 0 0 8px auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pp-texto);
}

.pa-filtros__limpiar {
  margin-bottom: 8px;
  padding: 8px 14px;
  border: 1px solid var(--pp-borde);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--pp-blue);
  cursor: pointer;
}

.pa-filtros__limpiar:hover { border-color: var(--pp-blue); }

/* ---------- Rejilla ---------- */

.pa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.pa-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--pp-borde);
  border-radius: 14px;
  background: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pa-card[hidden] { display: none; }

.pa-card:hover {
  transform: translateY(-3px);
  border-color: #cfdcee;
  box-shadow: 0 18px 38px -22px rgba(11, 37, 69, 0.65);
}

.pa-card__foto { display: block; }

.pa-card__foto img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.pa-card__cuerpo {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.pa-card__sector {
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pp-blue);
}

.pa-card h3 {
  margin: 0 0 6px;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--pp-navy);
}

.pa-card h3 a {
  color: inherit;
  text-decoration: none;
}

/* El enlace del título cubre la tarjeta: toda la tarjeta es clicable. */
.pa-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.pa-card { position: relative; }

.pa-card h3 a:hover { color: var(--pp-blue); }

.pa-card__lugar {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--pp-texto);
}

.pa-card__lugar span { color: #93a2b8; }

.pa-card__datos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--pp-borde);
}

.pa-card__datos b {
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--pp-navy);
}

.pa-card__datos span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--pp-texto);
}

/* ---------- Sin resultados y cierre ---------- */

.pa-vacio {
  margin: 30px auto;
  padding: 26px;
  border: 1px dashed var(--pp-borde);
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--pp-texto);
}

.pa-vacio button {
  margin-left: 8px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--pp-blue);
  text-decoration: underline;
  cursor: pointer;
}

.pa-cierre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 46px;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 14px;
  background: var(--pp-suave);
}

.pa-cierre h2 {
  margin: 0;
  max-width: 44ch;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--pp-navy);
}

@media (max-width: 700px) {
  .pa-filtros { position: static; }
  .pa-filtro { flex: 1 1 100%; }
  .pa-filtros__estado { margin-left: 0; }
  .pa-intro__cifras article { border-right: 0; border-bottom: 1px solid var(--pp-borde); }
}

/* ---------- Listado: misma escala y materiales que la ficha ---------- */

.pa-hero { margin-top: 20px; }
.pa-hero .pp-hero__bajada { max-width: 40ch; }
.pa-facts { margin-bottom: 26px; }

.pa-filtros {
  border: 1px solid var(--pp-borde);
  border-radius: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.96);
}

.pa-card__foto img { height: 190px; }

.pa-card h3 { font-size: 1.12rem; }

.pa-card__sector { letter-spacing: 0.1em; }

.pa-card__datos b { font-size: 13.5px; }

.pa-fuente {
  margin: 30px 0 10px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #7c8aa3;
}

.pa-fuente b { color: var(--pp-texto); }

.pa-cierre {
  background: linear-gradient(120deg, #eef4fc, #f7fbff);
  border: 1px solid var(--pp-borde);
}

/* ---------- Cabecera compartida ---------- */

/* La cabecera del sitio es fija: el contenido arranca por debajo. */
.pp-ruta,
.pa-hero {
  margin-top: clamp(86px, 9vh, 104px);
}

.pp-hero { position: relative; }

/* Lema manuscrito de la ficha, arriba a la derecha de la portada. */
.pp-hero__lema {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 22px;
  max-width: 220px;
  margin: 0;
  font-family: var(--pc-display, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  font-style: italic;
  line-height: 1.2;
  text-align: right;
  color: #fff;
  text-shadow: 0 2px 14px rgba(8, 24, 45, 0.75);
}

@media (max-width: 760px) {
  .pp-hero__lema {
    position: static;
    max-width: none;
    margin: 0 22px 18px;
    text-align: left;
    color: rgba(255, 255, 255, 0.86);
  }
}

/* Los selectores no deben crecer con el texto de sus opciones. */
.pa-filtro { min-width: 0; }

.pa-filtro input,
.pa-filtro select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* ---------- Portada de lado a lado ---------- */

/* La portada rompe el contenedor y ocupa todo el ancho de la ventana; su
   texto se alinea con el resto de la página. `clip` evita que el ancho de
   la barra de desplazamiento provoque desplazamiento horizontal. */
.pp,
.pa {
  overflow-x: clip;
}

.pp section.pp-hero,
.pa section.pp-hero {
  width: auto;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  border-radius: 0;
}

.pp-hero__texto {
  padding-left: max(20px, calc((100vw - 1400px) / 2));
  padding-right: clamp(24px, 3vw, 40px);
}

.pp-hero__lema {
  right: max(20px, calc((100vw - 1400px) / 2));
}

@media (max-width: 760px) {
  .pp-hero__texto { padding-left: 22px; padding-right: 22px; }
}

/* ---------- Proporciones de la ficha ---------- */

/* La portada de la ficha es una banda alta; la franja de cifras corre de lado
   a lado bajo ella, con el contenido alineado a la retícula de la página. */
.pp section.pp-hero,
.pa section.pp-hero {
  min-height: clamp(250px, 19vw, 330px);
}

.pp section.pp-facts,
.pa section.pp-facts {
  width: auto;
  max-width: none;
  margin-inline: calc(50% - 50vw);
  margin-top: 0;
  padding-inline: max(20px, calc((100vw - 1400px) / 2));
  border-inline: 0;
  border-radius: 0;
  border-top: 0;
}

.pp-facts__cta { margin-right: 0; }

@media (max-width: 760px) {
  .pp section.pp-hero,
  .pa section.pp-hero {
    min-height: 0;
  }
}

/* ---------- La foto cruza toda la portada ---------- */

/* Antes la mitad izquierda era un bloque azul sólido. Ahora la fotografía
   ocupa la banda completa y el azul es solo un velo que decae hacia la
   derecha: sostiene la lectura del texto sin tapar la imagen. */
.pp-hero__foto {
  grid-area: 1 / 1 / 2 / -1;
}

.pp-hero__foto::after {
  background: linear-gradient(90deg, rgba(8, 26, 50, 0.9) 0%, rgba(8, 26, 50, 0.72) 26%,
      rgba(8, 26, 50, 0.34) 44%, rgba(8, 26, 50, 0.1) 60%, rgba(8, 26, 50, 0) 74%);
}

@media (max-width: 760px) {
  .pp-hero__foto::after {
    background: linear-gradient(0deg, rgba(8, 26, 50, 0.94) 42%, rgba(8, 26, 50, 0.55) 70%, rgba(8, 26, 50, 0.3));
  }
}

/* ---------- Portada: el texto no debe estirar la banda ---------- */

/* La foto recortada de la ficha es muy apaisada (unos 4,3:1). Si el bloque de
   texto crece, la banda se alarga y la imagen se amplía para cubrirla. Este
   ajuste mantiene la banda cerca de la proporción de la foto. */
.pp-hero__texto {
  padding-top: clamp(18px, 2vw, 30px);
  padding-bottom: clamp(18px, 2vw, 30px);
}

.pp-hero h1 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
}

.pp-hero__bajada {
  margin-bottom: 10px;
  font-size: clamp(14px, 1.1vw, 15.5px);
}

.pp-hero__lugar {
  margin-bottom: 10px;
  font-size: 14px;
}

.pp-hero__resumen {
  margin-bottom: 14px;
  max-width: 48ch;
  font-size: 12.5px;
  line-height: 1.5;
}

.pp-hero__codigo { padding: 9px 15px; font-size: 12px; }

.pp-hero__eyebrow { margin-bottom: 10px; }

.pp-hero__foto img { object-position: center 42%; }

/* La foto cubre el fondo de la banda en vez de fijar su altura: antes la
   proporción del recorte (594x204) estiraba la portada hasta casi 500 px. */
.pp-hero__foto {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.pp-hero__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Tipografía: misma escala que el resto del sitio ---------- */

/* El texto corrido del sitio va entre 15 y 17 px; estas páginas estaban una
   talla por debajo. Las familias y los pesos ya son los de Manrope. */
.pp-sobre__texto p { font-size: 15.5px; line-height: 1.7; }
.pp-hero__resumen { font-size: 13.5px; }
.pp-eval__intro p { font-size: 14px; }
.pp-eval__item p { font-size: 12px; }
.pp-eval__item h3 { font-size: 14px; }
.pp-comp h3 { font-size: 13.5px; }
.pp-vision p { font-size: 14.5px; }
.pp-comps__head h2 { font-size: 15.5px; }
.pp-otro h3 { font-size: 15.5px; }
.pp-otro p { font-size: 13px; }
.pa-card h3 { font-size: 1.15rem; }
.pa-card__lugar { font-size: 13px; }
.pa-card__datos b { font-size: 14px; }
.pa-card__datos span { font-size: 11px; }
.pp-fact__l { font-size: 12.5px; }
.pa-cierre h2 { font-size: clamp(1.2rem, 1.9vw, 1.55rem); }

/* El tema marca en negrita el primer párrafo de las páginas internas; aquí el
   texto corrido va en peso normal, como en el resto del sitio. */
.pp-sobre__texto p,
.pp-eval__intro p,
.pp-eval__item p,
.pp-vision p,
.pp-hero__resumen,
.pa-card__lugar,
.pa-fuente,
.pp-otro p {
  font-weight: 400;
}

.pp-comp h3,
.pa-card__datos b { font-weight: 700; }
