/* iaconnect/assets/css/iaconnect.css */
/* Estilos específicos para el módulo iaconnect */

/* Colores corporativos JB Enterprise Group */
:root {
  --ia-red: #C41E33;
  --ia-red-dark: #971734;
  --ia-black: #222221;
  --ia-gray-light: #F2F1F2;
  --ia-white: #FFFFFF;
  --ia-success: #27AE60;
  --ia-error: #E74C3C;
}

/* Body */
.iaconnect-body {
  font-family: 'Nunito', sans-serif;
  background: var(--ia-gray-light);
  background-image: url('../img/fondo-iaconnect.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ia-black);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

/* Container (ancho fijo para TODOS los pasos; el paso DNI se ensancha por separado) */
.iaconnect-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  padding: 20px;
}

/* Override para el paso participante: permitir mayor ancho */
#paso-participante {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Layout del participante (las imágenes flotantes ya no están aquí: viven en el <body>) */
.iaconnect-participante-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  padding: 60px 0;
}

/* Imágenes flotantes: están en el <body>, ocultas por defecto y visibles
   solo en el paso 2 (cuando el body tiene la clase .is-step2).
   Al no tener ningún padre con animación/transform, su position:fixed
   siempre es respecto a la pantalla y no "saltan" al aparecer. */
.iaconnect-float-image {
  position: fixed;
  width: 520px;
  height: 620px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;               /* sobre el canvas de humo (2), bajo el contenedor (10) */
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

@media (min-width: 769px) {
  .is-step2 .iaconnect-float-image {
    display: flex;
    opacity: 0.9;
  }
}

.iaconnect-float-left {
  left: 120px;
  top: 45%;
  transform: translateY(-50%);
}

.iaconnect-float-right {
  right: 120px;
  top: 45%;
  transform: translateY(-50%);
}

.iaconnect-float-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Animación de flotación */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Responsive para el layout del participante */
/* Pantallas pequeñas de PC (1024px - 1366px) */
@media (max-width: 1366px) {
  .iaconnect-participante-layout {
    max-width: 900px;
    padding: 60px 60px;
  }

  .iaconnect-float-image {
    width: 360px;
    height: 440px;
  }

  .iaconnect-float-left {
    left: 20px;
  }

  .iaconnect-float-right {
    right: 20px;
  }
}

/* Pantallas medianas de PC (1367px - 1600px) */
@media (min-width: 1367px) and (max-width: 1600px) {
  .iaconnect-participante-layout {
    max-width: 1000px;
    padding: 60px 80px;
  }

  .iaconnect-float-image {
    width: 440px;
    height: 530px;
  }

  .iaconnect-float-left {
    left: 40px;
  }

  .iaconnect-float-right {
    right: 40px;
  }
}

/* Pantallas grandes de PC (1601px - 1920px) */
@media (min-width: 1601px) and (max-width: 1920px) {
  .iaconnect-participante-layout {
    max-width: 1100px;
    padding: 60px 100px;
  }

  .iaconnect-float-image {
    width: 520px;
    height: 620px;
  }

  .iaconnect-float-left {
    left: 60px;
  }

  .iaconnect-float-right {
    right: 60px;
  }
}

/* Pantallas muy grandes (>1920px) */
@media (min-width: 1921px) {
  .iaconnect-participante-layout {
    max-width: 1200px;
    padding: 60px 120px;
  }

  .iaconnect-float-image {
    width: 580px;
    height: 680px;
  }

  .iaconnect-float-left {
    left: 80px;
  }

  .iaconnect-float-right {
    right: 80px;
  }
}

/* Pantallas pequeñas (<1024px) */
@media (max-width: 1023px) {
  .iaconnect-participante-layout {
    max-width: 700px;
    padding: 40px 40px;
  }

  .iaconnect-float-image {
    width: 300px;
    height: 380px;
  }

  .iaconnect-float-left {
    left: 10px;
  }

  .iaconnect-float-right {
    right: 10px;
  }
}

/* Móviles y tablets pequeñas (<768px) */
@media (max-width: 768px) {
  .iaconnect-participante-layout {
    padding: 30px 20px;
  }

  .iaconnect-float-image {
    display: none; /* Ocultar imágenes en móviles */
  }
}

/* Wrapper exclusivo para el paso DNI que permite mayor ancho */
.iaconnect-dni-wrapper {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

/* Layout de dos columnas para el paso DNI */
.iaconnect-dni-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

/* Columna de imagen */
.iaconnect-dni-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.iaconnect-dni-image picture {
  display: block;
  width: 100%;
}

.iaconnect-dni-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Columna del formulario */
.iaconnect-dni-form {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#paso-dni .iaconnect-dni-form .iaconnect-card {
  margin: 0;
  width: 100%;
  max-width: 440px;
}

/* ===== ESCRITORIO: solo el paso DNI se ensancha ===== */
@media (min-width: 769px) {
  #paso-dni {
    /* ancho propio, independiente del contenedor de 600px */
    width: min(1400px, calc(100vw - 40px));
    /* centra el paso respecto a la pantalla sin usar transform
       (para no chocar con la animación fadeIn) */
    margin-left: calc(50% - min(50vw - 20px, 700px));
  }

  .iaconnect-dni-layout {
    justify-content: space-between;
    gap: 40px;
  }

  /* Imagen más grande y más pegada a la izquierda */
  .iaconnect-dni-image {
    flex: 1.8;
    justify-content: flex-start;
    margin-left: -20px;
  }

  .iaconnect-dni-img {
    max-width: 900px;
  }

  /* Formulario a la derecha */
  .iaconnect-dni-form {
    flex: 1;
    justify-content: flex-end;
  }
}

/* ===== MÓVIL: se apila y usa testing-responsive.png (vía <picture>) ===== */
@media (max-width: 768px) {
  .iaconnect-body {
    background-image: url('../img/testing-responsive.png');
  }

  .iaconnect-dni-layout {
    flex-direction: column;
    gap: 24px;
  }

  .iaconnect-dni-image {
    order: -1;
    width: 100%;
    max-width: 420px;
  }

  .iaconnect-dni-form {
    width: 100%;
  }

  #paso-dni .iaconnect-dni-form .iaconnect-card {
    max-width: 100%;
  }
}

/* Header */
.iaconnect-header {
  text-align: center;
  margin-bottom: 30px;
}

.iaconnect-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ia-red);
  margin: 0 0 10px 0;
  letter-spacing: -1px;
}

.iaconnect-subtitle {
  font-size: 1.1rem;
  color: var(--ia-black);
  opacity: 0.8;
  margin: 0;
}

/* Steps */
.iaconnect-step {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Paso 2: animar solo opacidad (sin transform) */
#paso-participante.iaconnect-step {
  animation: fadeInOpacity 0.3s ease-in;
}

@keyframes fadeInOpacity {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Card */
.iaconnect-card {
  background: var(--ia-white);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 5px;
  text-align: center;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  min-height: 320px;
}

/* Card paso DNI - más compacto */
#paso-dni .iaconnect-card {
  max-width: 400px;
  margin: 0 auto;
}

/* Responsive: adaptar el formulario DNI centrado */
@media (max-width: 600px) {
  .iaconnect-body {
    padding: 16px;
  }

  .iaconnect-dni-centered {
    padding: 0;
    max-width: 100%;
  }

  .iaconnect-dni-centered .iaconnect-card {
    padding: 24px 20px;
    border-radius: 12px;
  }
}

@media (max-width: 768px) {
  .iaconnect-body {
    background-image: url('../img/testing-responsive.png');
  }
}

/* Card header para badge y DNI */
.iaconnect-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

/* Display del DNI */
.iaconnect-dni-display {
  font-size: 0.9rem;
  color: var(--ia-black);
  font-weight: 500;
}

/* Campo de teléfono con intl-tel-input */
.iaconnect-tel-field {
  position: relative;
}

.iaconnect-tel-field .iti {
  width: 100%;
}

/* No sobrescribir la posición del contenedor de banderas - intl-tel-input lo maneja automáticamente */
.iaconnect-tel-field .iti__flag-container {
  /* Dejar que intl-tel-input controle la posición */
}

/* Configurar las banderas desde CDN - necesario para que se muestren */
.iti__flag {
  background-image: url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.16/img/flags.png');
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .iti__flag {
    background-image: url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.16/img/flags@2x.png');
  }
}

.iaconnect-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ia-black);
  margin: 0 0 10px 0;
}

/* Contenedor del título con fondo rojo brillante centrado */
.iaconnect-title-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 20px;
  background: linear-gradient(135deg, #FF1744 0%, #D50000 100%);
  border-radius: 30px;
  box-shadow: 0 0 20px rgba(255, 23, 68, 0.6), 0 0 40px rgba(255, 23, 68, 0.3);
  margin-bottom: 15px;
}

.iaconnect-title-wrapper .iaconnect-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.iaconnect-card-desc {
  font-size: 0.95rem;
  color: var(--ia-black);
  opacity: 0.7;
  margin: 0 0 25px 0;
}

/* Badge */
.iaconnect-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.iaconnect-badge.cliente {
  background: var(--ia-red);
  color: var(--ia-white);
}

.iaconnect-badge.invitado {
  background: var(--ia-black);
  color: var(--ia-white);
}

/* Form */
.iaconnect-form {
  margin: 0;
}

.iaconnect-field {
  margin-bottom: 12px;
}

.iaconnect-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.iaconnect-input:focus {
  outline: none;
  border-color: var(--ia-red);
  box-shadow: 0 0 0 3px rgba(196, 30, 51, 0.1);
}

.iaconnect-input.is-invalid {
  border-color: var(--ia-error);
}

.iaconnect-error {
  color: var(--ia-error);
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.iaconnect-error.show {
  display: block;
}

/* Buttons */
.iaconnect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.iaconnect-btn-primary {
  background: var(--ia-red);
  color: var(--ia-white);
}

.iaconnect-btn-primary:hover {
  background: var(--ia-red-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196, 30, 51, 0.3);
}

.iaconnect-btn-primary:disabled {
  background: #CCC;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.iaconnect-btn-secondary {
  background: var(--ia-gray-light);
  color: var(--ia-black);
  margin-top: 10px;
}

.iaconnect-btn-secondary:hover {
  background: #E5E5E5;
}

.iaconnect-btn-add {
  background: var(--ia-black);
  color: var(--ia-white);
  margin-top: 15px;
}

.iaconnect-btn-add:hover {
  background: #333;
}

.iaconnect-btn-submit {
  margin-top: 20px;
  padding: 16px 32px;
  font-size: 1.1rem;
}

.iaconnect-btn-loader {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Amigos Section */
.iaconnect-amigos-section {
  background: var(--ia-white);
  border-radius: 16px;
  padding: 30px;
  margin-top: 15px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  min-height: 320px;
  position: relative;
  z-index: 10;
}

.iaconnect-amigos-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ia-black);
  margin: 0 0 8px 0;
}

.iaconnect-amigos-desc {
  font-size: 0.9rem;
  color: var(--ia-black);
  opacity: 0.7;
  margin: 0 0 20px 0;
}

/* Amigo Card */
.iaconnect-amigo-card {
  background: var(--ia-gray-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.iaconnect-amigo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.iaconnect-amigo-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ia-red);
}

.iaconnect-amigo-remove {
  background: none;
  border: none;
  color: var(--ia-error);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: opacity 0.2s;
}

.iaconnect-amigo-remove:hover {
  opacity: 0.7;
}

.iaconnect-amigo-remove:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Consentimiento */
.iaconnect-consent {
  margin: 10px 0;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.iaconnect-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.iaconnect-checkbox-label input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.iaconnect-checkbox-text {
  font-size: 0.9rem;
  color: white;
  line-height: 1.5;
  font-weight: bold;
}

.iaconnect-link {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.iaconnect-link:hover {
  text-decoration: underline;
}

/* Toast notifications */
.iaconnect-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  z-index: 1000;
  animation: toastIn 0.3s ease-out;
  max-width: 350px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.iaconnect-toast-error {
  background: var(--ia-error);
  color: var(--ia-white);
}

.iaconnect-toast-success {
  background: var(--ia-success);
  color: var(--ia-white);
}

/* Icon */
.iaconnect-icon {
  font-style: normal;
  font-size: 1.2rem;
  line-height: 1;
}

/* Responsive */
@media (max-width: 640px) {
  .iaconnect-body {
    background-image: url('../img/fondo-responsive.jpg');
  }

  .iaconnect-title {
    font-size: 2rem;
  }

  .iaconnect-card {
    padding: 20px;
  }

  .iaconnect-amigos-section {
    padding: 20px;
  }

  .iaconnect-amigo-card {
    padding: 15px;
  }

  .iaconnect-btn {
    padding: 12px 24px;
  }

  .iaconnect-modal-content {
    margin: 10px;
    max-height: 90vh;
  }
}

/* Modal */
.iaconnect-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.iaconnect-modal-content {
  background: var(--ia-white);
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.iaconnect-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #E0E0E0;
}

.iaconnect-modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ia-black);
  margin: 0;
}

.iaconnect-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--ia-black);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.iaconnect-modal-close:hover {
  background: var(--ia-gray-light);
}

.iaconnect-modal-body {
  padding: 25px;
  overflow-y: auto;
  flex: 1;
}

.iaconnect-terminos-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ia-black);
}

.iaconnect-terminos-text h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ia-red);
  margin: 0 0 15px 0;
}

.iaconnect-terminos-text h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ia-black);
  margin: 20px 0 10px 0;
}

.iaconnect-terminos-text p {
  margin: 0 0 10px 0;
}

.iaconnect-terminos-text ul {
  margin: 0 0 15px 0;
  padding-left: 20px;
}

.iaconnect-terminos-text li {
  margin-bottom: 8px;
}

.iaconnect-modal-footer {
  padding: 20px 25px;
  border-top: 1px solid #E0E0E0;
  display: flex;
  justify-content: flex-end;
}

/* ───────────────────────────────────────────────────────────────────────── */
/* DISEÑO RESPONSIVE EXCLUSIVO PARA CELULARES */
/* ───────────────────────────────────────────────────────────────────────── */

/* Fondo de pantalla móvil con testing-responsive.png */
@media (max-width: 768px) {
  .iaconnect-body {
    background-image: url('../img/testing-responsive.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: scroll;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: flex-start;
    padding: 0;
  }

  /* Container móvil */
  .iaconnect-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    z-index: 10;
  }

  /* Paso DNI - layout vertical móvil */
  .iaconnect-dni-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .iaconnect-dni-layout {
    flex-direction: column;
    gap: 20px;
    padding: 20px 16px;
  }

  /* Ocultar imagen del layout original (usaremos la imagen superior e inferior) */
  .iaconnect-dni-image {
    display: none;
  }

  /* Imagen superior móvil: testing_responsive.png */
  .iaconnect-dni-wrapper::before {
    content: '';
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 250px;
    background-image: url('../img/testing_responsive.png');
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
    margin: 30px auto 20px auto;
  }

  /* Contenedor de registro móvil */
  .iaconnect-dni-form {
    width: 100%;
    max-width: 85%;
    margin: 0 auto;
  }

  .iaconnect-card {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    padding: 24px 20px;
    margin: 0;
  }

  .iaconnect-title-wrapper {
    text-align: center;
  }

  .iaconnect-card-title {
    font-size: 1.5rem;
    text-align: center;
  }

  .iaconnect-card-desc {
    font-size: 0.95rem;
    text-align: center;
  }

  /* Imagen inferior móvil: ponente_responsive.png */
  .iaconnect-dni-wrapper::after {
    content: '';
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 150px;
    background-image: url('../img/ponente_responsive.png');
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    margin: 20px auto 0 auto;
  }

  /* Paso participante - layout vertical móvil */
  #paso-participante {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .iaconnect-participante-layout {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
    margin: 0;
  }

  /* Ocultar imágenes flotantes en móvil */
  .iaconnect-float-image {
    display: none;
  }

  /* Card del participante móvil */
  .iaconnect-participante-layout .iaconnect-card {
    width: 100%;
    max-width: 85%;
    border-radius: 12px;
    padding: 24px 20px;
    margin: 0 auto;
  }

  /* Imagen superior para paso participante móvil: anuncio_responsive.png */
  .iaconnect-participante-layout::before {
    content: '';
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 250px;
    background-image: url('../img/anuncio_responsive.png');
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
    margin: 15px auto 10px auto;
  }

  /* Imagen inferior para paso participante móvil: sorteo_responsive.png */
  .iaconnect-participante-layout::after {
    content: '';
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 200px;
    background-image: url('../img/sorteo_responsive.png');
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    margin: 20px auto 0 auto;
  }

  /* Sección de amigos móvil */
  .iaconnect-amigos-section {
    width: 100%;
    max-width: 85%;
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto 0 auto;
  }

  .iaconnect-amigos-title {
    font-size: 1.2rem;
    text-align: center;
  }

  .iaconnect-amigos-desc {
    font-size: 0.9rem;
    text-align: center;
  }

  /* Consentimiento móvil */
  .iaconnect-consent {
    margin: 20px 0;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
  }

  .iaconnect-checkbox-text {
    font-size: 1rem;
    text-align: center;
    display: block;
  }

  /* Botón submit móvil */
  .iaconnect-btn-submit {
    width: 100%;
    max-width: 80%;
    margin: 20px auto 0 auto;
    display: block;
  }

  /* Botón flotante WhatsApp móvil */
  .whatsapp-float-button {
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
  }

  .whatsapp-float-button svg {
    width: 28px;
    height: 28px;
  }

  /* Modal móvil */
  .iaconnect-modal-content {
    margin: 10px;
    max-height: 90vh;
    border-radius: 12px;
  }

  .iaconnect-modal-title {
    font-size: 1.1rem;
  }

  /* Toast móvil */
  .iaconnect-toast {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }
}


/* ============================================================
   CONTADOR DEL EVENTO
   Escritorio: fijo y centrado en la pantalla, por encima de todo.
   Celular (<=768px): en el flujo, encima de la tarjeta "Registrate"
   (el JavaScript lo mueve dentro de #paso-dni .iaconnect-dni-form)
   ============================================================ */

/* ---------- Escritorio ---------- */
.iaconnect-countdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;                 /* por encima de todo */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-radius: 18px;
  background: rgba(15, 15, 25, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  text-align: center;
  pointer-events: none;          /* no bloquea clics en lo que hay debajo */
  animation: iaconnect-countdown-in 0.6s ease-out both;
}

.iaconnect-countdown-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

.iaconnect-countdown-grid {
  display: flex;
  gap: 8px;
}

.iaconnect-countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.iaconnect-countdown-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums; /* evita que los números "salten" */

  /* Dorado brillante */
  color: #FFD700; /* respaldo si el navegador no soporta el degradado */
  background: linear-gradient(180deg, #FFF3A0 0%, #FFD700 45%, #E8A800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.55));
}

.iaconnect-countdown-label {
  margin-top: 5px;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

/* Estado "en vivo" */
.iaconnect-countdown.is-live .iaconnect-countdown-title {
  font-size: 1.2rem;
  color: #FFD700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

@keyframes iaconnect-countdown-in {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* ---------- Celular y tablet pequeña (<=768px) ---------- */
@media (max-width: 768px) {
  /* El contador deja de ser fijo: queda en el flujo, encima de la tarjeta */
  .iaconnect-countdown {
    position: static;
    transform: none;
    animation: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 auto 14px auto;
    padding: 12px 10px;
    gap: 8px;
  }

  .iaconnect-countdown-title  { font-size: 0.7rem; }
  .iaconnect-countdown-grid   { gap: 6px; width: 100%; }
  .iaconnect-countdown-item   { flex: 1; min-width: 0; padding: 6px 2px; }
  .iaconnect-countdown-number { font-size: 1.3rem; }
  .iaconnect-countdown-label  { font-size: 0.5rem; }

  .iaconnect-countdown.is-live .iaconnect-countdown-title {
    font-size: 1rem;
  }

  /* La columna del formulario se apila: contador arriba, tarjeta abajo */
  .iaconnect-dni-form {
    flex-direction: column;
    justify-content: flex-start;
    margin-top: 12px;   /* baja un poco todo el conjunto */
  }
}

/* ---------- Celulares muy pequeños (<=360px) ---------- */
@media (max-width: 360px) {
  .iaconnect-countdown          { padding: 10px 8px; }
  .iaconnect-countdown-grid     { gap: 4px; }
  .iaconnect-countdown-number   { font-size: 1.1rem; }
  .iaconnect-countdown-label    { font-size: 0.45rem; letter-spacing: 0.03em; }
}

/* Oculto cuando ya no está el paso 1 (DNI) */
.iaconnect-countdown.is-hidden-step {
  display: none !important;
}