/* RESET BÁSICO */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #fcf8ee;
    font-family: 'Times New Roman', serif;
    color: #333;
}

/* --- HEADER --- */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background-color: #fcf8ee; /* Asegurar fondo sólido */
    position: relative;
    z-index: 1000;
}

.logo-img {
    width: 80px; /* Ajustado para móvil */
    height: auto;
}

/* Menú normal (Desktop) */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    color: #000;
    text-decoration: none;
    font-family: sans-serif;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: #555;
    text-decoration: underline;
}

/* Botón Hamburguesa (Oculto en Desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
}

/* --- MENÚ DESPLEGABLE --- */
.dropdown-container {
    position: relative;
}

.recursos-lista {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; /* Alineado a la izquierda del botón */
    background-color: #fbf6e8;
    border: 1px solid #dcdcdc;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

.recursos-lista li {
    position: relative;
    border-bottom: 1px solid #eee;
}

.recursos-lista li a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.recursos-lista li a:hover {
    background-color: #ece5d3;
}

/* Submenús */
.submenu {
    display: none;
    position: absolute;
    left: 100%; /* A la derecha en Desktop */
    top: 0;
    background-color: #fbf6e8;
    border: 1px solid #dcdcdc;
    min-width: 300px; /* Más ancho para las tablas */
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* TABLAS RESPONSIVAS */
.table-responsive {
    overflow-x: auto; /* Permite scroll horizontal en celular */
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th, table td {
    padding: 8px;
    text-align: left;
}

/* --- SECCIÓN PRINCIPAL --- */
.intro-box {
    text-align: center;
    padding: 40px 20px;
}

.intro-box h2 {
    font-family: serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitulo {
    font-family: sans-serif;
    font-size: 1rem;
    margin-bottom: 40px;
    display: block;
}

/* GRID DE ESCUDOS */
.escudos-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Clave para que bajen en pantallas chicas */
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.escudo-item {
    width: 220px; /* Ancho fijo para mantener uniformidad */
    /* Se eliminó el margin-bottom que era para el texto */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centra la imagen verticalmente */
}

.escudo-item img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    /* Se eliminó el margin-bottom */
    transition: transform 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.escudo-item img:hover {
    transform: scale(1.05);
}

/* Se eliminaron los estilos de .texto-escudo porque ya no se usan */

/* =========================================
   MEDIA QUERIES (VERSIÓN MÓVIL Y TABLET) 
   ========================================= */
@media (max-width: 768px) {
    .header-flex {
        padding: 10px 20px;
    }

    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: flex; 
    }

    /* Ocultar menú y cambiar a vertical */
    .nav-menu {
        display: none; /* Se activa con JS */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fcf8ee;
        border-top: 1px solid #ccc;
        padding: 20px 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        align-items: flex-start;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 10px 20px;
        text-align: left;
    }

    .dropdown-container {
        width: 100%;
    }

    /* Dropdowns en móvil: Estilo acordeón (bajan en vez de flotar al lado) */
    .recursos-lista {
        position: relative;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #f7f1e1;
    }

    .submenu {
        position: relative;
        left: 0;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #eee8d5;
    }

    /* Ajuste de fuentes y espacios */
    .intro-box h2 {
        font-size: 2rem;
    }

    .escudos-grid {
        gap: 20px;
    }
}

#derechos{
    opacity: 50%;
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
}

.escudo-item{
    transition: 0.5s ease;
    cursor: pointer;
}

.escudos-grid:hover > :not(:hover) {
    opacity: 0.3;
}

.escudo-item:hover{
    transform: scale(1.1);
}
.recursos{
    transition: 0.5s ease;
    cursor: pointer;
}

.dropdown-container:hover > :not(:hover) {
    opacity: 0.3;
}
.recursos:hover{
    transform: scale(1.1);
}