/* =============================
   ESTILOS GENERALES REGISTER
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body.register {
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
  min-height: 100vh;
  display: flex;
  flex-direction: column; /* estructura vertical: corona → contenido → footer */
  align-items: center;
  justify-content: flex-start;
  padding-top: 60px; /* separa la corona */
  padding-bottom: 80px;
}

/* =============================
   BOTÓN SUPERIOR (CORONA)
============================= */
.top-home {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.home-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.back-text {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  background: #d92e82;
  border: none;
  border-radius: 999px;
  padding: 4px 9px;
  line-height: 1;
  display: inline-block;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset;
  margin-left: 4px;
}

.home-btn img {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 5px 12px rgba(255, 62, 129, 0.5));
  transition: transform 0.3s ease;
}

.home-btn:hover img {
  transform: scale(1.08);
}

.home-btn:hover .back-text {
  filter: brightness(1.05);
}

/* =============================
   FORMULARIO PRINCIPAL
============================= */
.container {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  width: clamp(320px, 90%, 400px);
  text-align: center;
  padding: 35px 28px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 auto; /* no estirar la tarjeta verticalmente */
}

.logo {
  width: 160px;
  margin-bottom: 15px;
}

h2 {
  color: #ff3e81;
  margin-bottom: 10px;
  font-weight: 700;
}

p.sub {
  color: #444;
  font-size: 14px;
  margin-bottom: 15px;
}

input {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 12px;
  margin: 8px 0;
  font-size: 15px;
  background: #f7f7f7;
}
body.register .container input.input-error {
  border: 2px solid #ff3e81;
  background: #ffe5ef;
  box-shadow: 0 0 8px rgba(255, 62, 129, 0.35);
}
body.register .container input.input-shake {
  animation: register-shake 0.25s ease;
}
@keyframes register-shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

/* =============================
   CHECKBOX + TÉRMINOS
============================= */
label.terms {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  color: #444;
  text-align: left;
  line-height: 1.4;
  margin-top: 5px;
  margin-bottom: 14px;
}
label.terms input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #ff3e81;
}
label.terms a {
  color: #ff3e81;
  text-decoration: none;
  font-weight: 600;
}

/* =============================
   BOTONES
============================= */
button {
  border: none;
  color: white;
  padding: 12px 20px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  background: linear-gradient(90deg, #ff3e81, #ff8c3b);
  transition: transform 0.2s ease;
}
button:hover {
  transform: scale(1.05);
}

/* =============================
   BOTÓN GOOGLE
============================= */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid #ddd;
  border-radius: 20px;
  background: white;
  color: #333;
  font-weight: 500;
  padding: 12px;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.google-btn img {
  width: 22px;
  height: 22px;
}
.google-btn:hover {
  background: #f3f3f3;
}

/* =============================
   ENLACES INFERIORES
============================= */
p.msg {
  color: #555;
  font-size: 14px;
  text-align: center;
  margin-top: 5px;
}
p.msg a {
  color: #ff3e81;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, filter 0.2s ease;
}

p.msg a:hover,
p.msg a:focus {
  color: #ff74a8;
  text-decoration: none;
  filter: brightness(1.08);
}

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 768px) {
  .container {
    width: 88%;
    padding: 30px 22px;
  }
  .home-btn img {
    width: 80px;
  }
  body.register {
    padding-top: 40px;
    padding-bottom: 60px;
  }
}

/* Ajustes móviles específicos para tamaños muy pequeños */
@media (max-width: 600px) {
  .container {
    width: 90%;
    padding: 24px 20px;
    margin: 16px auto 24px;
    flex: 0 0 auto;
  }
}

/* =============================
   FOOTER FIJO Y ARMONIZADO
============================= */
.catabum-footer {
  width: 100%;
  background: linear-gradient(90deg, #40026d, #9c11a8);
  color: white;
  text-align: center;
  padding: 20px 10px;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2);
  border: none;
  margin-top: auto; /* ✅ lo ancla al fondo */
  position: relative;
}

.catabum-footer p,
.catabum-footer a {
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  margin: 0 5px;
}

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

/* En pantallas pequeñas, el footer sigue comportándose bien */
@media (max-width: 768px) {
  .catabum-footer {
    font-size: 12px;
    padding: 16px 8px;
  }
}

/* =============================
   FIX: eliminar hueco bajo el footer
   Causa: padding-bottom en body.register
   Solucin: forzar 0 y mover espacio al contenedor
============================= */
body.register {
  padding-bottom: 0 !important;
}
.container {
  margin-bottom: clamp(24px, 4vh, 48px);
}
@media (max-width: 768px) {
  body.register {
    padding-bottom: 0 !important;
  }
}

/* REGISTER THEME: match body gradient for footer */
body.register .catabum-footer {
  background: transparent !important; /* usa el degradado del body para evitar cortes */
  color: #fff;
}

/* Estructura para sticky footer sin huecos (no cambia colores) */
html,
body {
  height: 100%;
}
/* Color base para las zonas del navegador en móvil (top/bottom) */
html {
  background-color: #ffc371;
}
body.register {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.catabum-footer {
  margin-top: auto;
  border-top: 0;
}

/* ======= Fix corte del degradado (prioridad final) ======= */
body.register {
  background: none !important;
  position: relative !important;
}
body.register::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, #ff5f6d, #ffc371);
}
/* Footer transparente y sin sombra/borde para no marcar la unión */
body.register .catabum-footer {
  background: transparent !important; /* deja ver el gradiente continuo */
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.2) !important; /* sombra como antes */
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important; /* fino divider */
}
