/* Reset de estilos básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Cargar la fuente Muli-Black desde archivos locales */
@font-face {
    font-family: 'Muli Black';
    src: url('../fonts/Muli-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Muli Black', sans-serif;
}

/* Animaciones básicas y ligeras */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%, 75% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
}

/* Contenedor principal con diseño de dos columnas */
.contenedor-principal {
    display: flex;
    width: 100vw;
    height: 100vh;
    background: url('../images/fondo.jpg') center center no-repeat;
    background-size: cover;
    align-items: center;
    padding: 0 8%;
}

/* Sección izquierda con el logo */
.seccion-izquierda {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.6s ease-out;
}

.seccion-izquierda img {
    max-width: 70%;
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
}

/* Sección derecha con el login */
.seccion-derecha {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

/* Caja del login con glassmorphism mejorado */
.contenedor-login {
    background: rgba(255, 255, 255, 0.15);
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 370px;
    text-align: center;
    transition: transform 0.3s ease;
}

.contenedor-login:hover {
    transform: translateY(-2px);
}

/* Título mejorado */
h1 {
    color: white;
    font-size: 26px;
    margin-bottom: 25px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Labels */
label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: left;
}

/* Estilos para los inputs mejorados */
input {
    width: 100%;
    padding: 14px 18px;
    margin: 0 0 18px 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Estados de focus */
input:focus {
    outline: none;
    border-color: #F45197;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(244, 81, 151, 0.2);
    transform: translateY(-1px);
}

/* Contenedor de la contraseña */
.password-container {
    position: relative;
    width: 100%;
}

/* Botón de mostrar contraseña - Centrado agresivo */
.password-container button {
    position: absolute;
    right: 12px;
    top: 37%; /* Movido más arriba del 50% */
    transform: translateY(-50%);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    width: 38px;
    height: 34px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-container button:hover {
    background: rgba(244, 81, 151, 0.3);
    color: white;
}

.password-container button svg {
    transition: all 0.3s ease;
}

.password-container button:hover svg {
    transform: scale(1.1);
}

/* Botón de login mejorado */
.boton-redireccion {
    width: 100%;
    background: linear-gradient(135deg, #F45197 0%, #D93E80 100%);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Efecto hover del botón */
.boton-redireccion:hover {
    background: linear-gradient(135deg, #D93E80 0%, #F45197 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 81, 151, 0.4);
}

.boton-redireccion:active {
    transform: translateY(0);
}

/* Enlace de "Olvidaste tu contraseña" */
.enlace {
    display: inline-block;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.enlace::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #F45197;
    transition: width 0.3s ease;
}

.enlace:hover {
    color: #F45197;
}

.enlace:hover::after {
    width: 100%;
}

/* Contenedor del logo y la frase */
.logo-contenedor {
    text-align: center;
}

/* Estilos para la frase debajo del logo */
.frase-transformacion {
    margin-top: 15px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Indicador de error */
.input-error {
    border-color: #ff4757 !important;
    background: rgba(255, 71, 87, 0.15) !important;
    animation: shake 0.5s ease-in-out;
}

/* Mensaje de error */
#error-message {
    background: rgba(241, 138, 0, 0.15);
    border: 1px solid rgba(241, 138, 0, 0.4);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    font-size: 14px;
    backdrop-filter: blur(8px);
}

/* Estado de carga simple */
.boton-redireccion.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Diseño responsivo */
@media (max-width: 800px) {
    .contenedor-principal {
        flex-direction: column;
        text-align: center;
        padding: 20px 5%;
    }

    .seccion-izquierda {
        width: 100%;
        margin-bottom: 25px;
    }

    .seccion-izquierda img {
        max-width: 55%;
    }

    .seccion-derecha {
        width: 100%;
    }

    .contenedor-login {
        width: 100%;
        max-width: 380px;
        padding: 30px 25px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .frase-transformacion {
        font-size: 16px;
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    .contenedor-login {
        padding: 25px 20px;
        border-radius: 12px;
    }

    input {
        padding: 12px 15px;
        font-size: 15px;
    }

    .boton-redireccion {
        padding: 13px;
        font-size: 16px;
    }
}

/* Respeto por preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== ESTILOS DEL MODAL ===== */

/* Overlay del modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Contenedor del modal */
.modal-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

/* Header del modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: white;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Botón de cerrar */
.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 71, 87, 0.3);
    color: white;
    transform: scale(1.1);
}

/* Contenido del modal */
.modal-content {
    padding: 25px 30px 30px;
}

.modal-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.5;
}

/* Lista de contactos */
.contact-list {
    margin-bottom: 30px;
}

.contact-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    text-align: center;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-name {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.contact-email {
    color: #F45197;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-email:hover {
    color: #D93E80;
    text-decoration: underline;
    transform: scale(1.02);
}

/* Botón del modal */
.modal-button {
    width: 100%;
    background: linear-gradient(135deg, #F45197 0%, #D93E80 100%);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-button:hover {
    background: linear-gradient(135deg, #D93E80 0%, #F45197 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 81, 151, 0.4);
}

/* Responsividad del modal */
@media (max-width: 600px) {
    .modal-container {
        width: 95%;
        margin: 20px;
    }

    .modal-header {
        padding: 20px 25px 15px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-content {
        padding: 20px 25px 25px;
    }

    .modal-description {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .contact-item {
        padding: 15px;
    }

    .contact-name {
        font-size: 15px;
    }

    .contact-email {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 15px 20px 12px;
    }

    .modal-content {
        padding: 15px 20px 20px;
    }

    .contact-item {
        padding: 12px;
        margin-bottom: 12px;
    }
}