/* estilos.css */

/* Reset y base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    color: yellow;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Contenedor general */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #111;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5rem;
    text-align: center;
}

/* Navegación */
nav {
    margin-top: 15px;
    position: relative;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    transition: max-height 0.3s ease;
}

nav ul li a {
    color: yellow;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: yellow;
    color: #000;
    outline: none;
}

/* Botón menú hamburguesa (visible en móvil) */
.nav-toggle {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    font-size: 2rem;
    color: yellow;
    cursor: pointer;
    padding: 10px 15px;
    user-select: none;
}

/* Mostrar menú oculto en móvil */
nav ul.show {
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

/* Contenido principal */
main {
    flex: 1;
    padding: 40px 20px;
    text-align: center;
}

main h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

main p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 10px auto;
}

/* Footer */
footer {
    background-color: #111;
    text-align: center;
    padding: 15px 10px;
    font-size: 0.9rem;
    color: yellow;
}

/* Mensajes de error y éxito */
.error-message {
    background-color: #cc0000;
    color: #fff;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.success-message {
    background-color: #006600;
    color: #fff;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* Formularios */
.login-container {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background-color: #111;
    border-radius: 8px;
    box-shadow: 0 0 10px #222;
    color: yellow;
}

.login-container h2 {
    margin-bottom: 20px;
    text-align: center;
}

.login-container label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.login-container input[type="email"],
.login-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 4px;
    color: yellow;
    font-size: 1rem;
}

.login-container input[type="email"]::placeholder,
.login-container input[type="password"]::placeholder {
    color: #888;
}

.login-container input[type="submit"] {
    width: 100%;
    background-color: yellow;
    color: #000;
    border: none;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-container input[type="submit"]:hover,
.login-container input[type="submit"]:focus {
    background-color: #e6c200;
    outline: none;
}

/* Responsive */

@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        background-color: #111;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        border-top: 1px solid #444;
    }

    .nav-toggle {
        display: block;
    }

    nav ul li {
        margin: 15px 0;
        text-align: center;
    }

    main {
        padding: 30px 10px;
    }

    header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 400px) {
    header h1 {
        font-size: 1.5rem;
    }

    .login-container {
        margin: 30px 10px;
        padding: 20px;
    }
}

/* Ajuste para que el footer se quede pegado al fondo */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1; /* Esto hace que el main crezca y empuje el footer hacia abajo */
}

footer {
    background-color: #111;
    text-align: center;
    padding: 15px 10px;
    font-size: 0.9rem;
    color: yellow;
    /* No necesita más, ya el body flex lo empuja abajo */
}

/* Cartel fijo con imagen de fondo debajo de usuario activo */
.usuario-contenedor {
    position: relative; /* Padre relativo para que el hijo absoluto se posicione respecto a este */
    display: inline-block; /* Para que ocupe solo lo necesario */
    margin-top: 20px;
}

