/*
Theme Name: Gaceta 2026
Description: Theme propio de Gaceta INSP, reconstruido desde cero.
Author: INSP
Version: 1.5.11
Text Domain: gaceta-2026
*/

/* ---------- Tokens ---------- */
:root {
    --color-bg: #ffffff;
    --color-text: #111111;
    --color-text-muted: #565656;
    --color-border: #e6e6e6;
    --color-teal: #16b7cc;
    --color-badge: #1100f7;

    --font-heading: "Work Sans", system-ui, -apple-system, sans-serif;
    --font-serif: "PT Serif", Georgia, serif;

    --container-width: 1200px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-heading);
    color: var(--color-text);
    background: var(--color-bg);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid var(--color-border);
}

.header-top {
    border-bottom: 1px solid var(--color-border);
}

.header-top .container {
    display: flex;
    justify-content: center;
}

.primary-nav > ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0.9rem 0;
}

.primary-nav > ul > li {
    position: relative;
}

.primary-nav > ul > li > a {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.primary-nav .menu-item-has-children > a::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f078";
    font-size: 0.7em;
    margin-left: 0.4em;
}

.primary-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 20;
}

.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu {
    display: block;
}

.primary-nav .sub-menu a {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
}

.primary-nav .sub-menu a:hover {
    background: #f7f7f7;
    color: var(--color-teal);
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
}

.header-main-side {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.header-main-side.icons-right {
    justify-content: flex-end;
}

.social-links {
    display: flex;
    gap: 0.9rem;
}

.social-links a {
    color: var(--color-text);
    font-size: 0.95rem;
    transition: color 0.2s ease-in-out;
}

.social-links a.facebook-hover:hover {
    color: #3b579d;
}

.social-links a.twitter-hover:hover {
    color: #00ace5;
}

.social-links a.youtube-hover:hover {
    color: #e21c2d;
}

.site-logo img {
    height: 57px;
    width: auto;
}

.header-icons {
    display: flex;
    gap: 1.1rem;
    font-size: 1.05rem;
}

/* ---------- Layout con sidebar ---------- */
.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 3rem;
    padding: 2.5rem 0;
}

.content-layout.no-sidebar {
    grid-template-columns: 1fr;
}

.pagination {
    margin: 20px 0;
}

.pagination .page-numbers {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    color: #337ab7;
    transition: color 0.2s ease-in-out;
}

.pagination .page-numbers:hover {
    color: #23527c;
}

.pagination .page-numbers.current {
    color: var(--color-text);
}

/* ---------- Artículo: categoría, título, autores (siempre centrados) ---------- */
.post-eyebrow {
    color: var(--color-text);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.post-title {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
    text-align: center;
    margin: 0.5rem 0 0.75rem;
}

.post-title a {
    transition: color 0.2s ease-in-out;
}

.post-title a:hover {
    color: var(--color-badge);
}

.post-card .post-title {
    font-size: 1.875rem;
    line-height: 33px;
}

.post-byline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: #111;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: capitalize;
    line-height: 1.7;
    margin: 0 auto 1.25rem;
}

.post-byline .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9e9e9;
    flex-shrink: 0;
}

.post-thumb {
    position: relative;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.post-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.post-thumb:hover::before {
    opacity: 1;
}

.post-excerpt,
.post-content,
.page-content {
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 26px;
    color: var(--color-text-muted);
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-text);
    margin: 20px 0;
}

.post-content h2 {
    font-size: 30px;
    line-height: 33px;
}

.post-content h3 {
    font-size: 24px;
    line-height: 26.4px;
}

.post-content h4 {
    font-size: 18px;
    line-height: 19.8px;
}

.post-content h5 {
    font-size: 14px;
    line-height: 15.4px;
}

.post-content h6 {
    font-size: 12px;
    line-height: 13.2px;
}

.post-content hr {
    border: 0;
    border-top: 2px solid #808080;
    margin: 20px 0;
}

.post-authors-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 30px;
    line-height: 33px;
    letter-spacing: -0.2px;
    color: var(--color-text);
    margin: 20px 0;
}

.post-author-card {
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #999;
    padding: 21px;
    margin-bottom: 14px;
}

.post-author-avatar .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e9e9e9;
    flex-shrink: 0;
}

.post-author-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.post-author-name {
    font-family: var(--font-heading);
    font-size: 16.8px;
    color: var(--color-badge);
}

.post-author-link {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    background: #655997;
    color: #fff;
    border-radius: 999px;
    font-size: 14px;
}

.page-content {
    max-width: 1140px;
    margin: 0 auto 3rem;
}

.page-content p {
    margin: 0 0 10px;
}

.page-content h2,
.page-content h3 {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 500;
    color: var(--color-text);
    margin: 20px 0;
}

.post-card {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

.post-card:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.post-share {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.post-share-toggle {
    border: 0;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.post-share-buttons {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    padding: 0.5rem;
    gap: 0.6rem;
    white-space: nowrap;
    z-index: 5;
}

.post-share:hover .post-share-buttons,
.post-share:focus-within .post-share-buttons {
    display: flex;
}

.post-share-buttons a {
    color: var(--color-text-muted);
}

.btn-outline {
    display: inline-block;
    margin-top: 1rem;
    padding: 0 20px;
    line-height: 36px;
    border: 1px solid #ddd;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.btn-outline:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

/* ---------- Cabecera de artículo individual: banda a todo lo ancho ---------- */
.article-hero {
    position: relative;
    aspect-ratio: 1280 / 710;
    background-size: cover;
    background-position: center;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.article-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
}

.article-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem 1.5rem;
    text-align: center;
}

.article-hero .post-eyebrow,
.article-hero .post-title,
.article-hero .post-byline,
.article-hero .post-share-toggle {
    color: #fff;
}

.article-hero .post-title {
    font-size: 54px;
    line-height: 56px;
}

/* ---------- Sidebar ---------- */
.search-box {
    display: flex;
    border: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.search-box input {
    flex: 1;
    border: 0;
    padding: 0.75rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.search-box button {
    border: 0;
    border-left: 1px solid var(--color-border);
    background: transparent;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
}

.widget {
    margin-bottom: 2rem;
}

.widget-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

.widget-tabs button {
    flex: 1;
    background: none;
    border: 0;
    font-family: var(--font-heading);
    padding: 0.75rem 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.widget-tabs button.is-active {
    color: var(--color-teal);
    border-bottom-color: var(--color-teal);
}

.widget-tab-panel {
    display: none;
}

.widget-tab-panel.is-active {
    display: block;
}

.ranked-badge {
    position: absolute;
    top: -10px;
    left: 10px;
    z-index: 2;
    background: var(--color-badge);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    width: 29px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ranked-first {
    position: relative;
    display: block;
    min-height: 190px;
    background-size: cover;
    background-position: center;
    background-color: #ccc;
    margin-bottom: 1.25rem;
}

.ranked-first::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.ranked-first:hover::before {
    opacity: 1;
}

.ranked-first-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    color: #fff;
}

.ranked-first-title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
}

.ranked-first-byline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.ranked-first-byline .avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ranked-item {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    margin-bottom: 1.1rem;
}

.ranked-item-thumb {
    position: relative;
    flex: 0 0 30%;
    aspect-ratio: 1 / 1;
    background: #eee;
}

.ranked-item-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.ranked-item:hover .ranked-item-thumb::before {
    opacity: 1;
}

.ranked-item-thumb-crop {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ranked-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranked-item-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-text);
}

/* ---------- Home: hero / carrusel ---------- */
.home-hero {
    position: relative;
    height: 623px;
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    cursor: grab;
}

.home-hero.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.home-hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-color: #2f3b2f;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
}

.home-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.home-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 50% 50%;
    -webkit-user-drag: none;
    user-select: none;
}

.home-hero-card {
    position: relative;
    z-index: 1;
    background: var(--color-bg);
    width: 450px;
    max-width: 90%;
    margin-left: 24%;
    padding: 35px 30px 35px 30px;
    text-align: left;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out; /* duración real la fija hero-slider.js */
}

.home-hero-card .post-eyebrow,
.home-hero-card .post-byline {
    text-align: left;
    justify-content: flex-start;
}

.home-hero-card .post-byline {
    display: block;
    font-family: "Playfair Display", Arial, serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 25.2px;
    color: #8c8c8c;
    text-transform: none;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: var(--color-teal);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hero-arrow:hover {
    background: var(--color-teal);
    color: #fff;
}

.hero-arrow-prev {
    left: 1.5rem;
}

.hero-arrow-next {
    right: 1.5rem;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    background: #fff;
    padding: 5px 10px;
    border-radius: 99px;
}

.hero-dot {
    box-sizing: content-box;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.57);
    cursor: pointer;
    padding: 5px;
    background-clip: content-box;
}

.hero-dot:hover {
    background-color: var(--color-teal);
}

.hero-dot.is-active {
    background-color: var(--color-teal);
}

.home-hero-card .post-title {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    font-size: 30px;
    line-height: 39px;
    text-align: left;
}

.home-hero-zigzag {
    display: block;
    width: 74px;
    height: 13px;
    margin: 20px 0;
}

.home-hero-card .post-title a {
    color: var(--color-text);
}

.btn-teal {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 10px 18px;
    background: var(--color-teal);
    color: #fff;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 3px;
}

.btn-teal:hover {
    background: #139fb1;
}

.home-hero .df-lite,
.home-hero ._df_book {
    width: 100%;
}

/* ---------- Banner de página estándar (páginas simples, Números) ---------- */
.page-banner {
    background: #f8f8f8;
    padding: 50px 0;
}

.page-banner h1 {
    font-family: var(--font-heading);
    font-size: 37px;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-transform: capitalize;
    text-align: center;
    color: var(--color-text);
    margin: 0;
}

.numero-presentacion h2 {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 500;
    margin: 0 0 15px;
}

.author-banner {
    background: #f8f8f8;
}

.author-banner-inner {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 50px 0;
}

.author-banner-avatar .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #e9e9e9;
    flex-shrink: 0;
}

.author-banner-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 22px;
    color: var(--color-text);
    margin: 0;
}

/* ---------- Búsqueda ---------- */
.search-toggle {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
}

.search-toggle.is-active {
    color: var(--color-teal);
}

.search-bar {
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: max-height 0.4s ease;
}

.search-bar.is-open {
    max-height: 200px;
}

.search-bar .container {
    position: relative;
    padding-top: 50px;
    padding-bottom: 50px;
}

.search-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 700;
    color: var(--color-text);
}

.search-bar input::placeholder {
    color: var(--color-text);
    opacity: 1;
}

.search-bar-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 12px;
    color: #bbb;
}

.search-bar-close {
    position: absolute;
    top: 50px;
    right: 15px;
    background: none;
    border: 0;
    font-size: 24px;
    line-height: 1;
    color: var(--color-text);
    cursor: pointer;
}

.search-page-banner {
    background: #f8f8f8;
    padding: 50px 0;
    text-align: center;
}

.search-page-banner h1 {
    font-family: var(--font-heading);
    font-size: 27px;
    font-weight: 700;
    color: #999;
    margin: 0;
}

.search-page-banner h1 strong {
    color: var(--color-text);
}

.page-error-code {
    background: #1100f7;
    padding: 50px 0;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 150px;
    font-weight: 900;
    color: #fff;
}

.page-error-body {
    text-align: center;
    padding: 50px 0;
}

.page-error-body h1 {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.75rem;
}

.page-error-body p {
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--color-text);
    margin: 0 0 1.5rem;
}

.page-error-button {
    display: inline-block;
    padding: 15px 30px;
    background: #eee;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.not-found {
    text-align: center;
    padding: 3rem 0 50px;
    border-bottom: 1px solid #eee;
}

.not-found h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    color: var(--color-text);
    margin: 0 0 10px;
}

.not-found span {
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--color-text);
}

.search-again {
    text-align: center;
    padding: 3rem 0;
}

.search-again span {
    display: block;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-size: 13px;
    color: #999;
}

.search-again form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-again input {
    width: 100%;
    height: 50px;
    padding: 6px 90px 6px 12px;
    border: 2px solid #ddd;
    font-family: var(--font-serif);
    font-size: 14px;
}

.search-again button {
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 50px;
    background: #efefef;
    color: #fff;
    border: 0;
}

/* ---------- Números ---------- */
.numeros-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin: 3rem 0;
    padding: 0;
    list-style: none;
}

.numeros-grid a {
    display: block;
    color: var(--color-text);
}

.numeros-grid img {
    display: block;
    width: 100%;
    height: auto;
}

.numeros-grid span {
    display: block;
    margin-top: 7px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 50px;
    background: #fff;
    color: var(--color-text);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-bottom: 40px;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 10px;
}

.footer-logo {
    max-width: 338px;
    width: 100%;
    height: auto;
    margin-bottom: 30px;
}

.footer-social {
    display: flex;
    gap: 5px;
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: #fff;
    font-size: 1.1rem;
    transition: opacity 0.2s ease-in-out;
}

.footer-social-icon:hover {
    opacity: 0.8;
}

.footer-social-facebook {
    background: #3b579d;
}

.footer-social-twitter {
    background: #00ace5;
}

.footer-social-youtube {
    background: #e21c2d;
}

.footer-social-instagram {
    background: #000;
}

.footer-colophon {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    margin: 0;
}

.footer-latest-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-latest-item:last-child {
    margin-bottom: 0;
}

.footer-latest-thumb {
    position: relative;
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    background: #eee;
    overflow: hidden;
}

.footer-latest-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.footer-latest-thumb:hover::before {
    opacity: 1;
}

.footer-latest-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-latest-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background: #fff;
    color: var(--color-text);
    font-size: 12px;
    font-weight: 700;
    line-height: 30px;
    text-align: center;
}

.footer-latest-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    line-height: 17px;
    margin: 0;
}

.footer-latest-title a {
    color: var(--color-text);
}

.footer-latest-date {
    /* Existe en el markup real pero el sitio lo oculta con display:none;
       se deja igual (nunca se muestra) en vez de quitarlo del PHP. */
    display: none;
}

.footer-copyright-bar {
    padding: 15px 0;
    text-align: center;
}

.footer-copyright-bar p {
    margin: 0;
    font-size: 11px;
    line-height: 1.7;
}

/* ---------- Menú móvil ---------- */
.mobile-menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
}

.mobile-menu-toggle span {
    position: relative;
    width: 18px;
    height: 2px;
    margin: 2px 0;
    background: var(--color-text);
}

.mobile-menu-toggle span::before {
    content: "";
    position: absolute;
    top: 0;
    left: -4px;
    width: 4px;
    height: 2px;
    background: #fff;
    transition: left 0.3s ease-in-out;
}

.mobile-menu-toggle span:nth-child(2)::before {
    transition-delay: 0.3s;
}

.mobile-menu-toggle span:nth-child(3)::before {
    transition-delay: 0.6s;
}

.mobile-menu-toggle:hover span::before {
    left: 22px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 361px;
    max-width: 90vw;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu-inner {
    padding: 17.5px 30px 30px;
}

.mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.mobile-menu-top img {
    height: 30px;
    width: auto;
}

.mobile-menu-close {
    width: 35px;
    height: 35px;
    border: 0;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: var(--color-text);
    cursor: pointer;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav > ul > li {
    position: relative;
}

.mobile-nav > ul > li + li {
    border-top: 1px solid #eee;
}

.mobile-nav > ul > li > a {
    display: block;
    line-height: 45px;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
}

.mobile-submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: none;
    border: 0;
    color: var(--color-text);
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-nav > ul > li.is-open > .mobile-submenu-toggle {
    transform: rotate(180deg);
}

.mobile-nav .sub-menu {
    display: none;
    padding-left: 20px;
    border-top: 1px solid #eee;
}

.mobile-nav .sub-menu > li + li {
    border-top: 1px solid #eee;
}

.mobile-nav > ul > li.is-open > .sub-menu {
    display: block;
}

.mobile-nav .sub-menu a {
    display: block;
    line-height: 35px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
}

.mobile-menu-social {
    display: flex;
    gap: 5px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.mobile-menu-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 14px;
    color: var(--color-text);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .header-main .container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .header-main-side {
        flex: none;
        justify-content: center !important;
    }

    .primary-nav > ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .primary-nav .sub-menu {
        position: static;
        border: 0;
        box-shadow: none;
        padding-left: 1rem;
    }

    .article-hero {
        aspect-ratio: auto;
        min-height: 320px;
    }

    .article-hero .post-title {
        font-size: 1.8rem;
    }

    .home-hero {
        height: auto;
        min-height: 460px;
    }

    .home-hero-card {
        width: auto;
        margin: 2rem 1rem;
        max-width: none;
    }

    .numeros-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* ---------- Portal de autores (/portal-autores/) ----------
   Sección nueva sin equivalente en el sitio original, así que estos
   estilos son criterio propio. Van aparte y con selectores solo bajo
   .gaceta-portal para no afectar otros formularios del sitio (p. ej.
   el de Contacto, que debe seguir igual al de producción). */

.gaceta-portal {
    padding: 40px 0;
    max-width: 900px;
}

.gaceta-portal-error {
    color: #b32d2e;
}

.gaceta-portal-exito {
    color: #1e7e34;
}

.gaceta-portal-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.85rem;
}

.gaceta-portal-form input[type="email"],
.gaceta-portal-form input[type="text"],
.gaceta-portal-form input[type="password"],
.gaceta-portal-form select {
    box-sizing: border-box;
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 0.95rem;
    color: var(--color-text);
}

.gaceta-portal-form input[type="file"] {
    font-size: 0.9rem;
}

.gaceta-portal-form input[type="email"]:focus,
.gaceta-portal-form input[type="text"]:focus,
.gaceta-portal-form input[type="password"]:focus,
.gaceta-portal-form select:focus {
    outline: none;
    border-color: var(--color-teal);
}

.gaceta-portal-form-login input[type="email"],
.gaceta-portal-form-login input[type="password"] {
    max-width: 320px;
}

.gaceta-portal-form .btn-teal {
    border: 0;
    cursor: pointer;
}

.gaceta-portal-imagen-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.gaceta-portal-imagen-inline .btn-teal {
    margin-top: 0;
    padding: 6px 12px;
}

.gaceta-portal-imagen-inline #gaceta-imagen-inline-estado {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.gaceta-portal-ayuda {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.gaceta-portal-tabla {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--color-border);
}

.gaceta-portal-tabla th,
.gaceta-portal-tabla td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

.gaceta-portal-tabla thead th {
    background: #f5f5f5;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
}

.gaceta-portal-tabla tbody tr:last-child td {
    border-bottom: 0;
}

.gaceta-portal-tabla tbody tr:hover {
    background: #fafafa;
}

.gaceta-portal-lista-acciones {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.gaceta-portal-lista-acciones form {
    margin: 0;
}

.gaceta-portal-lista-acciones a,
.gaceta-portal-lista-acciones button {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 3px;
    font-family: inherit;
    font-size: inherit;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gaceta-portal-lista-acciones a {
    color: var(--color-text);
}

.gaceta-portal-lista-acciones a:hover {
    background: var(--color-teal);
    color: #fff;
}

.gaceta-portal-lista-acciones button {
    background: none;
    border: 0;
    color: #b32d2e;
    cursor: pointer;
}

.gaceta-portal-lista-acciones button:hover {
    background: #b32d2e;
    color: #fff;
}

.gaceta-portal-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.gaceta-portal-panel-header h2 {
    margin: 0;
}

.gaceta-portal-cancelar {
    display: inline-block;
    margin-left: 12px;
    padding: 10px 18px;
    border-radius: 3px;
    color: var(--color-text-muted);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.gaceta-portal-cancelar:hover {
    background: var(--color-border);
    color: var(--color-text);
}
