html, body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: 0.1em;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background-image: url('./image/matthias-ebneter-eG-lN5G2xBU-unsplash.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0 auto;
    width: 60%;
    padding: 0;
}

header {
    color: #f6f6f6;
    padding: 1em;
    text-align: center;
    position: relative;
    z-index: 100;
}

header h1 {
    margin: 0;
}

header nav {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 1em;
}

header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li {
    margin: 0 10px;
    /* display: none; */
}

header nav ul li a {
    color: #f6f6f6;
    text-decoration: none;
}

main .prediction-form, main .results-panel, .dashboard-stats {
    flex: 1;
    background: linear-gradient(to bottom,  #5744b650, #cfc7fa40);
    padding: 1.5em;
    backdrop-filter: blur(90px);
    border-radius: 10px;
}

.content-home {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

main section {
    margin-bottom: 20px;
}

main section p {
    margin-bottom: 20px;
}

main section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

main section ul li {
    margin-bottom: 10px;
}

main section ul li a {
    color: #333;
    text-decoration: none;
}

main section ul li a:hover {
    color: #000;
}   

main section ul li a:visited {
    color: #333;
}

main section ul li a:active {
    color: #333;
}

main section ul li a:focus {
    color: #333;
}

article {
    margin-bottom: 20px;
}

article h2 {
    margin-bottom: 10px;
}

article p {
    margin-bottom: 20px;
}

article a {
    color: #333;
    text-decoration: none;
}

article a:hover {
    color: #000;
}   

article a:visited {
    color: #333;
}

article a:active {
    color: #333;
}

article a:focus {
    color: #333;
}

#result {
    text-align: center;
    display: none;
}

#result.is-visible {
    display: block;
}

.results-panel {
    background-color: #b2b2f8;
    border-radius: 25px;
    padding: 1em;
}

form {
    display: flex;
    flex-direction: column;
    gap: .2em;
}

form label {
    display: block;
}

form input[type="text"],
form input[type="email"],
form input[type="time"],
form input[type="date"],
form input[type="number"],
form input[type="file"],
form textarea {
    border: 1px solid #ccc;
    border-radius: 3px;
    display: block;
    font-size: 16px;
    padding: 4px;
    width: 96%;
}

form .hint {
    color: #460606;
    font-size: 14px;
    margin: 0.2em 0;
    font-style: italic;
}

form button {
    background-color: #5744b6;
    border: none;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 10px;
    width: 100%;
}   

form button:hover {
    background-color: #337;
}

form button:active {
    background-color: #000;
}

form button:focus {
    background-color: #000;
}

table {
    width: 100%;
    background-color: #b2b2f8;
}

table th {
    background-color: #337;
    color: #fff;
    padding: 1em;
}

table td {
    padding: 1em;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.card {
    background: rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 1rem;
}

.table-container {
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table thead {
    position: sticky;
    top: 0;
    background: #f0f0f0;
    z-index: 1;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

footer {
    color: #f6f6f6;
    padding: 20px;
    text-align: center;
}

footer p {
    margin: 0;
}

/* Estilos del botón hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100;
}

.hamburger .line {
    width: 100%;
    height: 2px;
    background-color: #f6f6f6;
    transition: all 0.3s ease;
}

/* Animación: hamburguesa → X */
.hamburger.active .line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active .line:nth-child(2) {
    opacity: 0;
}
.hamburger.active .line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menú móvil */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

/* En móvil: ocultar menú y mostrar hamburguesa */
@media (max-width: 600px) {
    h1 {
        font-size: 1.5em;
        margin-bottom: 0;
    }
    .nav-menu {
        position: fixed;
        top: -70px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 2rem;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 99;
        border-radius: 10px;
    }

    .nav-menu.active {
        transform: translateY(70px);
    }

    .hamburger {
        display: flex;
    }

    nav {
        justify-content: space-between;
        align-items: center;
        padding: 1em;
        flex-direction: row;
    }

    nav ul {
        align-items: center;
        gap: 1.5rem;
    }

    body {
        width: 90%;
    }
}
/* 
@media (max-width: 600px) {
    nav {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 1.5rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    nav ul li {
        padding: 0.5rem;
    }

    body {
        width: 90%;
    }
} */

@media (min-width: 600px) and (max-width: 1024px) {
    header h1 {
        font-size: 1em;
    }
    header nav {
        font-size: 1em;
    }
}

@media (min-width: 1024px) {
    /* h1 {
        font-size: 3em;
    } */
    .content-home {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    #result {
        order: 2;
        width: 100%;
    }

    .prediction-form {
        order: 1;
    }
}
