/*
 * EA4AC Modern 0.1.10
 * Todas las barras y separadores usan el ancho
 * existente de .container.
 */

/* Evitar barras y lineas a todo el ancho del navegador */
.site-shell .site-header,
.site-shell .primary-nav,
.site-shell .ea4ac-secondary-nav,
.site-shell .site-footer,
.site-shell .ea4ac-copyright {
    background: transparent !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* Todos los contenedores conservan su ancho original */
.site-shell .site-header__main.container,
.site-shell .primary-nav > .container,
.site-shell .ea4ac-secondary-nav > .container,
.site-shell .ea4ac-footer-grid.container,
.site-shell .ea4ac-copyright-inner.container {
    box-sizing: border-box;
    max-width: 100%;
}

/* Cabecera: banner, buscador y selector de tema */
.site-shell .site-header__main.container {
    background: var(--header);
}

/* Menú principal y su linea superior */
.site-shell .primary-nav > .container {
    background: var(--header);
    border-top: 1px solid var(--line);
}

/* Menú secundario: fondo exclusivamente dentro del tema */
.site-shell .ea4ac-secondary-nav > .container {
    background: #344b63;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

html[data-theme="light"]
.site-shell .ea4ac-secondary-nav > .container {
    background: #d8e2ec;
}

/* Columnas del pie */
.site-shell .ea4ac-footer-grid.container {
    background: var(--header);
    border-top: 1px solid var(--line);
}

/* Barra inferior: solo el ancho de la página */
.site-shell .ea4ac-copyright-inner.container {
    background: #090e16;
    border-top: 1px solid rgba(255,255,255,.14);
}

html[data-theme="light"]
.site-shell .ea4ac-copyright-inner.container {
    background: var(--header);
    border-top: 1px solid var(--line);
}

/* Mantener el espacio inferior del copyright */
.site-shell .ea4ac-copyright-inner {
    padding-bottom: 40px !important;
}

/* Evitar que el contenido multimedia desborde */
.site-shell img,
.site-shell video,
.site-shell iframe {
    max-width: 100%;
}

/* Los bloques de ancho completo no se salen de su zona */
.site-shell .site-main .alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* EA4AC-MARGENES-INTERIORES
 * No modificar el ancho original del tema.
 */

/* Boton de modo claro/oscuro */
.site-shell .site-header__actions {
    padding-right: 14px !important;
    box-sizing: border-box;
}

/* Primera columna del pie */
.site-shell .ea4ac-footer-grid.container > :first-child {
    padding-left: 14px !important;
    box-sizing: border-box;
}

/* Copyright dentro del ancho existente */
.site-shell .ea4ac-copyright-inner.container {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
    flex-wrap: wrap;
    overflow-wrap: break-word;
}

/* El contenido del copyright puede pasar a otra linea */
.site-shell .ea4ac-copyright-inner.container > * {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
}


/* EA4AC - Separacion real del boton de modo */
.site-header__actions {
    padding-right: 0 !important;
}

/* Selector del boton claro/oscuro */
.site-header__actions > button:first-of-type,
.site-header__actions > button[class*="theme"],
.site-header__actions > button[id*="theme"] {
    margin-right: 14px !important;
}


/* EA4AC-PIE-COMPACTO-0111 */

/* Reducir espacio despues del ultimo articulo */
body.home .site-shell .ea4ac-home-editable {
    padding-bottom: 12px !important;
    margin-bottom: 0 !important;
    min-height: 0 !important;
}

body.home .ea4ac-home-editable > :last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body.home .site-shell .site-main {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    min-height: 0 !important;
}

/* El pie nunca debe imponer una altura fija */
.site-shell .site-footer,
.site-shell .site-footer__main,
.site-shell .site-footer__bottom,
.site-shell .ea4ac-footer-grid.container,
.site-shell .ea4ac-copyright-inner.container {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Eliminar separaciones verticales sobrantes */
.site-shell .site-footer {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.site-shell .site-footer__main,
.site-shell .site-footer__bottom {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Las columnas crecen segun su contenido */
.site-shell .ea4ac-footer-grid.container {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    row-gap: 12px !important;
}

/* Reducir espacios dentro de los widgets */
.site-shell .site-footer .widget {
    min-height: 0 !important;
    margin-bottom: 10px !important;
}

.site-shell .site-footer .widget p {
    margin-top: 6px;
    margin-bottom: 8px;
}

/* Copyright compacto */
.site-shell .ea4ac-copyright-inner.container {
    padding-top: 10px !important;
    padding-bottom: 40px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

/* EA4AC - Correccion del espacio inferior del pie */

/* Columnas alineadas arriba, como originalmente */
.site-shell .ea4ac-footer-grid.container {
    align-items: start !important;
    padding-bottom: 8px !important;
    min-height: 0 !important;
    height: auto !important;
}

/* Evitar margenes extra tras el ultimo elemento */
.site-shell .ea4ac-footer-grid.container .widget {
    margin-bottom: 0 !important;
}

.site-shell .ea4ac-footer-grid.container .widget > :last-child,
.site-shell .ea4ac-footer-grid.container .widget p:last-child {
    margin-bottom: 0 !important;
}


/* EA4AC-PAGINACION-CENTRADA */

/* Paginacion centrada debajo de las tres columnas */
body.category .pagination,
body.category .navigation.pagination,
body.category .archive-pagination,
body.category .posts-pagination,
body.category .page-navigation,
body.category .modern-pagination,
body.tag .pagination,
body.tax .pagination {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 24px auto 0 !important;
    text-align: center !important;
}

/* Centrar los numeros y controles */
body.category .pagination .nav-links,
body.category .pagination ul.page-numbers,
body.category .archive-pagination .nav-links,
body.category .posts-pagination .nav-links,
body.tag .pagination .nav-links,
body.tax .pagination .nav-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}
