/* ===============================
   PASOS – MASONRY BONITO (SIN JS)
   + ESTILO MORADO INSTITUCIONAL
   =============================== */
body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: #fff;
}
:root{
  --ui-border: rgba(0,0,0,.10);
  --ui-shadow: 0 18px 55px rgba(0,0,0,.14);
}

#pasos-grid{
  background: #fbfbfd;
}

/* Masonry real con columnas */
.grid-pasos{
  width: 100%;
  margin: 0 auto;

  column-width: 420px;     /* MÁS GRANDE = MÁS IMPACTO */
  column-gap: 32px;
}

/* Card */
.paso-item{
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;

  margin: 0 0 32px;
  text-decoration: none;
  color: inherit;

  background: #fff;
  overflow: hidden;

  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.14);

  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.paso-item:hover{
  transform: translateY(-6px);
  border-color: rgba(75,42,136,.35); /* moradito */
  box-shadow: 0 28px 90px rgba(0,0,0,.22);
}

/* Imagen */
.paso-item picture{
  display: block;
  width: 100%;
}

.paso-item img{
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;

  transition: transform .8s ease;
}

.paso-item:hover img{
  transform: scale(1.03); /* impacto suave */
}

/* Título: con rayita vertical morada (tu sello) */
/* Título con degradado institucional */
.paso-item span{
  display: block;
  padding: 14px 16px 16px 18px;

  font-weight: 950;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;

  color: rgba(0,0,0,.86);

  /* 🔥 degradado morado institucional */
  background: linear-gradient(92deg, rgb(75 42 136 / 40%), rgb(75 42 136 / 25%) 45%, transparent 75%);

  border-top: 1px solid rgba(0,0,0,.10);
  position: relative;
}


/* la rayita vertical */
/* Rayita vertical morada */
.paso-item span::before{
  content:"";
  position:absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  background: var(--brand, #4b2a88);
  border-radius: 999px;
}

/* Línea fina inferior */
.paso-item span::after{
  content:"";
  display:block;
  height: 1px;
  margin-top: 10px;
  background: linear-gradient(90deg, rgba(0,0,0,.12), transparent);
}


/* Responsive */
@media (max-width: 900px){
  .grid-pasos{
    column-width: 340px;
    column-gap: 24px;
  }
  .paso-item{ margin-bottom: 24px; }
}

@media (max-width: 520px){
  #pasos-grid{
    padding: calc(var(--hdr-h) + 18px) 12px 60px;
  }
  .grid-pasos{
    column-width: 999px; /* fuerza 1 columna */
    column-gap: 0;
  }
  .paso-item{
    margin: 0 0 18px;
    border-radius: 16px;
  }
}


/* ===============================
   MODAL PASO INTERMEDIO
   =============================== */
.paso-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .35s ease, visibility .35s ease;
}
.paso-modal.is-open{
  visibility: visible;
  opacity: 1;
}

.paso-modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.paso-modal__content{
  position: relative;
  z-index: 1;
  background: #fff;
  width: 92%;
  max-width: 1100px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 14px;
  box-shadow: 0 30px 90px rgba(0,0,0,.4);
  animation: pasoModalIn .35s ease;
}
@keyframes pasoModalIn{
  from{ transform: translateY(30px) scale(.97); opacity: 0; }
  to  { transform: translateY(0) scale(1); opacity: 1; }
}

.paso-modal__close{
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 2rem;
  color: rgba(0,0,0,.5);
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  transition: color .2s;
}
.paso-modal__close:hover{
  color: var(--brand, #4b2a88);
}

.paso-modal__title{
  padding: 28px 60px 14px 32px;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--brand, #4b2a88);
  border-bottom: 3px solid var(--brand, #4b2a88);
}

.paso-modal__body{
  display: grid;
  /* ficha un poco más ancha que el texto */
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  padding: 24px 32px;
}

.paso-modal__texto{
  font-size: .97rem;
  line-height: 1.75;
  color: var(--text-dark, #1a1a1a);
}
.paso-modal__texto p{
  margin: 0 0 14px;
}

.paso-modal__ficha{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.paso-modal__ficha iframe{
  width: 100%;
  height: 411px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0,0,0,.16);
  object-fit: contain;
}

.paso-modal__ficha-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--brand, #4b2a88);
  text-decoration: none;
}
.paso-modal__ficha-link:hover{
  text-decoration: underline;
}

.paso-modal__footer{
  display: flex;
  justify-content: space-between;
  padding: 0 32px 28px;
  gap: 16px;
}

.paso-modal__btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s;
  border: 2px solid var(--brand, #4b2a88);
}
.paso-modal__btn--volver{
  background: #fff;
  color: var(--brand, #4b2a88);
}
.paso-modal__btn--volver:hover{
  background: rgba(75,42,136,.08);
}
.paso-modal__btn--detalles{
  background: var(--brand, #4b2a88);
  color: #fff;
}
.paso-modal__btn--detalles:hover{
  background: #3a1f6e;
}

/* Modal responsive */
@media (max-width: 768px){
  .paso-modal__content{
    width: 96%;
    max-height: 92vh;
    border-radius: 10px;
  }
  .paso-modal__title{
    font-size: 1.3rem;
    padding: 20px 50px 12px 20px;
  }
  .paso-modal__body{
    grid-template-columns: 1fr;
    padding: 16px 20px;
  }
  .paso-modal__ficha iframe{
    height: 400px;
    max-height: 50vh;
  }
  .paso-modal__footer{
    padding: 0 20px 20px;
    flex-wrap: wrap;
  }
  .paso-modal__btn{
    flex: 1;
    justify-content: center;
    min-width: 140px;
  }
}
