/**
 * Archivo CSS principal del sistema
 * 
 * Descripción:
 * - Este archivo contiene diseño básico para el apartado del front.
 * - Si tienes conocimientos en CSS puedes tomarte el tiempo de modificarlo.
 * 
 * Creado Por: RobGe - 23/01/2025. Version 1.0
 */
 html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    height: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


nav .logo {
    font-weight: bold;
    color: #2575fc;
    font-size: 1.2rem;
}

.logo img{
    max-width: 150px;
}

nav .menu {
    display: flex;
    gap: 20px;
}

nav .menu a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    white-space: nowrap;
}

nav .menu a:hover {
    color: #2575fc;
}

nav .hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

nav .hamburger div {
    width: 25px;
    height: 3px;
    background-color: #333;
}

header {
    padding-top: 150px;
    padding-bottom: 50px;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
    text-align: center;
    margin: 0;
}

header h1 {
    font-size: 3rem;
    margin: 0;
}

header p {
    font-size: 1.2rem;
    margin-top: 10px;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px; 
}

section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; 
}

.form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-bottom: 20px;
}

.form input[type="email"] {
    flex: 1;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    outline: none;
}

.form button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #2575fc;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.form button:hover {
    background-color: #1a5ecb; 
}

.loading-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2575fc;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.897);
    z-index: 1000;
    overflow: hidden;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

#pin-input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.modal-buttons button {
    padding: 10px 15px;
    font-size: 14px;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-buttons button:first-child {
    background: #28a745;
}

.modal-buttons button:last-child {
    background: #dc3545;
}

.modal-buttons button:hover {
    opacity: 0.9;
}

.email-preview {
    margin-top: 20px;
    width: 100%;
    text-align: center;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #ffffff;
}

.email-preview p {
    color: red;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    height: 50px;
    line-height: 40px;
}

footer a {
    color: #2575fc;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    nav .menu {
        display: none; 
        flex-direction: column;
        gap: 10px;
        position: absolute;
        top: 60px;
        right: 20px;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 10px;
        border-radius: 5px;
    }

    nav .menu.active {
        display: flex;
    }

    nav .hamburger {
        display: flex;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    form input[type="email"] {
        font-size: 0.9rem;
    }

    form button {
        font-size: 0.9rem;
    }
}
