/* =========================================================
   DIRECTORIO · rediseño UX/UI (página ID 158)
   Solo aplica a /directorio. No toca el resto del sitio.
   Paleta: azul #12405F · celeste #6DCCDD · limón #A8CF3A
           naranja #F3924A · durazno #F4B39C · gris #5F6062
========================================================= */

body.page-id-158 {
  background-color: #F5F9FB !important;
}

/* ---------- Lienzo y ancho de lectura ---------- */
body.page-id-158 .elementor-158 {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Espaciador superior ---------- */
body.page-id-158 .elementor-158 .elementor-element-b5cdb93 .elementor-spacer-inner {
  height: 28px !important;
}

/* =========================================================
   1. HERO / CABECERA
========================================================= */
body.page-id-158 .elementor-158 > .elementor-element-46b37b9 {
  position: relative;
  overflow: hidden;
  padding: 40px 44px 42px;
  border-radius: 26px;
  background:
    radial-gradient(620px 320px at 88% -20%, rgba(109, 204, 221, 0.30), transparent 62%),
    radial-gradient(520px 300px at 0% 120%, rgba(168, 207, 58, 0.20), transparent 62%),
    #12405F;
  margin-bottom: 30px;
  box-shadow: 0 24px 56px rgba(18, 64, 95, 0.16);
}

body.page-id-158 .elementor-158 > .elementor-element-46b37b9 .elementor-widget-container {
  margin: 0 !important;
}

body.page-id-158 .elementor-158 > .elementor-element-46b37b9 header {
  margin-bottom: 0 !important;
}

body.page-id-158 .elementor-158 > .elementor-element-46b37b9 header .text-xs {
  color: #A8CF3A !important;
  letter-spacing: 0.16em !important;
}

body.page-id-158 .elementor-158 > .elementor-element-46b37b9 h1 {
  margin-top: 10px;
  color: #FFFFFF !important;
  font-size: clamp(2rem, 3.4vw, 2.85rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em;
  max-width: 900px;
}

body.page-id-158 .elementor-158 > .elementor-element-46b37b9 p {
  margin-top: 14px !important;
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  max-width: 760px;
}

/* =========================================================
   2. COLUMNA DE PASOS + FORMULARIO
========================================================= */
body.page-id-158 .elementor-158 > .elementor-element-c431a01 {
  align-items: flex-start !important;
  gap: 32px;
}

/* Columna izquierda */
body.page-id-158 .elementor-158 > .elementor-element-c431a01 > .elementor-element-67d4138 {
  flex: 0 0 340px;
  width: 340px;
  position: sticky;
  top: 96px;
}

/* Tarjeta de pasos */
body.page-id-158 .elementor-158 aside > div {
  padding: 24px !important;
  border: 1px solid #E3F5F9 !important;
  border-top: 4px solid #12405F !important;
  border-radius: 22px !important;
  background: #FFFFFF !important;
  box-shadow: 0 18px 40px rgba(18, 64, 95, 0.09) !important;
}

body.page-id-158 .elementor-158 aside > div > span:first-child {
  color: #12405F !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  border-bottom-color: #E3F5F9 !important;
  padding-bottom: 12px !important;
}

body.page-id-158 .elementor-158 aside ol {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
}

/* Línea vertical del proceso */
body.page-id-158 .elementor-158 aside ol::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 99px;
  background: #E3F5F9;
}

body.page-id-158 .elementor-158 aside ol li {
  position: relative;
  gap: 12px !important;
  align-items: flex-start;
}

body.page-id-158 .elementor-158 aside ol li > span:first-child {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  border: 1px solid #D6EEF3;
  border-radius: 999px !important;
  background: #EAF7FA !important;
  color: #12405F !important;
  font-size: 11px !important;
  z-index: 1;
}

body.page-id-158 .elementor-158 aside ol li:first-child > span:first-child {
  background: #A8CF3A !important;
  border-color: #A8CF3A !important;
  color: #12405F !important;
  box-shadow: 0 6px 14px rgba(168, 207, 58, 0.35);
}

body.page-id-158 .elementor-158 aside ol li > span:last-child {
  color: #5F6062 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  padding-top: 4px;
}

/* Columna derecha */
body.page-id-158 .elementor-158 > .elementor-element-c431a01 > .elementor-element-9186a7c {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

/* Tarjeta del formulario */
body.page-id-158 .elementor-158 .elementor-element-eeb7a1f {
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch !important;
  position: relative;
  overflow: hidden;
  padding: 32px !important;
  border: 1px solid #E3F5F9 !important;
  border-radius: 22px !important;
  background: #FFFFFF !important;
  box-shadow: 0 18px 40px rgba(18, 64, 95, 0.09) !important;
}

/* Franja superior de marca */
body.page-id-158 .elementor-158 .elementor-element-eeb7a1f::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6DCCDD 0%, #A8CF3A 100%);
}

body.page-id-158 .elementor-158 .fluentform-widget-wrapper,
body.page-id-158 .elementor-158 .fluentform {
  width: 100%;
}

/* =========================================================
   3. CAMPOS
========================================================= */
body.page-id-158 .fluentform {
  --fluentform-primary: #6DCCDD;
  --fluentform-border-color: #DCE6EC;
  --fluentform-border-radius: 10px;
  --fluentform-danger: #F3924A;
}

body.page-id-158 .ff-el-group {
  margin-bottom: 18px !important;
}

body.page-id-158 .ff_submit_btn_wrapper {
  margin-bottom: 0 !important;
  margin-top: 6px !important;
}

body.page-id-158 .ff-el-input--label {
  margin-bottom: 6px !important;
}

body.page-id-158 .ff-el-input--label label {
  color: #12405F !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
}

body.page-id-158 .ff-el-input--label.ff-el-is-required.asterisk-right label::after {
  color: #F3924A !important;
  font-weight: 900;
}

body.page-id-158 .ff-el-form-control {
  min-height: 48px;
  height: 48px;
  padding: 11px 14px !important;
  border: 1px solid #DCE6EC !important;
  border-radius: 10px !important;
  background: #FFFFFF !important;
  color: #12405F !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

body.page-id-158 textarea.ff-el-form-control {
  height: auto;
  min-height: 110px;
}

body.page-id-158 .ff-el-form-control::placeholder {
  color: #8B9499 !important;
  opacity: 1;
}

body.page-id-158 .ff-el-form-control:focus {
  border-color: #6DCCDD !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(109, 204, 221, 0.22) !important;
  outline: none !important;
}

body.page-id-158 select.ff-el-form-control {
  padding-right: 38px !important;
  background-image: linear-gradient(45deg, transparent 50%, #12405F 50%),
    linear-gradient(135deg, #12405F 50%, transparent 50%) !important;
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

/* Filas de dos columnas */
body.page-id-158 .ff-t-container {
  gap: 20px !important;
  flex-wrap: wrap;
}

body.page-id-158 .ff-t-cell {
  flex: 1 1 0 !important;
  min-width: 0;
  max-width: none;
  padding: 0 !important;
}

/* =========================================================
   4. BOTÓN Y MENSAJES
========================================================= */
body.page-id-158 .ff-btn-submit {
  width: auto !important;
  min-width: 270px;
  min-height: 50px;
  padding: 13px 28px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 26px rgba(109, 204, 221, 0.35) !important;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

body.page-id-158 .ff-btn-submit:hover,
body.page-id-158 .ff-btn-submit:focus {
  box-shadow: 0 14px 30px rgba(87, 195, 214, 0.45) !important;
  transform: translateY(-1px);
  opacity: 1 !important;
}

body.page-id-158 .ff-btn-submit:active {
  transform: translateY(0);
}

/* Errores */
body.page-id-158 .ff-el-form-control.ff_invalid {
  border-color: #F3924A !important;
  box-shadow: 0 0 0 3px rgba(243, 146, 74, 0.16) !important;
}

body.page-id-158 .error.text-danger,
body.page-id-158 .ff-el-form-control-error {
  color: #B8520F !important;
  font-size: 12px !important;
  font-weight: 700;
}

/* Mensajes de éxito / aviso */
body.page-id-158 .ff-message-success,
body.page-id-158 .ff-message-info {
  border-radius: 12px !important;
  border: 1px solid #D6EEF3 !important;
  background: #F1FAFC !important;
  color: #12405F !important;
  font-weight: 600;
}

/* Foco visible accesible */
body.page-id-158 a:focus-visible,
body.page-id-158 button:focus-visible,
body.page-id-158 input:focus-visible,
body.page-id-158 select:focus-visible,
body.page-id-158 textarea:focus-visible {
  outline: 2px solid #6DCCDD;
  outline-offset: 2px;
}

/* =========================================================
   5. RESPONSIVE
========================================================= */
@media (max-width: 1023px) {
  body.page-id-158 .elementor-158 > .elementor-element-c431a01 {
    flex-direction: column !important;
  }

  body.page-id-158 .elementor-158 > .elementor-element-c431a01 > .elementor-element-67d4138,
  body.page-id-158 .elementor-158 > .elementor-element-c431a01 > .elementor-element-9186a7c {
    flex: 1 1 auto;
    width: 100%;
  }

  body.page-id-158 .elementor-158 > .elementor-element-c431a01 > .elementor-element-67d4138 {
    position: static;
    top: auto;
  }

  /* La tarjeta de pasos ocupa todo el ancho disponible */
  body.page-id-158 .elementor-158 > .elementor-element-c431a01 > .elementor-element-67d4138 .elementor-element {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  body.page-id-158 .elementor-158 {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.page-id-158 .elementor-158 > .elementor-element-46b37b9 {
    padding: 28px 22px 30px;
    border-radius: 20px;
    margin-bottom: 22px;
  }

  body.page-id-158 .elementor-158 > .elementor-element-46b37b9 h1 {
    font-size: 1.9rem !important;
  }

  body.page-id-158 .elementor-158 .elementor-element-eeb7a1f {
    padding: 22px !important;
    border-radius: 18px !important;
  }

  body.page-id-158 .ff-t-container {
    display: block !important;
  }

  body.page-id-158 .ff-t-cell {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  body.page-id-158 .ff-btn-submit {
    width: 100% !important;
    min-width: 0;
  }

  body.page-id-158 .elementor-158 aside > div {
    padding: 20px !important;
  }
}

/* ===== Botón «Enviar mi experiencia» (home · testimonios) ===== */
section[aria-label="Historias y testimonios de la comunidad"] .rrm-btn.rrm-btn-testimonios {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  justify-content: center !important;
  gap: 9px !important;
  padding: 8px 20px !important;
  height: auto !important;
  min-height: 30px !important;
  border: 1px solid rgba(109, 204, 221, 0.45) !important;
  border-radius: 999px !important;
  background: linear-gradient(100deg, #12405F 0%, #16607C 42%, #2E93AB 74%, #45B8B0 100%) !important;
  color: #FFFFFF !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  box-shadow: 0 14px 28px rgba(18, 64, 95, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

/* Oculta la flecha actual */
section[aria-label="Historias y testimonios de la comunidad"] .rrm-btn.rrm-btn-testimonios svg {
  display: none !important;
}

/* Avión de papel blanco a la derecha */
section[aria-label="Historias y testimonios de la comunidad"] .rrm-btn.rrm-btn-testimonios::after {
  content: "" !important;
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 15px !important;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FFFFFF'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m22%202-7%2020-4-9-9-4Z'/%3E%3Cpath%20d='M22%202%2011%2013'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 15px 15px !important;
  transition: transform 0.2s ease !important;
}

section[aria-label="Historias y testimonios de la comunidad"] .rrm-btn.rrm-btn-testimonios:hover,
section[aria-label="Historias y testimonios de la comunidad"] .rrm-btn.rrm-btn-testimonios:focus {
  background: linear-gradient(100deg, #12405F 0%, #1A7292 42%, #38A6BC 72%, #6DCCDD 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 20px 36px rgba(18, 64, 95, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
  transform: translateY(-2px) !important;
}

section[aria-label="Historias y testimonios de la comunidad"] .rrm-btn.rrm-btn-testimonios:hover::after {
  transform: translateX(3px) rotate(-8deg) !important;
}

section[aria-label="Historias y testimonios de la comunidad"] .rrm-btn.rrm-btn-testimonios:focus-visible {
  outline: 3px solid #6DCCDD !important;
  outline-offset: 3px !important;
}

@media (max-width: 640px) {
  section[aria-label="Historias y testimonios de la comunidad"] .rrm-btn.rrm-btn-testimonios {
    width: 100% !important;
  }
}

/* =========================================================
   FOOTER · REJILLA DE CONTENIDO
   Estructura del footer de React: una fila de 5 columnas
   (identidad + 3 columnas de enlaces).
========================================================= */
.rrm-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .rrm-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rrm-footer__identity {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .rrm-footer__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3rem;
  }

  .rrm-footer__identity {
    grid-column: span 2;
  }
}

/* =========================================================
   FOOTER · ESCALasshh
========================================================= */
.rrm-footer > div {
  max-width: 1440px !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
}

.rrm-footer__grid {
  gap: 3.5rem !important;
}

.rrm-footer__grid h4 {
  font-size: 0.95rem !important;
  letter-spacing: 0.06em !important;
}

.rrm-footer__grid a {
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}

.rrm-footer__desc {
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
}

.rrm-footer__email {
  font-size: 0.95rem !important;
}

.rrm-footer__identity img {
  height: 7rem !important;
  max-width: 340px !important;
}

@media (max-width: 767px) {
  .rrm-footer > div {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .rrm-footer__grid {
    gap: 2.25rem !important;
  }
}

.rrm-footer > div {
  padding-top: 4.5rem !important;
  padding-bottom: 4rem !important;
}

.rrm-footer__grid {
  margin-bottom: 4rem !important;
}

.rrm-footer__partners {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

/* =========================================================
   LA RED · DISTRIBUCIÓN TERRITORIAL - la red
========================================================= */
#territorio{
  padding:4rem 0;
  border-top:1px solid #E7EBDD;
  border-bottom:1px solid #E7EBDD;
  background-color:#F8F7EC;
  background-image:
    radial-gradient(900px 430px at 6% 0%, rgba(168,207,58,.16), transparent 66%),
    radial-gradient(760px 430px at 98% 0%, rgba(109,204,221,.10), transparent 64%),
    linear-gradient(140deg,#FCFBF1 0%,#F5F8E8 54%,#FCFBF3 100%);
}

#territorio .ter-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  margin-top:2rem;
}
@media (min-width:640px){
  #territorio .ter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
}
@media (min-width:1200px){
  #territorio .ter-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
}

#territorio .ter-card{
  position:relative;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#fff;
  border:1px solid #E5EADB;
  border-radius:16px;
  box-shadow:0 1px 2px rgba(25,39,27,.04), 0 14px 28px -22px rgba(25,39,27,.45);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
#territorio .ter-grid.is-ready .ter-card{opacity:0}
#territorio .ter-grid.is-ready .ter-card.is-in{
  opacity:1;
  animation:ter-in .55s cubic-bezier(.22,.61,.36,1) var(--d,0ms) backwards;
}
@keyframes ter-in{
  from{opacity:0;transform:translateY(18px)}
  to{opacity:1;transform:none}
}
#territorio .ter-card:nth-child(2){--d:80ms}
#territorio .ter-card:nth-child(3){--d:160ms}
#territorio .ter-card:nth-child(4){--d:240ms}

@media (hover:hover){
  #territorio .ter-card:hover{
    transform:translateY(-3px);
    border-color:#D3DDC2;
    box-shadow:0 2px 4px rgba(25,39,27,.05), 0 22px 34px -22px rgba(25,39,27,.55);
  }
}

#territorio .ter-mark{
  position:absolute;top:-6px;right:-10px;width:104px;height:104px;
  color:#F0F4E5;pointer-events:none;
}
#territorio .ter-mark svg{
  width:100%;height:100%;fill:none;stroke:currentColor;
  stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
}

#territorio .ter-top{
  position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:7px;
  padding:18px 20px 0;
}
#territorio .ter-pill{
  display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 10px;
  border-radius:999px;font-size:11.5px;font-weight:800;line-height:1;
}
#territorio .ter-pill svg{
  width:11px;height:11px;fill:none;stroke:currentColor;
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round;
}
#territorio .ter-pill--where{background:#EEF4DF;color:#4E6A18;border:1px solid #DFEAC4}
#territorio .ter-pill--sub{background:#F4F7F8;color:#5C6E75;border:1px solid #E4EBEE;font-weight:700}

#territorio .ter-body{position:relative;display:flex;flex-direction:column;flex:1;padding:10px 20px 0}
#territorio .ter-label{
  font-size:9.5px;font-weight:800;letter-spacing:.1em;
  text-transform:uppercase;color:#8A9985;
}
#territorio .ter-lead{
  margin-top:12px;font-size:12.5px;line-height:1.55;
  font-weight:600;color:#5D6B60;
}
#territorio .ter-lead + .ter-label{margin-top:14px}
#territorio .ter-munis{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
#territorio .ter-muni{
  display:inline-flex;align-items:center;gap:5px;padding:4px 8px;
  border-radius:6px;background:#FBFCF8;border:1px solid #E7EBDD;
  font-size:11.5px;line-height:1.3;font-weight:700;color:#12405F;
}
#territorio .ter-muni i{width:4px;height:4px;border-radius:50%;background:#A8CF3A;flex:0 0 4px}

#territorio .ter-lines{margin-top:auto;padding:16px 20px}
#territorio .ter-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
#territorio .ter-tag{
  padding:3px 8px;border-radius:4px;background:#F1F6E6;
  font-size:9.5px;line-height:1.5;font-weight:800;
  letter-spacing:.05em;text-transform:uppercase;color:#4F6B14;
}

#territorio .ter-foot{
  margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:12px;
  border-top:1px solid #EFF2E8;padding:14px 18px 14px 20px;
  text-decoration:none;font-size:12.5px;font-weight:800;
  letter-spacing:-.005em;color:#12405F;
}
#territorio .ter-foot:hover{color:#21A724}
#territorio .ter-arrow{
  flex:0 0 auto;width:26px;height:26px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:#F5F8EE;color:#486848;
  transition:background .2s ease,color .2s ease,transform .2s ease;
}
#territorio .ter-arrow svg{
  width:13px;height:13px;fill:none;stroke:currentColor;
  stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;
}
#territorio .ter-foot:hover .ter-arrow{
  background:#A8CF3A;color:#21330A;transform:translateX(2px);
}

@media (prefers-reduced-motion:reduce){
  #territorio .ter-grid.is-ready .ter-card{opacity:1}
  #territorio .ter-grid.is-ready .ter-card.is-in{animation:none}
  #territorio .ter-arrow{transition:none}
}