* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

body {
  min-height: 100vh;
  background: rgb(245, 245, 245);
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.contenedor {
  display: flex;
  background: white;
  height: calc(100vh - 64px);
  width: 100%;
  overflow: hidden;
  align-items: stretch;
}

.panel-registro {
  width: 45%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  height: 100%;
}

.formulario-contenedor {
  max-width: 28rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 5px 7px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1f2937;
  text-align: center;
}

.subtitulo {
  color: #6b7280;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  text-align: center;
}

/* Estilos para el paso de selección de usuario */
.user-selection-step {
  display: block;
  text-align: center;
}

.user-type-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.user-type-card {
  padding: 2rem;
  border: 2px solid #e1e7ef;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.user-type-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.03) 0%,
    rgba(59, 130, 246, 0.08) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.user-type-card:hover {
  border-color: #2563eb;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}

.user-type-card:hover::before {
  opacity: 1;
}

.user-type-card i {
  font-size: 3rem;
  color: #2563eb;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.user-type-card:hover i {
  transform: scale(1.1);
  color: #1d4ed8;
}

.user-type-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* Estilos para el formulario de registro */
.register-form-step {
  display: none;
}

.back-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  z-index: 10;
}

.back-btn:hover {
  color: #2563eb;
  background: #f3f4f6;
}

.back-btn i {
  margin-right: 0.5rem;
}

.user-type-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  background: #f0f9ff;
  color: #2563eb;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.user-type-indicator i {
  margin-right: 0.5rem;
}

.grupo-formulario {
  margin-bottom: 0.75rem;
  position: relative;
}

/* Nuevo estilo para el contenedor de nombre y apellido en una fila */
.nombre-apellido-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.nombre-apellido-row .grupo-formulario {
  flex: 1;
  margin-bottom: 0;
}

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.2rem;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  transition: border-color 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.phone-input {
  display: flex;
  gap: 10px;
}

.phone-input select {
  width: 80px;
}

.phone-input input {
  flex: 1;
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  padding-right: 3rem;
}

.toggle-password {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  width: auto;
  height: auto;
  line-height: 1;
  font-size: 1.1rem;
}

.toggle-password:hover {
  color: #2563eb;
}

.toggle-password:focus {
  outline: none;
}

.toggle-password i {
  display: block;
  font-size: inherit;
  line-height: 1;
  font-style: normal;
  font-weight: 900;
  font-family: "Font Awesome 6 Free";
}

.toggle-password i::before {
  display: inline-block;
}

/* Estilos para términos y condiciones */
.terms-container {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  height: 18px;
  margin-top: 0.125rem;
  cursor: pointer;
  accent-color: #2563eb;
}

.checkbox-wrapper label {
  flex: 1;
  font-size: 0.8125rem;
  color: #4b5563;
  line-height: 1.4;
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper label a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.checkbox-wrapper label a:hover {
  text-decoration: underline;
}

.boton-registrar {
  width: 100%;
  background: #2563eb;
  color: white;
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}

.boton-registrar:hover {
  background: #1d4ed8;
}

.boton-registrar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.divisor {
  position: relative;
  text-align: center;
  margin: 0.75rem 0;
  color: #6b7280;
  font-size: 0.8125rem;
}

.boton-social {
  width: 100%;
  padding: 0.4rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  font-size: 0.8125rem;
}

.boton-social:hover {
  background: #f9fafb;
  transform: translateY(-2px);
}

.boton-social img {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  object-fit: contain;
}

#google-register {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#google-register:hover {
  border-color: #2563eb;
  background: #f9fafb;
  transform: translateY(-2px);
}

#google-register > div {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
}

#apple-register {
  background: #000;
  color: white;
  border: none;
  opacity: 0.5;
  cursor: not-allowed;
}

#apple-register:hover {
  transform: none;
}

.panel-testimonios {
  width: 50%;
  padding: 1.5rem;
  position: relative;
  background: white;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contenedor-testimonios {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.imagen-testimonios {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  min-height: 100%;
  min-width: 100%;
}

.contenido-testimonios {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 80%);
  color: white;
  z-index: 2;
}

.texto-testimonios {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.autor-testimonios {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.testimonio {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  display: none;
  transform: translateX(100%);
}

.testimonio.activo {
  opacity: 1;
  display: block;
  transform: translateX(0);
}

.testimonio.salida {
  opacity: 0;
  transform: translateX(-100%);
}

.info-autor {
  flex-grow: 1;
}

.nombre-autor {
  font-weight: 500;
}

.rol-autor {
  font-size: 0.875rem;
  opacity: 0.8;
}

.botones-navegacion {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.boton-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.boton-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.boton-nav::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 2px solid white;
  border-left: 0;
  border-bottom: 0;
  transform: rotate(45deg);
}

.boton-nav:first-child::before {
  transform: rotate(-135deg);
}

.error-message,
.success-message,
.warning-message {
  text-align: left;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
  display: none;
}

.error-message {
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.success-message {
  color: #22c55e;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.warning-message {
  color: #f59e0b;
  background: #fefce8;
  border: 1px solid #fde68a;
}

.general-error-message {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
  display: none;
}

.footer-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: #6b7280;
  padding: 0.75rem 0;
}

.footer-link a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.footer-link a:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  .contenedor {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 56px);
  }

  .panel-registro,
  .panel-testimonios {
    width: 100%;
    padding: 1rem;
  }

  .formulario-contenedor {
    max-width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .imagen-testimonios {
    height: 200px !important;
  }

  .user-type-cards {
    flex-direction: column;
    gap: 0.75rem;
  }

  .user-type-card {
    padding: 1.5rem;
  }

  .user-type-card i {
    font-size: 2.5rem;
  }

  /* Mantener nombre y apellido en columna en móviles */
  .nombre-apellido-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .nombre-apellido-row .grupo-formulario {
    margin-bottom: 0;
  }

  .phone-input {
    flex-direction: column;
  }

  .phone-input select {
    width: 100%;
  }

  /* Asegurar que el footer-link sea visible en mobile */
  .footer-link {
    text-align: center;
    margin-top: 1.25rem;
    padding: 1rem 0 0.5rem 0;
    font-size: 0.875rem;
    border-top: 1px solid #e5e7eb;
    display: block;
  }

  /* Ajustar posición del user-type-indicator en mobile */
  .user-type-indicator {
    position: static;
    margin: 0 auto 1rem auto;
    display: inline-flex;
  }

  /* Ajustar botón de atrás en mobile */
  .back-btn {
    position: static;
    display: inline-flex;
    margin-bottom: 1rem;
  }
}

@media (max-width: 320px) {
  .formulario-contenedor {
    padding: 1rem;
  }

  .user-type-card {
    padding: 1rem 0.75rem;
  }

  .user-type-card i {
    font-size: 1.75rem;
  }

  .grupo-formulario label {
    font-size: 0.75rem;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"],
  input[type="tel"],
  select {
    font-size: 0.75rem;
  }

  .checkbox-wrapper label {
    font-size: 0.75rem;
  }

  .footer-link {
    font-size: 0.8125rem;
    padding: 0.75rem 0 0.25rem 0;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .contenedor {
    flex-direction: column;
    min-height: auto;
  }

  .panel-registro,
  .panel-testimonios {
    width: 100%;
    padding: 2rem;
  }

  .formulario-contenedor {
    max-width: 24rem;
    padding: 1.5rem;
  }

  .imagen-testimonios {
    height: 250px;
  }

  .boton-social,
  #google-register {
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
  }

  .boton-social img {
    width: 19px;
    height: 19px;
  }

  .footer-link {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
  }
}

@media (min-width: 1025px) {
  .panel-testimonios {
    position: relative;
  }
}