/* ====== ESTILOS GLOBALES ====== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: white;
}

body {
    background-color: #1a1a1a;
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

html,
body {
    height: 100%;
}

/* ====== ENCABEZADO ====== */
header {
    text-align: center;
    padding: 1rem 0;
}

header h1 {
    color: #00b1a5;
    font-size: 2em;
}

header h3 {
    color: #00b1a5;
    font-size: 1em;
    margin-top: 0.3rem;
}

/* ====== MENÚ ====== */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    border-bottom: 3px solid #007d75;
    margin-bottom: 1rem;
    background-color: #222;
}

.menuTema {
    padding: 10px 25px;
    margin: 5px;
    border: 2px solid #007d75;
    border-radius: 8px 8px 0 0;
    background-color: #333;
    transition: all 0.3s ease;
}

.menuTema a {
    text-decoration: none;
    color: #00b1a5;
    font-weight: bold;
}

.menuTema:hover {
    background-color: #2d4740;
}

.menuTema.activo,
.menuTema.activo a {
    background-color: #1f4f6b;
    color: white;
}

/* ====== CONTENIDO ====== */
main {
    display: flex;
    flex-direction: column;
    gap: 20px;

    width: 100%;
    max-width: 3000px;
    /* o el tamaño que quieras */
    margin: auto;
    flex: 1;
    padding: 20px;

    /* CLAVE para repartir altura */
    justify-content: stretch;
}

section {
    background-color: #333;
    border: 2px solid #007d75;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.3s;

    width: 100%;
    max-width: 100%;
    /* usa TODO el ancho del main */
    height: 100%;
    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* el contenido empieza arriba */
}

section:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

section h2 {
    color: #00b1a5;
    text-align: center;
    margin-bottom: 1rem;
    align-self: center;
    /* se centra horizontalmente */
    margin-top: 0;
    /* se mantiene arriba */
}

section p {
    text-align: center;
    line-height: 1.6;
}

.listas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
}

.listas li {
    background-color: #222;
    border: 2px solid #007d75;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    transition: all 0.3s ease;
}

.listas li:hover {
    background-color: #1f4f6b;
    transform: translateY(-3px);
}

.listas a {
    color: #00b1a5;
    text-decoration: none;
    font-weight: 600;
}

/* ====== PIE ====== */
footer {
    text-align: center;
    border-top: 3px solid #007d75;
    padding: 1rem;
    font-size: 0.9em;
    color: #777;
}

/* ====== RESPONSIVIDAD ====== */

/* Tablets */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.7em;
    }

    .menuTema {
        padding: 8px 18px;
    }

    section {
        padding: 15px;
    }

    .listas {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Móviles */
@media (max-width: 480px) {
    nav {
        flex-direction: column;
        align-items: center;
    }

    .menuTema {
        width: 90%;
        text-align: center;
    }

    header h1 {
        font-size: 1.5em;
    }

    section h2 {
        font-size: 1.2em;
    }

    .listas {
        grid-template-columns: 1fr;
    }
}