:root {
    /* Paleta con Azul #3050AA */
    --primary-color: #1F4E9A; /* Azul principal */
    --secondary-color: #1a3a8f; /* Azul más oscuro para hover/acentos */
    --accent-color: #4a6cc7; /* Azul más claro para acentos */
    --dark-color: #212529; /* Negro azulado para texto */
    --light-color: #ffffff; /* Blanco puro */
    --gray-color: #6c757d; /* Gris medio */
    --light-gray: #f8f9fa; /* Gris claro para fondos */
    --border-gray: #dee2e6; /* Gris para bordes */
    --error-color: #dc3545; /* Rojo para errores */
    --success-color: #28a745; /* Verde para éxito */
    
    /* Tamaños responsivos */
    --header-height: 70px;
    --footer-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* 1. ENCABEZADO */
header {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background-color: var(--light-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 45px;
    width: auto;
    max-width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/*.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-login {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-register {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: 2px solid var(--primary-color);
}*/

/* 2. CUERPO PRINCIPAL */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    margin-top: var(--header-height);
    margin-bottom: var(--footer-height);
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--dark-color);
    padding: 0 1rem;
}

.action-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

.action-btn {
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    flex: 1;
    min-width: 180px;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(48, 80, 170, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

/* 3. PIE DE PÁGINA */
footer {
    height: auto;
    min-height: var(--footer-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 1.5rem;
    text-align: center;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    border-top: 3px solid var(--accent-color);
    gap: 1rem;
}

footer::before {
    content: "";
    display: block;
    width: 80%;
    height: 1px;
    background-color: rgba(255,255,255,0.3);
    margin: 0 auto 0.5rem;
}

.footer-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0.5rem 0;
}

.footer-logos img {
    height: 50px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Convierte los logos a blanco para contraste */
    transition: transform 0.3s ease;
}

.footer-logos img:hover {
    transform: scale(1.05);
    filter: brightness(0) invert(0.8); /* Efecto hover sutil */
}

.footer-text {
    width: 100%;
    margin: 0;
    line-height: 1.4;
}

/* Versión para pantallas más grandes */
@media (min-width: 768px) {
    footer {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        text-align: left;
    }
    
    footer::before {
        display: none;
    }
    
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .footer-logos {
        margin: 0;
    }
    
    .footer-text {
        text-align: right;
        max-width: 50%;
    }
}

 /* 4. MODALES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
    
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal {
    background-color: var(--light-color);
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
    position: relative;
     
}

.modal-overlay.active .auth-modal {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    position: sticky;
    top: 0;
    z-index: 10;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    color: var(--light-color);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 1.5rem;
}

.input-group {
    margin-bottom: 1rem;
    position: relative;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.85rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background-color: var(--light-gray);
}

.input-field:focus {
    border-color: var(--primary-color);
    background-color: var(--light-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(48, 80, 170, 0.2);
}

.input-icon {
    position: absolute;
    left: 1rem;
    margin-top: 1rem;
    color: var(--gray-color);
    font-size: 1rem;
}

.forgot-link {
    display: block;
    text-align: right;
    margin: -0.5rem 0 1rem;
    font-size: 0.8rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

  .modal-footer {
            text-align: center;
            font-size: 0.85rem;
            color: #7a7f83;
            padding: 0 1.5rem 1.5rem;
        }
        
        .switch-auth-link {
            color: var(--primary-color);
            font-weight: 600;
            text-decoration: none;
            margin-left: 0.25rem;
            cursor: pointer;
        }
        
        .switch-auth-link:hover {
            text-decoration: underline;
        }

.auth-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--light-color);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(48, 80, 170, 0.2);
}

.separator {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: var(--gray-color);
    font-size: 0.85rem;
}

.separator::before, .separator::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--border-gray);
}

.separator::before {
    margin-right: 0.5rem;
}

.separator::after {
    margin-left: 0.5rem;
}

.error-message {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.input-field.error {
    border-color: var(--error-color);
}

.input-field.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--light-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-row {
    display: flex;
    gap: 0.75rem;
}

.form-row .input-group {
    flex: 1;
}

/* 5. RESPONSIVE */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .auth-buttons {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        right: 0;
        background-color: var(--light-color);
        width: 100%;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .auth-buttons.active {
        display: flex;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .auth-modal {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header, .modal-body {
        padding: 1rem;
    }
    
    .input-field {
        padding: 0.7rem 1rem 0.7rem 2.5rem;
    }
    
    .input-icon {
        top: 2rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* 6. EFECTOS HOVER (solo desktop) */
@media (hover: hover) {
    .btn-login:hover {
        background-color: rgba(48, 80, 170, 0.1);
    }
    
    .btn-register:hover, .btn-primary:hover {
        background-color: var(--secondary-color);
        border-color: var(--secondary-color);
        transform: translateY(-2px);
        box-shadow: 0 7px 15px rgba(0,0,0,0.15);
    }
    
    .btn-secondary:hover {
        background-color: rgba(48, 80, 170, 0.1);
        transform: translateY(-2px);
    }
    
    .auth-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 7px 15px rgba(48, 80, 170, 0.3);
    }
    
    .close-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .forgot-link:hover {
        color: var(--secondary-color);
    }
}
   
/*/////////////////////////////////////////////////////////////////*/
  #alertaBasica {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #323232;
    color: #fff;
    padding: 10px 26px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif; /* Tipografía moderna */
    font-size: 16px;
    font-weight: 500;
    z-index: 9999; /* Mayor prioridad sobre modales */
    max-width: 90%;
    min-width: 280px; /* Ancho mínimo para mejor legibilidad */
    text-align: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); /* Sombra más pronunciada */
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Animación más suave */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* Espacio para iconos */
    pointer-events: none; /* Evita interacción cuando está oculta */
}

#alertaBasica.mostrar {
    top: 30px; /* Mayor margen superior */
    opacity: 1;
    pointer-events: auto; /* Permite interacción cuando es visible */
}

#alertaBasica.ocultar {
    top: -60px;
    opacity: 0;
}

/* Variantes de estado */
#alertaBasica.exito {
    background-color: #4CAF50;
}

#alertaBasica.error {
    background-color: #F44336;
}

#alertaBasica.advertencia {
    background-color: #FFC107;
    color: #212121;
}

/* Iconos (requiere Font Awesome) */
#alertaBasica .icono-alerta {
    font-size: 18px;
}

/* Responsive para móviles */
@media (max-width: 576px) {
    #alertaBasica {
        padding: 14px 24px;
        font-size: 15px;
        min-width: 240px;
        max-width: 95%;
    }
    
    #alertaBasica.mostrar {
        top: 20px;
    }
}