/* ========================================
   RESET Y CONFIGURACIÓN GLOBAL
======================================== */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuración del body y html */
body,
html {
    height: auto;
    font-family: "Poppins", sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #c7c7c7 0%, #f7f5f5 100%);
}

/* Transiciones suaves para cambios de pantalla */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-container,
.info-panel,
.form-panel,
.form-container {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevenir cambios de layout */
.form-container,
.info-panel,
.form-panel {
    box-sizing: border-box;
}

/* ========================================
   ANIMACIONES GLOBALES
======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(229, 62, 62, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(229, 62, 62, 0.6);
    }
}

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ========================================
   ESTRUCTURA DE LAYOUT PRINCIPAL
======================================== */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========================================
   HEADER / ENCABEZADO
======================================== */

header {
    position: relative;
    background-color: #973131;
    background-size: cover;
    background-position: center;
    height: 220px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
    animation: fadeIn 1s ease-out;
    z-index: 100;
    flex-shrink: 0;
}

/* Overlay oscuro del header */
header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: background-color 0.3s ease;
}

/* Sección superior del header */
header .top {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
    animation: fadeInUp 1s ease-out 0.2s both;
}

header .top nav {
    display: flex;
    gap: 20px;
}

/* Logo del header */
header img {
    height: 100px;
    width: 100px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInLeft 1s ease-out 0.1s both;
}

header img:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Título principal del header */
header h1 {
    position: relative;
    font-family: "Kaushan Script", cursive;
    font-size: 60px;
    text-align: center;
    margin-bottom: 10px;
    z-index: 1;
    animation: fadeInUp 1s ease-out 0.4s both;
    transition: all 0.3s ease;
}

header h1:hover {
    transform: scale(1.05);
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Línea divisora del header */
header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(90deg, #e09e59, #d4894a, #e09e59);
  box-shadow: 0 2px 8px rgba(224, 158, 89, 0.4);
  z-index: 10;
}

/* ========================================
   NAVEGACIÓN
======================================== */

/* Navegación del header */
nav a {
  position: relative;
  color: white;
  margin-left: 15px;
  text-decoration: none;
  font-weight: bold;
  font-family: "Jura", sans-serif;
  font-size: 18px;
  margin-right: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: fadeInRight 0.6s ease-out forwards;
}

nav a:nth-child(1) {
  animation-delay: 0.1s;
}
nav a:nth-child(2) {
  animation-delay: 0.2s;
}
nav a:nth-child(3) {
  animation-delay: 0.3s;
}
nav a:nth-child(4) {
  animation-delay: 0.4s;
}
nav a:nth-child(5) {
  animation-delay: 0.5s;
}
nav a:nth-child(6) {
  animation-delay: 0.6s;
}

/* Efecto hover de la navegación del header */
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background-color: #e09e59;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav a:hover {
  transform: translateY(-3px);
  text-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  color: #e09e59;
}

nav a:hover::after {
  width: 100%;
}

/* Navegación del body */
body nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    gap: 40px;
    flex-wrap: wrap;
    gap: clamp(20px, 4vw, 40px);
}

body nav ul li {
    display: flex;
    align-items: center;
    animation: fadeInUp 0.6s ease-out forwards;
}

body nav ul li a {
    display: flex;
    align-items: center;
    font-family: "Jura", sans-serif;
    font-weight: bold;
    font-size: 18px;
    color: black;
    text-decoration: none;
    font-size: clamp(16px, 2vw, 18px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body nav ul li a:hover {
    transform: translateY(-2px);
    color: #e53e3e;
}

body nav ul li a img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

body nav ul li a:hover img {
    transform: rotate(360deg);
}

/* ========================================
   CONTENEDOR PRINCIPAL - LAYOUT MEJORADO
======================================== */

.main-container {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    animation: fadeIn 1s ease-out 0.5s both;
    position: relative;
    z-index: 1;
}

/* ========================================
   PANEL IZQUIERDO - INFORMACIÓN Y CAROUSEL ADAPTATIVO
======================================== */

.info-panel {
    width: 50%;
    position: relative;
    overflow: hidden;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    animation: fadeInLeft 1s ease-out 0.6s both;
    /* Altura adaptativa al formulario */
    min-height: 100%;
}

/* Overlay del panel de información */
.info-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
    transition: background 0.3s ease;
}

.info-panel:hover::before {
    background: rgba(0, 0, 0, 0.3);
}

/* Contenido del panel de información */
.info-panel .contenido {
    position: relative;
    z-index: 2;
    padding: 20px;
    animation: fadeInUp 1s ease-out 0.8s both;
    width: 100%;
    max-width: 480px;
}

.info-content {
    max-width: 480px;
    text-align: center;
    color: #eaeaea;
    z-index: 1;
    padding: 2rem;
}

/* Sección del logo */
.logo-section {
    margin-bottom: 2rem;
}

.main-logo {
    width: 180px;
    height: 180px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 6s ease-in-out infinite;
}

.main-logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

/* Logo en el panel de información */
.info-panel .logo img {
    width: clamp(120px, 15vw, 180px);
    height: clamp(120px, 15vw, 180px);
    border-radius: 50%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    animation: float 6s ease-in-out infinite;
}

.info-panel .logo img:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.info-panel h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    animation: fadeInUp 1s ease-out 1s both;
    transition: all 0.3s ease;
}

.info-panel h1:hover {
    transform: scale(1.05);
    text-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.info-panel p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 300;
    color: #f0f0f0;
    font-style: italic;
    opacity: 0.85;
    animation: fadeInUp 1s ease-out 1.2s both;
    transition: all 0.3s ease;
}

.info-panel p:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.brand-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-top: 0.8rem;
    color: #f0f0f0;
    font-style: italic;
    opacity: 0.85;
    font-size: clamp(1rem, 2vw, 1.2rem);
    animation: fadeInUp 1s ease-out 1.4s both;
}

/* Carousel de fondo - ADAPTATIVO */
.carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 1;
}

.bg-slide {
    display: none;
    position: absolute;
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.6);
    object-position: center;
}

.bg-slide.active {
    display: block;
    opacity: 1;
    animation: fadeIn 1.5s ease-out;
}

/* ========================================
   PANEL DERECHO - FORMULARIO ADAPTATIVO
======================================== */

.mensaje-validacion {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  padding-left: 10px;
  color: #999;
}

.mensaje-exito {
  color: green;
}

.mensaje-error {
  color: red;
}

.input-success {
  border: 2px solid green !important;
  box-shadow: 0 0 5px green;
}

.input-error {
  border: 2px solid red !important;
  box-shadow: 0 0 5px red;
}

.form-panel {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    padding: 20px;
    animation: fadeInRight 1s ease-out 0.6s both;
    /* Altura adaptativa */
    min-height: 100%;
    overflow-y: auto;
}

.form-container {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInScale 1s ease-out 0.8s both;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    margin: auto;
    /* Altura adaptativa */
    min-height: fit-content;
}

.form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.4);
}

/* ========================================
   ENCABEZADO DEL FORMULARIO
======================================== */

.form-header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 1s both;
}

.form-title {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 700;
    color: #333;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.form-title:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 5px 10px rgba(229, 62, 62, 0.3));
}

.form-subtitle {
    color: #666;
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    animation: fadeInUp 1s ease-out 1.1s both;
    transition: all 0.3s ease;
}

.form-subtitle:hover {
    color: #333;
    transform: translateY(-2px);
}

/* ========================================
   CAMPOS DE ENTRADA DEL FORMULARIO
======================================== */

.input-group {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.input-group:nth-child(1) {
    animation-delay: 1.2s;
}

.input-group:nth-child(2) {
    animation-delay: 1.3s;
}

.input-group:nth-child(3) {
    animation-delay: 1.4s;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper:hover {
    transform: translateY(-2px);
}

/* Iconos de los inputs */
.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #e53e3e;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper:hover .input-icon {
    transform: translateY(-50%) scale(1.1);
}

/* Toggle password button */
.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    z-index: 3;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-password:hover {
    color: #e53e3e;
    transform: translateY(-50%) scale(1.1);
}

/* Campos de entrada */
.form-input {
    width: 100%;
    padding: 1rem 3rem 1rem 2.8rem; /* Adjusted padding-right to accommodate toggle button */
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
}

.form-input:focus {
    border-color: #e53e3e;
    background: white;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1), 0 8px 20px rgba(229, 62, 62, 0.1);
    transform: translateY(-2px);
}

.form-input:hover:not(:focus) {
    border-color: #c53030;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Etiquetas de los inputs */
.input-label {
    position: absolute;
    left: 2.8rem;
    top: 1rem;
    color: #999;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus+.input-label,
.form-input:not(:placeholder-shown)+.input-label {
    top: -0.5rem;
    left: 1rem;
    font-size: 0.85rem;
    color: #e53e3e;
    background: white;
    padding: 0 0.5rem;
    transform: scale(0.9);
    animation: fadeInUp 0.3s ease-out;
}

/* ========================================
   SECCIÓN CAPTCHA
======================================== */

.captcha-section {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 1.5s both;
}

.captcha-label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.captcha-label:hover {
    color: #e53e3e;
    transform: translateX(5px);
}

.captcha-container {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

/* Display del CAPTCHA */
.captcha-display {
    flex: 1;
    height: 60px;
    background: url("img/fondo.jpg") center / cover;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Courier New", monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.captcha-display::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(1px);
    transition: all 0.3s ease;
}

.captcha-display:hover {
    border-color: #e53e3e;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(229, 62, 62, 0.2);
}

.captcha-display:hover::before {
    background: rgba(255, 255, 255, 0.5);
}

/* Botón de refresh del CAPTCHA */
.captcha-refresh {
    width: 60px;
    height: 60px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.captcha-refresh:hover {
    border-color: #e53e3e;
    background: #fef2f2;
    transform: scale(1.05) rotate(180deg);
    box-shadow: 0 8px 20px rgba(229, 62, 62, 0.2);
}

.captcha-refresh:active {
    transform: scale(0.95) rotate(360deg);
}

/* Input del CAPTCHA */
.captcha-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.captcha-input:focus {
    border-color: #e53e3e;
    background: white;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1), 0 8px 20px rgba(229, 62, 62, 0.1);
    transform: translateY(-2px);
}

.captcha-input:hover:not(:focus) {
    border-color: #c53030;
    transform: translateY(-1px);
}

/* ========================================
   BOTONES
======================================== */

/* Botón de envío principal */
.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: block;
    text-align: center;
    z-index: 5;
    opacity: 1;
    visibility: visible;
    animation: fadeInUp 0.8s ease-out 1.6s both;
    min-height: 52px;
    box-sizing: border-box;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(229, 62, 62, 0.3);
    background: linear-gradient(135deg, #c53030, #9b2c2c);
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-text {
    position: relative;
    z-index: 3;
    display: block;
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

/* Loader del botón */
.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.3s ease;
}

/* Estado de carga del botón */
.submit-btn.loading {
    pointer-events: none;
}

.submit-btn.loading .btn-text {
    opacity: 0;
    transform: scale(0.8);
}

.submit-btn.loading .btn-loader {
    opacity: 1;
}

/* ========================================
   FOOTER DEL FORMULARIO
======================================== */

.form-footer {
    text-align: center;
    animation: fadeInUp 0.8s ease-out 1.7s both;
    opacity: 0;
}

.divider {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.divider:hover {
    color: #333;
    transform: translateY(-1px);
}

/* Enlaces del formulario */
.login-link,
.register-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 62, 62, 0.2);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.login-link::before,
.register-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 62, 62, 0.1), transparent);
    transition: left 0.5s ease;
}

.login-link:hover::before,
.register-link:hover::before {
    left: 100%;
}

.login-link:hover,
.register-link:hover {
    background: rgba(229, 62, 62, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 62, 62, 0.2);
    border-color: rgba(229, 62, 62, 0.3);
}

.link-arrow {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-link:hover .link-arrow,
.register-link:hover .link-arrow {
    transform: translateX(3px) scale(1.1);
}

/* Enlaces simples */
#aja {
    color: #e53e3e;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#aja::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e53e3e, #c53030);
    transition: width 0.3s ease;
}

#aja:hover {
    color: #c53030;
    transform: translateY(-2px);
}

#aja:hover::after {
    width: 100%;
}

/* ========================================
   FOOTER PRINCIPAL
======================================== */

.footer-banner {
    width: 100%;
    height: 150px;
    background-image: url("img/footer.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: fadeIn 1s ease-out 2s both;
}

.pre-footer-banner {
    background-image: url("../img/footer.jpg");
    background-size: cover;
    background-position: center;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1s ease-out 2s both;
    flex-shrink: 0;
}

footer {
    background-color: #973131;
    color: white;
    font-family: "Jura", sans-serif;
    padding: 40px 30px;
    animation: fadeInUp 1s ease-out 2.1s both;
    z-index: 100;
    position: relative;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1000px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.footer-column:nth-child(1) {
    animation-delay: 2.2s;
}

.footer-column:nth-child(2) {
    animation-delay: 2.3s;
}

.footer-logo img {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.footer-logo img:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.footer-column h3 {
    font-size: 22px;
    margin-bottom: 10px;
    font-family: "Kaushan Script", cursive;
    transition: all 0.3s ease;
}

.footer-column h3:hover {
    transform: scale(1.05);
    color: #e09e59;
}

.footer-column p,
.footer-column a {
    font-size: 16px;
    margin: 6px 0;
    color: white;
    text-decoration: none;
    font-family: "Jura", sans-serif;
    transition: all 0.3s ease;
}

.footer-column a:hover {
    text-decoration: underline;
    transform: translateX(5px);
    color: #e09e59;
}

.footer-column:last-child {
    text-align: right;
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
======================================== */

/* Extra Large screens (1400px y más) */
@media (min-width: 1400px) {
    .form-container {
        max-width: 550px;
        padding: 3rem;
    }

    .form-title {
        font-size: 2.6rem;
    }

    .info-panel .logo img {
        width: 200px;
        height: 200px;
    }
}

/* Large screens (1200px - 1399px) */
@media (max-width: 1199px) {
    .form-container {
        max-width: 480px;
        padding: 2.5rem;
    }
}

/* Medium screens (992px - 1199px) */
@media (max-width: 991px) {
    .form-container {
        max-width: 450px;
        padding: 2rem;
    }

    .info-panel .logo img {
        width: 160px;
        height: 160px;
    }

    header h1 {
        font-size: 50px;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 768px) {

    /* Reducir animaciones en móviles */
    * {
        animation-duration: 0.5s !important;
    }

    .float {
        animation: none !important;
    }

    /* Layout vertical en tablets */
    .main-container {
        flex-direction: column;
    }

    .info-panel,
    .form-panel {
        width: 100%;
        min-height: auto;
    }

    .info-panel {
        padding: 2rem 1rem;
        order: 1;
        min-height: 300px;
    }

    .form-panel {
        padding: 2rem 1rem;
        order: 2;
    }

    .form-container {
        max-width: 95%;
        padding: 2rem;
        margin: 1rem auto;
    }

    /* Header responsive */
    header {
        height: auto;
        min-height: 140px;
        padding: 15px;
    }

    header .top {
        flex-direction: column;
        gap: 15px;
    }

    header .top nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        width: 100%;
    }

    nav a {
        font-size: 15px;
        margin: 0;
        padding: 8px 15px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        white-space: nowrap;
    }

    header h1 {
        font-size: 36px;
        margin-top: 15px;
    }

    header img {
        height: 70px;
        width: 70px;
    }

    .info-panel .logo img {
        width: 120px;
        height: 120px;
    }

    /* Form elements */
    .input-group {
        margin-bottom: 1.3rem;
    }

    .form-input {
        padding: 0.9rem 3rem 0.9rem 2.5rem; /* Adjusted for toggle button */
        font-size: 0.95rem;
    }

    .input-icon {
        font-size: 1.1rem;
        left: 0.9rem;
    }

    .toggle-password {
        right: 0.9rem;
        font-size: 1.1rem;
    }

    /* CAPTCHA responsive */
    .captcha-container {
        flex-direction: column;
        gap: 1rem;
    }

    .captcha-display {
        height: 55px;
        font-size: 1.2rem;
    }

    .captcha-refresh {
        width: 100%;
        height: 50px;
        font-size: 1.1rem;
    }

    .captcha-input {
        padding: 0.9rem;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 1.1rem;
        font-size: 1rem;
    }

    .login-link,
    .register-link {
        padding: 0.7rem 1.3rem;
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 30px 20px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-column {
        min-width: auto;
        width: 100%;
    }

    .footer-column:last-child {
        text-align: center;
    }

    .pre-footer-banner {
        height: 100px;
    }
}

/* Mobile Portrait (480px - 767px) */
@media (max-width: 575px) {
    header {
        min-height: 120px;
        padding: 10px;
    }

    header .top nav {
        flex-direction: column;
        gap: 8px;
    }

    nav a {
        font-size: 14px;
        padding: 6px 12px;
        width: 100%;
        text-align: center;
    }

    header h1 {
        font-size: 28px;
    }

    header img {
        height: 60px;
        width: 60px;
    }

    .form-container {
        padding: 1.5rem;
        border-radius: 20px;
        max-width: 98%;
        margin: 0.5rem auto;
    }

    .info-panel .logo img {
        width: 100px;
        height: 100px;
    }

    .info-panel {
        min-height: 250px;
        padding: 1.5rem 1rem;
    }

    .form-panel {
        padding: 1rem 0.5rem;
    }

    .input-group {
        margin-bottom: 1.2rem;
    }

    .form-input {
        padding: 0.8rem 3rem 0.8rem 2.3rem; /* Adjusted for toggle button */
        font-size: 0.9rem;
    }

    .input-icon {
        font-size: 1rem;
        left: 0.8rem;
    }

    .toggle-password {
        right: 0.8rem;
        font-size: 1rem;
    }

    .captcha-display {
        height: 50px;
        font-size: 1.1rem;
    }

    .captcha-refresh {
        height: 45px;
        font-size: 1rem;
    }

    .submit-btn {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .login-link,
    .register-link {
        padding: 0.6rem 1.1rem;
        font-size: 0.85rem;
    }
}

/* Extra Small Mobile (320px - 479px) */
@media (max-width: 479px) {
    .form-container {
        padding: 1.2rem;
        max-width: 100%;
        margin: 0.25rem;
    }

    .info-panel .logo img {
        width: 90px;
        height: 90px;
    }

    .info-panel {
        min-height: 200px;
    }

    .form-input {
        padding: 0.7rem 3rem 0.7rem 2.1rem; /* Adjusted for toggle button */
    }

    .input-icon {
        left: 0.7rem;
    }

    .toggle-password {
        right: 0.7rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   PREFERENCIAS DE USUARIO
======================================== */

/* Reducir animaciones para usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .float {
        animation: none !important;
    }
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 3px;
    }

    .submit-btn {
        border: 2px solid #000;
    }

    .captcha-display {
        border-width: 3px;
    }
}