/* === CSS COMPLETO PARA EL MENU CON SUBELEMENTOS EN HEADER === */

body.item-set.resource.browse {
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-y: auto;
    min-height: 100vh;
    box-sizing: border-box;
}

.browse-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

body.item-set.resource.browse .resource-list {
    list-style: none;
    margin: 2rem auto;
    /* display: grid; */
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1200px;
    padding: 0 1rem;
}

body.item.resource.browse .resource-list {
    list-style: none;
    margin: 1rem auto;
    /* display: grid; */
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: initial;
    padding: 0 1rem;
}

.item-set.resource {
    background-color: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    height: 100%;
}

.item-set.resource:hover {
    transform: translateY(-4px);
}

.resource-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    box-sizing: border-box;
    color: white;
    transition: background 0.3s ease;
}

.resource-title {
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    margin: 0 0 0.25rem 0;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.resource-description {
    font-size: 0.9rem;
    line-height: 1.2;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

.image-wrapper:hover .overlay {
    background: rgba(0, 0, 0, 0.628);
}

.image-wrapper:hover .resource-title {
    opacity: 0;
}

.image-wrapper:hover .resource-description {
    opacity: 1;
    max-height: 100px;
}

.pagination {
    margin: 2rem;
    text-align: center;
}

.pagination a {
    margin: 0 0.25rem;
    border-radius: 0;
    text-decoration: none;
    color: #33333361;
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #eee;
}

/* Submenú con desplazamiento vertical solo para 'Explorar conjuntos de fichas' */
.main-navigation li.menu-offset > ul {
    /* top: 6% !important; */ /* o 130% según lo que necesites */
}

/* Responsive: mostrar submenús directamente */
@media (max-width: 768px) {
    /* .main-header .main-navigation ul ul {
        position: static;
        display: block;
        box-shadow: none;
    }

    .main-header .main-navigation li a {
        border-bottom: 1px solid #ccc;
    } */
}