/* === Base wrapper === */
.cel-wrap {
  max-width: 960px;
  margin: 0 auto;/*mod*/
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #333;
  padding: 28px 28px;
  background: #f7f8fa;
  border: 1px solid #e5e7eb; /* Borde sutil */
  border-radius: 14px;       /* Esquinas redondeadas */
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* === Títulos y secciones === */
.cel-wrap h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 14px;
  color: #293966;
}

.cel-wrap .section {
  margin-top: 24px;
  padding-top: 8px;
}

/* === Filas y columnas === */
.cel-wrap .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px 28px; /* más espacio entre columnas y filas */
  margin-bottom: 28px;
}

/* === Grupos de campos === */
.cel-wrap .form-group,
.cel-wrap .field,
.cel-wrap .form-row {
  margin-bottom: 18px;
}

.cel-wrap label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

/* === Inputs y textareas === */
.cel-wrap input[type=text],
.cel-wrap input[type=email],
.cel-wrap input[type=number],
.cel-wrap input[type=password],
.cel-wrap input[type=date],
.cel-wrap input[type=file],
.cel-wrap textarea,
.cel-wrap select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 12px;
  box-sizing: border-box;
  font-size: 15px;
}
.cel-wrap input:focus,
.cel-wrap textarea:focus,
.cel-card select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.cel-wrap textarea {
  min-height: 90px;
  resize: vertical;
}

/* === Radios y checkboxes === */
.cel-wrap .inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.cel-wrap .inline-controls label {
  margin-bottom: 0;
  font-weight: 500;
}

/* === Botón === */
.cel-wrap .btn {
  background: #E52B2B;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  transition: background 0.2s ease-in-out;
  margin-top: 8px;
}

.cel-wrap .btn:hover {
  background: #E52B2B;
}

/* === Mensajes de estado === */
.cel-wrap .ok {
  color: #155724;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 10px;
}

.cel-wrap .ko,
.cel-wrap .error {
  color: #721c24;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* === Responsivo === */
@media (max-width: 720px) {
  .cel-wrap .row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cel-wrap h2 {
    text-align: center;
  }

  .cel-wrap form{
    margin: 16px 12px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0);
  }

  .cel-wrap .btn {
    width: 100%;
  }
}


/* Ocultar mensajes hasta que el JS los muestre */
.cel-wrap .error,
.cel-wrap #ok,
.cel-wrap #ko {
  display: none;
}

/* Hero / Intro */
.cel-intro {
  text-align: center;
  border-radius: 16px;
  padding: 48px 40px;        /* 🔹 más aire interno */
  max-width: 860px;          /* 🔹 más ancho */
  margin: 0 auto 2rem auto;  /* centrado */
}
.cel-intro h2 {
  color: #293966;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
/* Contenedor de logos */
.cel-logos{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  flex-wrap:wrap;              /* por si en móvil necesitan saltar de línea */
  margin-bottom:18px;
}

/* === Stepper de progreso con iconos === */
.cel-progress {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 28px auto;
  position: relative;
  padding-top: 26px;   /* espacio para los iconos */
}

/* Línea gris de fondo */
.cel-progress-line {
  position: absolute;
  top: 26px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: #e5e7eb;
  border-radius: 999px;
}

/* Línea roja de progreso (se anima con JS) */
.cel-progress-bar {
  position: absolute;
  top: 26px;
  left: 10%;
  height: 3px;
  width: 0%;
  background: #E52B2B;
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Contenedor de pasos */
.cel-progress-steps {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
}

/* Cada paso */
.cel-progress-step {
  text-align: center;
  flex: 1;
}

/* Icono circular (contiene el SVG) */
.cel-progress-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 6px auto;
  border-radius: 999px;
  border: 2px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.04);
}

/* SVG dentro del icono */
.cel-progress-icon svg {
  width: 18px;
  height: 18px;
  stroke: #6b7280;
  fill: none;
  stroke-width: 1.8;
}

/* Iconos activos / completados (círculo rojo + icono blanco) */
.cel-progress-step.is-active .cel-progress-icon,
.cel-progress-step.is-complete .cel-progress-icon {
  border-color: #E52B2B;
  background: #E52B2B;
}

.cel-progress-step.is-active .cel-progress-icon svg,
.cel-progress-step.is-complete .cel-progress-icon svg {
  stroke: #ffffff;
}

/* Etiqueta del paso */
.cel-progress-label {
  font-size: 12px;
  line-height: 1.3;
  color: #4b5563;
}

/* Paso completado: etiqueta un poco más suave */
.cel-progress-step.is-complete .cel-progress-label {
  color: #9ca3af;
}


/* Responsive: compactar un poco en móvil */
@media (max-width: 640px) {
  .cel-progress {
    max-width: 100%;
    padding-top: 24px;
  }
  .cel-progress-label {
    font-size: 11px;
  }
  .cel-progress-line,
  .cel-progress-bar {
    left: 12%;
    right: 12%;
  }
}





/* Tamaño controlado de logos (IMG y SVG) */
.cel-logos img,
.cel-logos svg,
.cel-logo{
  height:auto !important;
  width:auto !important;
  max-height: clamp(36px, 6vw, 64px) !important; /* móvil→36px, desktop→hasta 64px */
  max-width: min(32vw, 220px) !important;        /* evita desborde horizontal */
  object-fit: contain;
}
.cel-logos img:hover {
  transform: scale(1.05);
}

.cel-lead {
  font-size: 1rem;
  color: #7a7a7a;
  margin-bottom: 1.25rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.cel-bullets {
  text-align: left;
  display: inline-block;
  margin: 0 auto 1.25rem;
  color: #4b5563;
}
.cel-bullets li { margin:6px 0; }
.cel-cta .btn {
  font-weight: 600;
  padding: 14px 26px;
  background-color: #E52B2B;
  border-radius: 10px;
  color: white;
  transition: background 0.2s ease;
}

.cel-cta .btn:hover {
  background-color: #b52525;
}

/* Paso: tipo */
.cel-step h2 { text-align:center; }
.cel-cards {
  display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:18px; margin-top:12px;
}
.cel-card {
  background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:18px;
  cursor:pointer; box-shadow:0 6px 16px rgba(0,0,0,.06);
}
.cel-card:hover { border-color:#3b82f6; box-shadow:0 8px 20px rgba(59,130,246,.15); }
.cel-card-title { font-weight:700; font-size:18px; margin-bottom:6px; color:#111827; }
.cel-card-text { color:#4b5563; font-size:14px;font-weight: bold:500; }

/* Botón alternativo */
.btn.btn-secondary { background:#6b7280; }
.btn.btn-secondary:hover { background:#4b5563; }

/* ==== Ajustes SOLO para el paso .cel-step ==== */

/* Mismo “box” que la intro (ancho, padding, sombra) */
.cel-step{
  max-width: 860px;                 /* igual que la intro */
  margin: 0 auto 2rem auto;         /* centrado */
  background: #f9fafb;
  border-radius: 16px;
  padding: 48px 40px;
}
/* Evita que scroll-margin-top sume desplazamiento extra */
.cel-step { scroll-margin-top: 0 !important; }

/* Título centrado (por si otro CSS lo cambia) */
.cel-step h2{
  text-align:center;
  margin-top: 0;
}

/* Dos columnas en desktop, una en móvil */
.cel-step .cel-cards{
  display:grid;
  gap:18px;
  grid-template-columns: 1fr;       /* móvil */
}
@media (min-width: 640px){
  .cel-step .cel-cards{ grid-template-columns: 1fr 1fr; }  /* desktop */
}

/* Tarjetas con altura y centro consistentes */
.cel-step .cel-card{
  text-align:center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height: 104px;
  background:#fff;                    /* fondo siempre blanco */
  color:#111827;                      /* texto base */
  border:1px solid #e5e7eb;
  transition: box-shadow .2s ease, border-color .2s ease, color .15s ease;
}

/* Mantener logos consistentes dentro de .cel-step (sin tocar los globales) */
.cel-step .cel-logos{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
/* Hover sutil (no cambia fondo) */
.cel-step .cel-card:hover{
  border-color:#ef4444;
  box-shadow:0 8px 20px rgba(239,68,68,.12);
}

/* Evita “autoselection” rojo del tema en focus/active */
.cel-step .cel-card:focus,
.cel-step .cel-card:focus-visible,
.cel-step .cel-card:active{
  background:#fff !important;         /* que no se pinte */
  border-color:#2563eb;               /* aro azul suave */
  box-shadow:0 0 0 3px rgba(37,99,235,.15);
  outline:0;
}

/* Aclarar colores del texto cuando hay focus */
.cel-step .cel-card:focus .cel-card-title,
.cel-step .cel-card:focus-visible .cel-card-title{
  color:#1f2937;                      /* ligeramente más claro que #111827 */
}
.cel-step .cel-card:focus .cel-card-text,
.cel-step .cel-card:focus-visible .cel-card-text{
  color: #f7f8fa;                     /* gris claro para el cuerpo */
}

/* Por si algún tema fuerza color en :active */
.cel-step .cel-card:active .cel-card-title{ color:#1f2937 !important; }
.cel-step .cel-card:active .cel-card-text{ color:#4b5563 !important; }


/* Si no quieres ver contorno en el contenedor general cuando le damos focus programático */
.cel-wrap:focus{ outline:none; }

.cel-step .cel-logos img,
.cel-step .cel-logos svg,
.cel-step .cel-logo{
  height:auto !important;
  width:auto !important;
  max-height: clamp(36px, 6vw, 64px) !important;
  max-width: min(32vw, 220px) !important;
  object-fit: contain;
}


/* Responsivo */
@media (max-width: 720px) {
  .cel-intro {
    padding: 32px 24px;
  }
  .cel-logos img { height:28px; }
}

/* =========================
   RESPONSIVE SOLO .cel-step
   =========================*/

/* Móvil hasta 640px */
@media (max-width: 640px){

  /* caja principal más compacta y con safe-areas (iOS) */
  .cel-step{
    padding: 24px max(16px, env(safe-area-inset-left)) 28px max(16px, env(safe-area-inset-right));
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(0,0,0,.06);
  }

  /* título más legible sin ocupar 2 líneas innecesarias */
  .cel-step h2{
    font-size: 20px;
    line-height: 1.25;
    margin: 8px 0 14px;
  }

  /* logos más contenidos */
  .cel-step .cel-logos{
    gap: 14px;
    margin-bottom: 10px;
  }
  .cel-step .cel-logos img,
  .cel-step .cel-logos svg,
  .cel-step .cel-logo{
    max-height: 32px !important;     /* antes podía llegar a 64px */
    max-width: 42vw !important;       /* que no desborde en ancho */
  }
 

  /* grid de opciones: una sola columna y ancho completo */
  .cel-step .cel-cards{
    grid-template-columns: 1fr !important;
    gap: 12px;
    align-items: stretch;
  }

  /* tarjetas más delgadas y sin altura mínima grande */
  .cel-step .cel-card{
    min-height: auto;
    padding: 16px 14px;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,.06);
  }

  /* tipografías dentro de la tarjeta */
  .cel-step .cel-card-title{ font-size: 16px; margin-bottom: 4px; }
  .cel-step .cel-card-text{ font-size: 13px; }

}

/* Tablets pequeñas (641–768px): dos columnas pero con tarjetas más compactas */
@media (min-width: 641px) and (max-width: 768px){

  .cel-step{
    padding: 28px 22px 32px;
    border-radius: 14px;
  }

  .cel-step .cel-cards{
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .cel-step .cel-card{
    min-height: 112px;
    padding: 18px 16px;
  }

  .cel-step .cel-logos img,
  .cel-step .cel-logos svg,
  .cel-step .cel-logo{
    max-height: 40px !important;
  }
}

/* En desktop mantenemos tu ancho y estética actuales;
   solo afinamos el spacing del box para que no “caiga” tanto */
@media (min-width: 769px){
  .cel-step{ padding-top: 40px; padding-bottom: 40px; }
}

/* =======================
   AJUSTES RESPONSIVE CEL
   (solo móvil / tablet)
   ======================= */

/* 1) Título principal más flexible en todas las resoluciones */
.cel-intro h2{
  font-size: clamp(1.5rem, 4.2vw, 2.2rem); /* 24px en móvil → máx. ~35px en desktop */
  line-height: 1.25;
}

/* 2) MÓVIL PEQUEÑO (hasta 640px) */
@media (max-width: 640px){

  /* caja general del formulario un poco más compacta */
  .cel-wrap{
    padding: 20px 14px;
  }

  /* bloque de intro (título + texto) con menos padding lateral */
  .cel-intro{
    padding: 24px 18px;
    margin-bottom: 1.5rem;
  }

  /* título de la sección de tarjetas “¿Qué tipo de cliente eres?” */
  .cel-step h2{
    font-size: 1.25rem;  /* ~20px */
    line-height: 1.25;
  }

  /* tarjetas Particular / Empresa más bajas y cómodas en móvil */
  .cel-step .cel-card{
    min-height: auto;
    padding: 14px 12px;
  }

  .cel-step .cel-card-title{
    font-size: 1rem;     /* 16px */
    margin-bottom: 4px;
  }

  .cel-step .cel-card-text{
    font-size: 0.85rem;  /* ~14px */
  }
}

/* 3) TABLET (641–900px) */
@media (min-width: 641px) and (max-width: 900px){

  .cel-intro{
    padding: 32px 28px;
  }

  .cel-step .cel-card{
    min-height: 110px;
    padding: 16px 14px;
  }
}
