/* =========================================================================
   Plantilla de servicio simple (paises, ciudades y servicios de texto).
   Se activa con <main class="ps">. Mantiene la linea blanco y negro del
   sitio y le da estructura: hero destacado, ancho de lectura, listas como
   tarjetas, pasos numerados, FAQ en bloques y cierre de contacto oscuro.
   La especificidad (main.ps + html:not(#z)) gana a refinado.css sin
   tocar las demas paginas.
   ========================================================================= */

html:not(#z) body main.ps {
  --ps-ink: var(--c-ink, #0b1a2b);
  --ps-text: var(--c-text, #16212e);
  --ps-muted: var(--c-muted, #5a6a7b);
  --ps-rule: var(--c-rule, #dae2ea);
  --ps-soft: var(--c-paper-alt, #f1f4f8);
  --ps-paper: var(--c-paper, #ffffff);
  --ps-ancho: 1360px;
  --ps-lado: 20px;
  padding: 0 0 8px !important;
  overflow-x: clip;
}
@media (min-width: 768px) { html:not(#z) body main.ps { --ps-lado: 28px; } }

/* ---------- contenedor comun: mismo borde para todo ---------- */
html:not(#z) body main.ps > section {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: calc(var(--ps-ancho) + 2 * var(--ps-lado)) !important;
  margin: 0 auto !important;
  padding: 56px var(--ps-lado) 0 !important;
  background: none;
}
@media (min-width: 1024px) {
  html:not(#z) body main.ps > section { padding-top: 72px !important; }
}

/* ancho de lectura: lineas de 60-75 caracteres */
html:not(#z) body main.ps > section > p,
html:not(#z) body main.ps > section > h2,
html:not(#z) body main.ps > section > h3 {
  max-width: 72ch;
}
html:not(#z) body main.ps > section > p {
  color: var(--ps-text);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0 0 16px;
}
html:not(#z) body main.ps > section > h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ps-ink);
  margin: 0 0 20px;
}
html:not(#z) body main.ps > section > h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--ps-ink);
  margin-bottom: 16px;
}

/* enlaces dentro del texto: visibles */
html:not(#z) body main.ps > section p a:not(.btn-primary):not(.dtw-contacto-alt),
html:not(#z) body main.ps > section li a {
  color: var(--ps-ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  font-weight: 600;
}
html:not(#z) body main.ps > section p a:not(.btn-primary):not(.dtw-contacto-alt):hover,
html:not(#z) body main.ps > section li a:hover { text-decoration-thickness: 3px; }

/* ---------- hero ---------- */
html:not(#z) body main.ps > section.hero-servicio,
html:not(#z) body main.ps > section.pagina-intro {
  max-width: none !important;
  background: var(--ps-soft) !important;
  border-bottom: 1px solid var(--ps-rule) !important;
  padding: 32px max(var(--ps-lado), calc((100% - var(--ps-ancho)) / 2)) 40px !important;
}
@media (min-width: 1024px) {
  html:not(#z) body main.ps > section.hero-servicio,
html:not(#z) body main.ps > section.pagina-intro { padding-top: 64px !important; padding-bottom: 64px !important; }
}
html:not(#z) body main.ps > section.hero-servicio > p.eyebrow {
  display: inline-block !important;
  margin: 0 0 16px !important;
  padding: 6px 12px !important;
  border: 1px solid var(--ps-ink) !important;
  border-radius: 999px !important;
  font-size: .8125rem !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  color: var(--ps-ink) !important;
  background: var(--ps-paper) !important;
  max-width: none !important;
}
html:not(#z) body main.ps .hero-servicio h1,
html:not(#z) body main.ps .pagina-intro h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  max-width: 20ch;
  color: var(--ps-ink);
  overflow-wrap: break-word;
}
html:not(#z) body main.ps .hero-servicio .lead,
html:not(#z) body main.ps .pagina-intro > p {
  font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem);
  line-height: 1.6;
  color: var(--ps-text);
  max-width: 60ch;
  margin: 0 0 28px;
}
html:not(#z) body main.ps .hero-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
html:not(#z) body main.ps .hero-acciones > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  box-sizing: border-box;
}
@media (max-width: 559.98px) {
  html:not(#z) body main.ps .hero-acciones > a { flex: 1 1 100%; }
}

/* ---------- listas como tarjetas ---------- */
html:not(#z) body main.ps > section > ul {
  list-style: none;
  margin: 8px 0 24px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  html:not(#z) body main.ps > section > ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html:not(#z) body main.ps > section > ul > li {
  position: relative;
  margin: 0;
  padding: 18px 18px 18px 52px;
  background: var(--ps-paper);
  border: 1px solid var(--ps-rule);
  border-radius: 12px;
  line-height: 1.6;
  color: var(--ps-text);
  min-width: 0;
  overflow-wrap: anywhere;
}
html:not(#z) body main.ps > section > ul > li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 21px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ps-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
html:not(#z) body main.ps > section > ul > li > strong:first-child {
  display: block;
  color: var(--ps-ink);
  margin-bottom: 2px;
}

/* ---------- pasos numerados ---------- */
html:not(#z) body main.ps > section > ol {
  list-style: none;
  counter-reset: ps-paso;
  margin: 8px 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 900px) {
  html:not(#z) body main.ps > section > ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
html:not(#z) body main.ps > section > ol > li {
  counter-increment: ps-paso;
  position: relative;
  margin: 0;
  padding: 18px 18px 18px 64px;
  border: 1px solid var(--ps-rule);
  border-radius: 12px;
  background: var(--ps-paper);
  line-height: 1.6;
  color: var(--ps-text);
  min-width: 0;
}
html:not(#z) body main.ps > section > ol > li::before {
  content: counter(ps-paso, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 16px;
  font-weight: 700;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--ps-ink);
}

/* ---------- preguntas frecuentes en bloques ---------- */
html:not(#z) body main.ps > section.service-faq h3 {
  max-width: none;
  margin: 0;
  padding: 20px 0 6px;
  border-top: 1px solid var(--ps-rule);
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--ps-ink);
}
html:not(#z) body main.ps > section.service-faq h2 + h3 { border-top: 0; padding-top: 4px; }
html:not(#z) body main.ps > section.service-faq h3 + p { margin-bottom: 4px; color: var(--ps-muted); }
@media (min-width: 1024px) {
  html:not(#z) body main.ps > section.service-faq {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: 48px;
    align-items: start;
  }
  html:not(#z) body main.ps > section.service-faq > h2 { grid-column: 1; grid-row: 1 / span 20; position: sticky; top: 96px; }
  html:not(#z) body main.ps > section.service-faq > :not(h2) { grid-column: 2; }
}

/* ---------- quien lo hace: tarjeta limpia ---------- */
html:not(#z) body main.ps > section.dtw-quien {
  margin-top: 56px !important;
  padding: 28px var(--ps-lado) !important;
  border: 1px solid var(--ps-rule) !important;
  border-left: 1px solid var(--ps-rule) !important;
  border-radius: 16px;
  background: var(--ps-soft) !important;
  max-width: calc(var(--ps-ancho)) !important;
  width: calc(100% - 2 * var(--ps-lado)) !important;
  box-shadow: none !important;
}
@media (min-width: 768px) {
  html:not(#z) body main.ps > section.dtw-quien { padding: 40px !important; }
}
html:not(#z) body main.ps > section.dtw-quien h2 { font-size: 1.5rem; }
html:not(#z) body main.ps > section.dtw-quien h2::before { display: none; }

/* enlaces a paises vecinos */
html:not(#z) body main.ps > section.dtw-vecinos > p,
html:not(#z) body main.ps > section:not([class]) > p:only-child {
  padding: 16px 20px;
  border: 1px dashed var(--ps-rule);
  border-radius: 12px;
  max-width: none;
}

/* ---------- cierre de contacto contrastado ---------- */
html:not(#z) body main.ps > section.dtw-contacto {
  margin-top: 64px !important;
  margin-bottom: 64px !important;
  padding: 40px var(--ps-lado) !important;
  border-radius: 20px;
  background: var(--ps-ink) !important;
  color: #fff;
  width: calc(100% - 2 * var(--ps-lado)) !important;
  max-width: var(--ps-ancho) !important;
  border: 0 !important;
}
@media (min-width: 768px) {
  html:not(#z) body main.ps > section.dtw-contacto { padding: 56px !important; }
}
html:not(#z) body main.ps > section.dtw-contacto h2,
html:not(#z) body main.ps > section.dtw-contacto p { color: #fff !important; }
html:not(#z) body main.ps > section.dtw-contacto h2::before { background: #fff; }
html:not(#z) body main.ps > section.dtw-contacto .dtw-contacto-acciones {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px;
}
html:not(#z) body main.ps > section.dtw-contacto .btn-primary {
  background: #fff !important; color: var(--ps-ink) !important; border-color: #fff !important;
  min-height: 48px; display: inline-flex; align-items: center; padding: 0 24px; border-radius: 10px;
}
html:not(#z) body main.ps > section.dtw-contacto .dtw-contacto-alt {
  color: #fff !important; border: 1px solid rgba(255,255,255,.45) !important; background: transparent !important;
  min-height: 48px; display: inline-flex; align-items: center; padding: 0 20px; border-radius: 10px;
}
@media (max-width: 559.98px) {
  html:not(#z) body main.ps > section.dtw-contacto .dtw-contacto-acciones > a { flex: 1 1 100%; justify-content: center; overflow-wrap: anywhere; }
}
