/* ============================================
   PÁGINAS INTERIORES DEL PORTAL (directorio de actores y publicaciones)
   Encabezado del inicio en versión compacta, buscador, filtros, conteo,
   etiquetas y paginación. Cada página agrega lo suyo (directorio.css,
   publicaciones.css).
   ============================================ */

/* ---------- Encabezado: el del inicio, más bajo ---------- */

.gef-hero-wrapper--interior .hero-image-side {
    min-height: 0;
}

.gef-hero-wrapper--interior .gef-navbar {
    margin-bottom: 40px;
}

.gef-hero-wrapper--interior .hero-text-container {
    margin-top: 0;
}

.gef-hero-wrapper--interior .hero-title {
    font-size: 3rem;
    margin-bottom: 22px;
}

/* Página actual en el menú: subrayado verde, sin mover el resto */
.nav-links a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--gef-green-light);
    text-decoration-thickness: 3px;
    text-underline-offset: 9px;
}

/* ---------- Sección ---------- */

.portal-section {
    padding: 64px 0 72px;
    background: #fff;
}

.portal-section .section-title {
    text-align: center;
    margin-bottom: 18px;
}

.portal-intro {
    color: #3F7C99;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.portal-aviso {
    text-align: center;
    color: #4A6F85;
    font-weight: 600;
}

/* Foco visible en todos los controles (sobre fondo blanco) */
.portal-section a:focus-visible,
.portal-section input:focus-visible,
.portal-section select:focus-visible,
.portal-section button:focus-visible {
    outline: 3px solid #0e668d;
    outline-offset: 2px;
}

/* ---------- Buscador ---------- */

.portal-search {
    max-width: 760px;
    margin: 0 auto 24px;
    position: relative;
}

.portal-search svg {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #3F7C99;
    pointer-events: none;
}

.portal-search input {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: #0D4E75;
    padding: 0.95rem 8.5rem 0.95rem 3.3rem;
    border: 2px solid #3F7C99;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(13, 78, 117, 0.08);
}

.portal-search input::placeholder {
    color: #587284;
    font-weight: 500;
}

.portal-search-btn {
    position: absolute;
    right: 7px;
    top: 7px;
    bottom: 7px;
    padding: 0 1.4rem;
    border: none;
    border-radius: 999px;
    background: #3F7C99;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.portal-search-btn:hover {
    background: #0D4E75;
}

/* ---------- Filtros ---------- */

.portal-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px 16px;
    align-items: end;
    margin: 0 0 32px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #f4f8fb;
}

.portal-filtro label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4A6F85;
}

.portal-filtro select {
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0D4E75;
    padding: 0.5rem 2.1rem 0.5rem 0.9rem;
    border: 1.5px solid #9fbccd;
    border-radius: 999px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233F7C99'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 0.85rem center / 11px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.portal-filtro-acciones {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-btn {
    padding: 0.55rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: #0D4E75;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.portal-btn:hover {
    background: #3F7C99;
}

/* Variante clara (sobre fondo blanco o azulado) */
.portal-btn--claro {
    background: #fff;
    color: #0D4E75;
    box-shadow: inset 0 0 0 2px #0D4E75;
}

.portal-btn--claro:hover {
    background: #e6f0f6;
    color: #0D4E75;
}

.portal-limpiar {
    color: #0e668d;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

/* ---------- Resultados ---------- */

.portal-meta {
    margin: 0 0 12px;
    color: #4A6F85;
    font-size: 0.88rem;
    font-weight: 600;
}

/* ---------- Etiquetas ---------- */

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: #e6f0f6;
    color: #0e668d;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

a.chip:hover {
    background: #d3e5f0;
}

/* ---------- Paginación ---------- */

.portal-pager ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
}

.portal-pager a,
.portal-pager span.is-current,
.portal-pager .dots {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.portal-pager a,
.portal-pager span.is-current {
    border: 2px solid #3F7C99;
    color: #3F7C99;
}

.portal-pager a:hover {
    background: #e6f0f6;
}

.portal-pager .is-current {
    background: #3F7C99;
    color: #fff !important;
}

.portal-pager .dots {
    width: auto;
    color: #3F7C99;
}

.portal-pager .arrow {
    font-size: 1.4rem;
    line-height: 1;
}

/* ---------- Tableta y móvil ---------- */

@media (max-width: 991px) {
    .gef-hero-wrapper--interior .hero-title {
        font-size: 2rem;
    }
}

/* Móvil */
@media (max-width: 767.98px) {
    .portal-section {
        padding: 44px 0 56px;
    }

    .portal-search input {
        padding-right: 6.6rem;
        font-size: 0.95rem;
    }

    .portal-search-btn {
        padding: 0 1rem;
    }

    .portal-filtros {
        grid-template-columns: 1fr 1fr;
        padding: 14px;
    }

    .portal-filtro-acciones {
        grid-column: 1 / -1;
    }
}

@media (max-width: 400px) {
    .portal-filtros {
        grid-template-columns: 1fr;
    }
}
