/* Reset y configuración general */
html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    /* Imagen de fondo */
    background-image: url('../FondoColegio.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 🔹 Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 500px;
    background-color: #004080; /* Transparente */
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    border-radius: 10px;
    z-index: 1000;
}

/* 🔹 Contenedor principal */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
    max-width: 500px;
    margin-top: 120px; /* Espacio para el header */
}

/* 🔹 Carrusel */
.carousel-container {
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px; /* 🔥 Agregado más espacio entre el carrusel y el formulario */
}

.carousel img {
    width: 100%;
    display: none;
    border-radius: 10px;
}

.carousel img.active {
    display: block;
    animation: fade 1s ease-in-out;
}

/* 🔹 Animación de transición */
@keyframes fade {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* 🔹 Formulario de inicio de sesión */
.login-container {
    width: 100%;
    max-width: 400px;
    background-color: #004080;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: white;
}

/* 🔥 Agregado más espacio entre el título y los campos del formulario */
.login-container h1 {
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Estilo de etiquetas */
label {
    font-weight: bold;
}

/* Estilo de inputs */
input {
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #222;
    color: white;
    outline: none;
    width: 100%;
}

/* Placeholder en gris claro */
input::placeholder {
    color: #aaa;
}

/* 🔹 Botón de inicio de sesión */
button {
    background: linear-gradient(45deg, #007BFF, #0056b3);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s ease, background 0.3s ease;
}

button:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #0056b3, #003f7f);
}

/* 🔹 Mensaje de error */
#error-message {
    color: red;
    visibility: hidden;
    text-align: center;
}

/* 🔹 Spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #007BFF;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 🔹 Responsividad */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    .carousel-container {
        max-width: 100%;
    }

    .login-container {
        width: 100%;
    }
}
