/* =============================================================================
   SEDES — medidas tomadas del editable SEDES.ai (mesa de trabajo 1440 x 9339 px).
   El editable de las subpáginas no dibuja la cabecera: aquí se añaden 76 px
   arriba, de modo que cada sección repite su alto exacto del editable.

   Estructura: móvil primero (flujo normal) y, a partir de 1024 px, la maqueta
   exacta del editable con bloques posicionados sobre un lienzo de 1220 px
   centrado (x = 110 … 1330 del editable).
   ========================================================================== */

/* ==========================================================================
   1. BASE — móvil y tablet (< 1024 px)
   ========================================================================== */

/* -------------------------------------------------------------------- HÉROE */
.hero--sedes{background:var(--wine)}
.hero--sedes .hero__media{position:absolute;inset:0;z-index:0}
.hero--sedes .hero__media img{width:100%;height:100%;object-fit:cover;object-position:center 38%}
.hero--sedes .hero__inner{position:relative;z-index:2;padding-inline:var(--gutter)}

.hero--sedes .hero__title{font-family:"Neulis",sans-serif;color:#EEEEEE;line-height:1.02}
.hero__t1{display:block;font-weight:700;font-size:clamp(34px,7.4vw,74.8px)}
.hero__t2{display:block;font-weight:500;font-size:clamp(27px,5.85vw,59.03px)}

.hero--sedes .hero__sub{max-width:34ch;color:#FFFFFF;line-height:1.2}
.hero__s1{display:block;font-weight:600;font-size:clamp(16px,2.77vw,28px)}
.hero__s2{display:block;font-weight:300;font-size:clamp(16px,2.77vw,28px)}

/* --------------------------------------------------------------- SECCIONES */
.sedes-intro{background:var(--bg);padding-block:clamp(38px,6vw,64px) clamp(30px,5vw,54px)}
.sede{background:var(--bg);padding-block:clamp(40px,6.5vw,72px)}
/* El editable alterna gris y rosado. «sede--rosa» lo pone la vista por
   POSICIÓN —las franjas impares—, para que el día que se añada una sede
   desde el panel la alternancia siga saliendo sola. Las dos clases de
   ciudad se conservan porque de ellas cuelgan también las alturas. */
.sede--chiclayo,.sede--pucallpa,.sede--rosa{background:var(--pink)}

.sede__lienzo{
  width:100%;max-width:calc(var(--container) + var(--gutter)*2);
  margin-inline:auto;padding-inline:var(--gutter);
}
.blq+.blq{margin-top:clamp(24px,4.2vw,44px)}

/* Los saltos de línea reproducen el editable; en pantallas pequeñas estorban. */
@media (max-width:1023px){
  .tx br,.cita br,.sede__sub br{display:none}
}

/* ------------------------------------------------------------- TIPOGRAFÍA */
.tx p{
  font-family:"Poppins",sans-serif;font-weight:300;color:var(--ink);
  font-size:clamp(16px,2.02vw,24px);line-height:1.5;
}
.tx p+p{margin-top:1em}
.tx strong{font-weight:600}

.sede__h{
  font-family:"Neulis",sans-serif;font-weight:700;color:var(--wine);
  font-size:clamp(34px,6.05vw,61.2px);line-height:1.04;
}
.sede__h a{color:inherit}
.sede__h a:hover{color:var(--wine-mid)}
.sede__h-alt{font-weight:400;font-size:.817em}

.sede .sede__sub{
  font-weight:400;color:var(--wine);
  font-size:clamp(17px,2.35vw,28px);line-height:1.22;margin-top:.25em;
}
.sede .sede__fecha{
  font-weight:400;color:#666666;
  font-size:clamp(16px,2.25vw,28px);line-height:1.22;margin-top:.15em;
}
.sede__h3{
  font-family:"Poppins",sans-serif;font-weight:600;font-style:italic;color:var(--wine);
  font-size:clamp(18px,2.35vw,28px);line-height:1.22;margin-top:1.4em;
}
.sede__h3+p{margin-top:.6em}
.sede__h3--sig{margin-top:1.6em}

/* ------------------------------------------------------------------ FOTOS */
.foto{display:block;margin:0;width:100%;box-shadow:var(--shadow-soft)}
.foto picture{display:block}
.foto img{display:block;width:100%;height:auto}
/* El reflejo que el editable aplica a p03, p04 y p11 ya viene incorporado en los
   propios archivos, junto con el recorte correcto. */

/* Foto de Chiclayo con la cita del Papa sobreimpresa */
.foto--cita{position:relative;box-shadow:none}
.foto--cita picture{box-shadow:var(--shadow-soft)}
.cita{background:var(--wine);color:#EEEEEE;padding:clamp(18px,4vw,30px) clamp(18px,4vw,30px) clamp(20px,4.4vw,34px)}
.cita__intro{font-weight:500;font-size:clamp(15px,1.95vw,22px);line-height:1.22}
.cita__texto{margin-top:clamp(14px,2.2vw,24px);border-left:2px solid #EEEEEE;padding-left:clamp(12px,1.5vw,18px)}
.cita__texto p{font-weight:300;font-style:italic;font-size:clamp(14px,1.85vw,21px);line-height:1.32}

/* --------------------------------------------------------------- BOTONES */
.sede__cta{color:#EEEEEE;font-weight:500}
.sede__cta:focus-visible{outline-color:#EEEEEE}

/* --------------------------------------------------------- LÍNEA Y PIE */
.sedes-intro__linea{
  border:0;height:1px;background:#666666;opacity:.55;
  margin:clamp(30px,5vw,54px) 0 0;
}
.site-footer__links{display:flex;flex-wrap:wrap;gap:0 clamp(14px,1.6vw,22px);order:3;width:100%}
.site-footer__links a{opacity:.82}
.site-footer__links a:hover{opacity:1}

/* ==========================================================================
   2. MAQUETA EXACTA DEL EDITABLE (≥ 1024 px)
   Todas las coordenadas son las del editable; cada sección empieza en su
   propia y del editable y los bloques se posicionan dentro de ella.
   ========================================================================== */
@media (min-width:1024px){

  /* ------------------------------------------------------------- HÉROE 0–582 */
  .hero--sedes .hero__inner{
    min-height:calc(582 * var(--u));
    justify-content:flex-start;gap:0;
    padding:calc(334.04 * var(--u)) 0 0;
  }
  /* El editable lleva un ligero entreletrado negativo en los titulares Neulis. */
  .hero--sedes .hero__title{line-height:normal;letter-spacing:-.008em}
  .hero__t1{font-size:calc(74.8 * var(--u));line-height:calc(66 * var(--u))}
  .hero__t2{font-size:calc(59.03 * var(--u));line-height:calc(52.34 * var(--u))}
  .hero--sedes .hero__sub{max-width:none;margin-top:calc(16.62 * var(--u))}
  .hero__s1,.hero__s2{font-size:calc(28 * var(--u));line-height:calc(33.6 * var(--u))}

  /* -------------------------------------------------------- LIENZO Y BLOQUES */
  /* Alturas del editable. Van como MÍNIMO y no como alto fijo: el texto ya
     no es el de Illustrator, lo escribe alguien desde la intranet, y una
     franja que se pase de largo tiene que poder crecer en vez de salirse. */
  .sedes-intro,.sede{padding:0}
  .sedes-intro{min-height:calc(1125 * var(--u))}      /* 582 → 1707    */
  .sede--lima{min-height:calc(2043.5 * var(--u))}     /* 1707 → 3750.5 */
  .sede--chiclayo{min-height:calc(2108 * var(--u))}   /* 3750.5 → 5858.5 */
  .sede--cusco{min-height:calc(1406 * var(--u))}      /* 5858.5 → 7264.5 */
  .sede--pucallpa{min-height:calc(1940 * var(--u))}   /* 7264.5 → 9204.5 */

  .sedes-intro,.sede{position:relative}
  .sede__lienzo{
    position:absolute;left:0;right:0;top:0;bottom:0;
    width:calc(1220 * var(--u));max-width:none;margin-inline:auto;padding-inline:0;
  }

  .blq{position:absolute}
  .blq+.blq{margin-top:0}
  .blq--izq{left:0;width:max-content}
  .blq--der{right:0;width:max-content;text-align:right}

  /* --------------------------------------------------------- TIPOGRAFÍA */
  .tx p{font-size:calc(24 * var(--u));line-height:calc(30 * var(--u))}
  .tx p+p{margin-top:calc(13 * var(--u))}

  .sede__h{
    font-size:calc(61.2 * var(--u));line-height:calc(61.2 * var(--u));
    height:calc(61.2 * var(--u));letter-spacing:-.0065em;
  }
  .sede__h-alt{font-size:calc(50 * var(--u));line-height:calc(50 * var(--u))}
  .sede .sede__sub{font-size:calc(28 * var(--u));line-height:calc(34 * var(--u));margin-top:0}
  .sede .sede__fecha{font-size:calc(28 * var(--u));line-height:calc(34 * var(--u));margin-top:calc(3 * var(--u))}
  .sede--lima .sede__fecha{margin-top:calc(1.88 * var(--u))}
  .sede__h3{font-size:calc(28 * var(--u));line-height:calc(34 * var(--u));margin-top:0}
  .sede__fecha+.sede__h3{margin-top:calc(49 * var(--u))}
  .sede--lima .sede__fecha+.sede__h3{margin-top:calc(25 * var(--u))}
  .sede__h3+p{margin-top:calc(11.2 * var(--u))}
  .sede__h3--sig{margin-top:calc(33.8 * var(--u))}

  /* -------------------------------------------------------------- BOTONES */
  .sede__cta{
    min-width:0;min-height:0;padding:0;
    box-shadow:0 calc(9 * var(--u)) calc(26 * var(--u)) rgba(110,11,20,.26);
  }
  .sede__cta--sm{width:calc(257.3 * var(--u));height:calc(39.3 * var(--u));font-size:calc(24.59 * var(--u))}
  .sede__cta--lg{width:calc(318.8 * var(--u));height:calc(48.4 * var(--u));font-size:calc(30.49 * var(--u))}

  /* ---------------------------------------------------------------- FOTOS */
  .foto{box-shadow:calc(6 * var(--u)) calc(8 * var(--u)) calc(14 * var(--u)) rgba(0,0,0,.20)}

  /* ============================================ INTRODUCCIÓN (editable 582) */
  .b-int-1{top:calc(108.4 * var(--u))}                                   /* línea base 713.8 */
  .b-int-2{top:calc(109.5 * var(--u));right:0;width:calc(534.5 * var(--u))}
  .b-int-3{top:calc(631.5 * var(--u));left:calc(-0.5 * var(--u));width:calc(633 * var(--u))}
  .b-int-4{top:calc(632.4 * var(--u));right:0}                           /* línea base 1237.8 */

  .sedes-intro__linea{
    position:absolute;margin:0;opacity:1;
    top:calc(1124.8 * var(--u));left:calc(-0.4 * var(--u));
    width:calc(1219.8 * var(--u));height:calc(0.8 * var(--u));
  }

  /* ================================================ LIMA — CALLAO (ed. 1707) */
  .b-lima-1{top:calc(78.122 * var(--u))}                                 /* título 1835 */
  .b-lima-2{top:calc(136.5 * var(--u));right:calc(-0.5 * var(--u));width:calc(557 * var(--u))}
  .b-lima-3{top:calc(672.5 * var(--u));left:calc(0.5 * var(--u));width:calc(597 * var(--u))}
  .b-lima-4{top:calc(678.4 * var(--u));right:calc(1 * var(--u))}         /* línea base 2408.8 */
  .b-lima-5{top:calc(993.5 * var(--u));right:calc(-0.5 * var(--u));width:calc(505 * var(--u))}
  .b-lima-6{top:calc(1018.2 * var(--u))}                                 /* h3 2752 */
  .b-lima-7{top:calc(1300.5 * var(--u));right:calc(-0.5 * var(--u));width:calc(505 * var(--u))}
  .b-lima-8{top:calc(1562.2 * var(--u))}                                 /* h3 3296 */
  .b-lima-9{top:calc(1609.5 * var(--u));right:calc(-0.5 * var(--u));width:calc(505 * var(--u))}
  .b-lima-10{top:calc(1937.5 * var(--u));right:calc(-0.3 * var(--u))}

  /* ======================================= CHICLAYO — SANTA CRUZ (ed. 3750.5) */
  .b-chi-1{top:calc(53.622 * var(--u))}                                  /* título 3854 */
  .b-chi-2{top:calc(227 * var(--u));right:calc(-0.5 * var(--u));width:calc(540 * var(--u))}
  .b-chi-3{top:calc(745 * var(--u));left:calc(0.3 * var(--u));width:calc(561.2 * var(--u))}
  .b-chi-4{top:calc(758.7 * var(--u));right:calc(-3 * var(--u))}         /* h3 4536 */
  .b-chi-5{top:calc(1526 * var(--u));right:calc(-0.5 * var(--u));width:calc(528 * var(--u))}
  .b-chi-6{top:calc(1652.7 * var(--u))}                                  /* h3 5430 */
  .b-chi-7{top:calc(2014.5 * var(--u));left:calc(0.3 * var(--u))}

  /* La cita va sobreimpresa sobre el degradado inferior de la foto. */
  .foto--cita{box-shadow:calc(6 * var(--u)) calc(8 * var(--u)) calc(14 * var(--u)) rgba(0,0,0,.20);overflow:hidden}
  .foto--cita picture{box-shadow:none}
  .foto--cita::after{
    content:"";position:absolute;left:0;right:0;top:calc(242 * var(--u));bottom:0;z-index:1;
    background:linear-gradient(180deg,
      rgba(110,11,20,0) 0%,rgba(110,11,20,.10) 42%,rgba(110,11,20,.30) 52%,
      rgba(110,11,20,.66) 56%,rgba(110,11,20,.80) 72%,rgba(110,11,20,.94) 88%,
      #6E0B14 96%,#6E0B14 100%);
  }
  .cita{position:static;background:none;padding:0;color:#EEEEEE}
  .cita__intro{
    position:absolute;z-index:2;left:calc(41.5 * var(--u));top:calc(581.1 * var(--u));
    font-size:calc(22 * var(--u));line-height:calc(26 * var(--u));
  }
  .cita__texto{
    position:absolute;z-index:2;left:calc(58.5 * var(--u));top:calc(679.15 * var(--u));
    margin:0;border:0;padding:0;
  }
  .cita__texto::before{
    content:"";position:absolute;left:calc(-18 * var(--u));top:calc(1.55 * var(--u));
    width:calc(2 * var(--u));height:calc(131.8 * var(--u));background:#EEEEEE;
  }
  .cita__texto p{font-size:calc(21 * var(--u));line-height:calc(27 * var(--u))}

  /* ============================================================ CUSCO (5858.5) */
  .b-cus-1{top:calc(64.622 * var(--u))}                                  /* título 5973 */
  .b-cus-2{top:calc(83 * var(--u));right:calc(-0.5 * var(--u));width:calc(502 * var(--u))}
  .b-cus-3{top:calc(702.7 * var(--u))}                                   /* h3 6588 */
  .b-cus-4{top:calc(603.5 * var(--u));right:calc(-0.5 * var(--u));width:calc(502 * var(--u))}
  .b-cus-5{top:calc(1072.7 * var(--u))}                                  /* h3 6958 */
  .b-cus-6{top:calc(1282.7 * var(--u));right:calc(-0.3 * var(--u))}

  /* ========================================================= PUCALLPA (7264.5) */
  .b-puc-1{top:calc(59.622 * var(--u))}                                  /* título 7374 */
  .b-puc-2{top:calc(147 * var(--u));right:calc(-0.5 * var(--u));width:calc(493 * var(--u))}
  .b-puc-3{top:calc(892 * var(--u));left:calc(0.3 * var(--u));width:calc(540.2 * var(--u))}
  .b-puc-4{top:calc(888.7 * var(--u));right:0}                           /* h3 8180 */
  .b-puc-5{top:calc(1817.7 * var(--u));left:calc(0.3 * var(--u))}

  /* ------------------------------------------------------------------- PIE */
  .site-footer{min-height:calc(134.5 * var(--u))}
  .site-footer__inner{padding-top:calc(47.8 * var(--u))}
}

/* ==========================================================================
   3. Ajustes finos de móvil
   ========================================================================== */
/* Tablet: las fotos no se recortan nunca, pero se limita su ancho para que los
   retratos verticales no dominen la página. */
@media (min-width:600px) and (max-width:1023px){
  .foto{max-width:min(100%,540px);margin-inline:auto}
  .cita{max-width:min(100%,540px);margin-inline:auto}
}

@media (max-width:767px){
  .sedes-intro,.sede{padding-block:clamp(32px,7vw,48px)}
  .hero--sedes .hero__media img{object-position:center 32%}
  .hero--sedes .hero__sub{max-width:28ch}
  .sede__h3{margin-top:1.2em}
}

@media (max-width:479px){
  .cita__texto{padding-left:12px}
}

/* ==========================================================================
   4. EL TEXTO YA NO ES EL DEL EDITABLE
   La página se edita desde la intranet, así que un párrafo puede llegar más
   largo, sin los <br> que clavan el corte de línea del editable, o con una
   pieza de más. Nada de lo que hay aquí cambia un píxel de lo de arriba
   —todo el contenido de hoy cabe de sobra dentro de estos límites—: son el
   tope que evita que un texto largo se salga de la página.
   ========================================================================== */
@media (min-width:1024px){

  /* Los bloques de texto se dimensionan con «max-content» para respetar los
     saltos del editable. Sin tope, un párrafo sin <br> se pintaría en una
     sola línea kilométrica y sacaría barra horizontal a toda la página.
     · el bloque, como mucho el ancho del lienzo —el subtítulo de Chiclayo
       ya mide 1026 px y no debe partirse—;
     · los párrafos del cuerpo, la columna del editable (≈670 px). Llevan el
       tope por separado porque el subtítulo y la fecha son párrafos
       también, y ésos sí van a línea completa: se distinguen por su clase. */
  .blq--izq,.blq--der{max-width:calc(1220 * var(--u))}
  .tx p:not([class]){max-width:calc(690 * var(--u))}

  /* La cita sobreimpresa cabe dentro de su fotografía aunque le quiten los
     saltos de línea. */
  .cita__intro{max-width:calc(330 * var(--u))}
  .cita__texto{max-width:calc(462 * var(--u))}

  /* ── Cuando la composición deja de ser la del editable ─────────────────
     Las coordenadas de arriba describen UNA composición concreta: tantas
     piezas y en ese orden. Si desde el panel se añade o se quita una, esas
     coordenadas colocarían un texto donde iba una foto, así que la vista
     marca la franja con «franja-libre» y aquí vuelve al flujo normal, que
     aguanta cualquier número de piezas. No es la maqueta, pero se lee. */
  .franja-libre{min-height:0;height:auto}
  .franja-libre .sede__lienzo{
    position:static;display:flex;flex-direction:column;align-items:flex-start;
    gap:calc(44 * var(--u));padding-block:calc(70 * var(--u));
  }
  .franja-libre .blq{position:static;width:auto;max-width:calc(690 * var(--u));text-align:left;margin:0}
  .franja-libre .foto{width:min(100%,calc(560 * var(--u)))}
  .franja-libre .sede__h{height:auto}
  .franja-libre .sede__h3{margin-top:calc(26 * var(--u))}
  .franja-libre .sede__fecha+.sede__h3{margin-top:calc(26 * var(--u))}
  .franja-libre .sedes-intro__linea{position:static;width:100%;margin-top:calc(20 * var(--u))}

  /* La cita vuelve a su forma de móvil: recuadro granate bajo la foto. */
  .franja-libre .foto--cita::after{content:none}
  .franja-libre .cita{background:var(--wine);padding:calc(24 * var(--u))}
  .franja-libre .cita__intro,.franja-libre .cita__texto{position:static;max-width:none}
  .franja-libre .cita__texto{margin-top:calc(16 * var(--u));padding-left:calc(18 * var(--u));border-left:2px solid #EEEEEE}
  .franja-libre .cita__texto::before{content:none}
}
