/* Estilos generales */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;
    font-weight: lighter;
    background: url('background.png') no-repeat center center fixed;
    background-size: cover;
}

/* Navbar */
.navbar {
    margin-bottom: 135px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #0A4989;
    padding: 17px 20px;
}

.logo {
    height: 55px;
    margin-left: 155px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 75px;
    margin-right: 200px;
}

.navbar-links a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    position: relative;
}

.navbar-links a.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    padding-left: 10px;
    margin-left: -10px;
    left: 0;
    height: 2.5px;
    width: 50px;
    background-color: rgb(255, 217, 0);
}

.language-toggle span {
    color: white;
    cursor: pointer;
}

/* Hamburger menu icon */
.hamburger-menu {
    display: none; /* Ocultar por defecto */
    width: 50px;
    height: 50px;
    margin-top: -5px;
    background-image: url('lineas.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

/* Estilos de los inputs */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 10px; /* Padding general */
    padding-left: 45px; /* Espacio adicional para desplazar el texto del usuario */
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    background-repeat: no-repeat;
    background-size: 20px; /* Tamaño de la imagen */
    background-position: 10px center; /* Posición de la imagen */
    font-size: 16px;
    color: #333; /* Color del texto */
    box-sizing: border-box; /* Asegura que el padding no haga que el input se expanda */
}

/* Imagen dentro del campo de usuario */
input[type="text"] {
    background-image: url('person.png');
}

/* Imagen dentro del campo de contraseña */
input[type="password"] {
    background-image: url('lock.png');
}

/* Placeholder alineado (mueve el placeholder a la derecha sin cambiar la posición cuando hace foco) */
input[type="text"]::placeholder, input[type="password"]::placeholder {
    color: #aaa;
    font-size: 16px;
    padding-left: 18px; /* Mueve el placeholder más a la derecha */
}

/* Aumentar el espacio a la izquierda cuando el campo está en foco */
input[type="text"]:focus, input[type="password"]:focus {
    padding-left: 38px; /* Aumenta el espacio solo para el texto del usuario, sin afectar placeholder */
}

/* Enfocar campo */
input:focus {
    outline: none;
    border-color: #0A4989; /* Cambia el color del borde al enfocar */
}

/* Login Container */
.login-container {
    background: linear-gradient(145deg, rgba(0, 18, 42, 0.9), rgba(0, 40, 90, 0.85));
    padding: 60px;
    height: 320px;
    width: 290px;
    margin: 100px auto;
    border-radius: 8px;
    color: white;
    margin-top: -10px;
}

.login-container label {
    display: block;
    margin-bottom: 10px;
    margin-left: -15px;
    font-size: 18px;
    font-weight: bold;
}

.login-container input {
    width: 110%;
    margin-left: -15px;
    padding: 15px;
    margin-top: auto;
    margin-bottom: 55px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
}

.login-button .login-icon {
    width: 25px; /* Tamaño de la imagen */
    margin-right: 5px; /* Espacio entre la imagen y el texto */
}

.login-container button {
    width: 110%;
    padding: 13px;
    background-color: yellow;
    border: none;
    margin-top: auto;
    border-radius: 4px;
    font-size: 19px;
    margin-left: -15px;
    font-weight: lighter;
    cursor: pointer;
    display: flex;
    justify-content: center;  /* Centrado horizontal */
    align-items: center; 
    color:rgba(0, 69, 198, 0.9)
}

.forgot-password {
    text-align: center;
    margin-top: 10px;
    color: lightgray;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    cursor: default;
    font-weight: bold;
}

/* Error message styling */
.error-message {
    color: red;
    font-size: 12px;
    margin-left: -15px;
    margin-top: -49px; /* Mantén un espaciado uniforme */
    visibility: hidden; /* Oculto por defecto */
    height: 20px; /* Espacio reservado */
}

input.error + .error-message {
    visibility: visible; /* Mostrar si hay error */
}

/* Error border styling */
.error {
    border: 2px solid red;
}

/* Media Queries for Responsiveness */

/* For Mobile Screens */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: center;
        padding: 8px 20px;
    }

    /* Mostrar el menú hamburguesa solo en pantallas pequeñas */
    .hamburger-menu {
        display: block;
        position: absolute;
        top: 17px;
        right: 20px;
    }

    /* Ocultar los enlaces del navbar en pantallas pequeñas */
    .navbar-links {
        display: none;
    }

    .logo {
        margin-left:-20px;
    }

    .navbar-links {
        flex-direction: column;
        gap: 15px;
        margin-right: 0;
        margin-top: 20px;
    }

    .login-container {
        width: 310px;
        padding: 10px;
        margin: 50px auto;
    }

    .login-container input {
        width: 100%;
        padding: 15px;
        width: 301px;
        margin-left: 0px;
        margin-bottom: 15px;
        border: none;
        border-radius: 4px;
        font-size: 16px;
    }

    .login-container button {
        width: 101%;
        padding: 13px;
        background-color: yellow;
        border: none;
        margin-top: auto;
        border-radius: 4px;
        font-size: 19px;
        margin-top: -20px;
        margin-left: 0px;
        font-weight: lighter;
        cursor: pointer;
        display: flex;
        justify-content: center;  /* Centrado horizontal */
        align-items: center; 
        color:rgba(0, 69, 198, 0.9)
    }

    .login-container label{
        margin-left: 0px;
        margin-top: 10px;
    }

    .error-message{
        margin-left: 0px;
        margin-bottom: 0px;
        margin-top: -10px;
    }
}

/* For Phones (Very Small screens) */
@media (max-width: 480px) {
    .login-container {
        width: 85%;
        max-width: 300px;
        margin: 30px auto;
        padding: 25px;
    }

    .login-container label,
    .login-container input,
    .login-container button {
        font-size: 14px;
    }

    .forgot-password {
        font-size: 12px;
    }
}
