/* ==========================================================================
   El Diario Norte — portada y estilo editorial
   ========================================================================== */

:root {
    --edn-ink: #121417;
    --edn-muted: #6b6b6b;
    --edn-rule: #d8d5cf;
    --edn-ink-soft: #2b2d30;
    --edn-line-strong: #b8b2a7;
    --edn-line-soft: #e3dfd7;
    --edn-accent: var(--ghost-accent-color, #a6192e);
    --edn-paper: #ffffff;
    --edn-paper-soft: #faf9f6;
    --edn-serif: var(--gh-font-heading, Georgia), Georgia, "Times New Roman", serif;
    --edn-sans: var(--gh-font-body, Arial), Arial, Helvetica, sans-serif;
}

/* Masthead / navegación */
#gh-navigation {
    border-top: 2px solid var(--edn-ink-soft);
}
.home-template #gh-navigation .gh-navigation-brand img {
    max-height: 62px;
}

#gh-navigation .gh-navigation-brand img {
    max-width: 100%;
    height: auto;
}

.gh-navigation-menu .nav a {
    font-family: var(--edn-sans);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gh-navigation-menu .nav .nav-current a,
.gh-navigation-menu .nav a:hover {
    color: var(--edn-accent);
}

/* Portada */
.edn-frontpage {
    padding-top: 0;
    
    /* Configuración de la entrada suavizada */
    animation: fadeInPage 1.2s cubic-bezier(0.215, 0.610, 0.355, 1) forwards;
    opacity: 0; /* Arranca invisible */
}

.edn-edition-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    border-bottom: 1px solid var(--edn-rule);
    padding: 11px 0;
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--edn-muted);
}

.edn-edition-date {
    white-space: nowrap;
}

.edn-weather {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 205px;
    padding: 4px 0;
    color: var(--edn-ink-soft);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-transform: none;
    white-space: nowrap;
}

.edn-weather-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    color: var(--edn-accent);
}

.edn-weather-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.edn-weather-place {
    color: var(--edn-ink-soft);
    font-weight: 700;
}

.edn-weather-sep {
    color: var(--edn-line-strong);
}

.edn-weather-temp {
    color: var(--edn-ink);
    font-weight: 800;
}

.edn-weather-condition {
    color: var(--edn-muted);
}

.edn-weather-condition:not(:empty)::before {
    content: "·";
    margin-right: 6px;
    color: var(--edn-line-strong);
}

.edn-weather[data-state="error"] .edn-weather-icon {
    color: var(--edn-muted);
}

/* Definición de la animación editorial premium */
@keyframes fadeInPage {
    0% {
        opacity: 0;
        transform: translateY(15px); /* Sube levemente desde abajo */
    }
    100% {
        opacity: 1;
        transform: translateY(0); /* Queda en su posición original */
    }
}

.edn-front {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
    gap: 34px;
    align-items: start;
}

.edn-lead {
    border-bottom: 1px solid var(--edn-line-soft);
    padding-bottom: 30px;
}

.edn-lead-media {
    margin: 0 0 18px;
}

.edn-lead-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.edn-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--edn-accent);
    text-decoration: none;
}

.edn-lead-title {
    margin: 0 0 14px;
    font-family: var(--edn-serif);
    font-size: clamp(2.8rem, 5vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.edn-lead-title a {
    color: var(--edn-ink);
    text-decoration: none;
}

.edn-lead-title a:hover,
.edn-card-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.edn-lead-excerpt {
    max-width: 66ch;
    margin: 0 0 15px;
    font-family: var(--edn-sans);
    font-size: 1.8rem;
    line-height: 1.55;
    color: #333;
}

.edn-meta,
.edn-card-meta {
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--edn-muted);
}

.edn-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Columna de Vida */
.edn-vida {
    border-left: 1px solid var(--edn-rule);
    padding-left: 30px;
}

.edn-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--edn-line-strong);
}

.edn-section-header h2 {
    margin: 0;
    font-family: var(--edn-serif);
    font-size: 2.6rem;
    line-height: 1;
}

.edn-section-header h2 a {
    color: var(--edn-ink);
    text-decoration: none;
}

.edn-section-more {
    white-space: nowrap;
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--edn-accent);
    text-decoration: none;
}

.edn-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.edn-card {
    display: block;
}

.edn-card-media {
    display: block;
}

.edn-card-media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.edn-lead-media img,
.edn-card-media img,
.gh-card-image img,
.gh-article-image img {
    border-radius: 2px;
}

.edn-card-title {
    margin: 0 0 6px;
    font-family: var(--edn-serif);
    font-size: 1.9rem;
    line-height: 1.12;
}

.edn-card-title a {
    color: var(--edn-ink);
    text-decoration: none;
}

/* Etiqueta y bajada de la tarjeta: ocultas por defecto, se muestran en la nota destacada */
.edn-card-kicker,
.edn-card-excerpt {
    display: none;
}

.edn-card-kicker {
    margin-bottom: 8px;
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--edn-accent);
    text-decoration: none;
}

.edn-vida-block .edn-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    border-bottom: 1px solid var(--edn-line-soft);
    padding-bottom: 18px;
}

.edn-vida-block .edn-card:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.edn-vida-block .edn-card-media img {
    aspect-ratio: 1 / 1;
}

/* Secciones a lo ancho, cada una con su propio ritmo */
.edn-sections {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 50px;
    margin-top: 44px;
}

/* Variantes de layout de portada (Diseño → Homepage) */
.edn-layout--lead-right .edn-front {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 1.85fr);
}

.edn-layout--lead-right .edn-lead {
    order: 2;
}

.edn-layout--lead-right .edn-vida {
    order: 1;
    border-left: 0;
    border-right: 1px solid var(--edn-rule);
    padding-left: 0;
    padding-right: 30px;
}

.edn-layout--lead-full .edn-front {
    grid-template-columns: minmax(0, 1fr);
}

.edn-layout--lead-full .edn-vida {
    border-left: 0;
    border-top: 1px solid var(--edn-rule);
    padding-left: 0;
    padding-top: 26px;
    margin-top: 8px;
}

.edn-layout--lead-full .edn-vida .edn-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.edn-layout--lead-full .edn-vida-block .edn-card {
    grid-template-columns: minmax(0, 1fr);
    border-bottom: 0;
    padding-bottom: 0;
}

/* Estilos de etiquetas configurables (Diseño → Homepage) */
.tags-soft .edn-kicker,
.tags-soft .edn-card-kicker,
.tags-soft .gh-card-tag,
.tags-soft .gh-article-tag,
.tags-soft .edn-section-label {
    background: color-mix(in srgb, var(--edn-tag-bg) 15%, transparent);
    color: var(--edn-tag-bg);
    border: 1px solid var(--edn-tag-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

.tags-solid .edn-kicker,
.tags-solid .edn-card-kicker,
.tags-solid .gh-card-tag,
.tags-solid .gh-article-tag,
.tags-solid .edn-section-label {
    background: var(--edn-tag-bg);
    color: var(--edn-tag-text);
    padding: 3px 9px;
    border-radius: 4px;
}

.tags-pill .edn-kicker,
.tags-pill .edn-card-kicker,
.tags-pill .gh-card-tag,
.tags-pill .gh-article-tag,
.tags-pill .edn-section-label {
    background: var(--edn-tag-bg);
    color: var(--edn-tag-text);
    padding: 3px 11px;
    border-radius: 999px;
}

/* Estilo "Barra de color": una barra vertical fina antes del texto, sin fondo ni borde */
.tags-bar .edn-kicker,
.tags-bar .edn-card-kicker,
.tags-bar .gh-card-tag,
.tags-bar .gh-article-tag,
.tags-bar .edn-section-label {
    background: linear-gradient(var(--edn-tag-bg), var(--edn-tag-bg)) left center / 4px 0.8em no-repeat;
    border: 0;
    border-radius: 0;
    padding: 0 0 0 12px;
    color: var(--edn-tag-bg);
}

/* ==========================================================================
   Secciones con ritmo: la posición decide el layout
   1ª = nota destacada · 2ª = filas horizontales · 3ª = ranking numerado
   ========================================================================== */

.edn-sections .edn-section-header {
    border-top: 2px solid var(--edn-ink);
    padding-top: 14px;
    margin-bottom: 22px;
}

.edn-sections .edn-section-header h2 {
    font-size: 3rem;
}

.edn-sections .edn-card {
    display: block;
}

.edn-sections .edn-card-media {
    margin-bottom: 12px;
}

.edn-sections .edn-card-title {
    font-size: 2.1rem;
}

/* Variante 1 · Destacada (3n+1): 1 nota grande + las demás al costado */
.edn-sections .edn-section:nth-child(3n+1) .edn-cards {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.edn-sections .edn-section:nth-child(3n+1) .edn-card:first-child {
    grid-column: 1;
    grid-row: 1 / span 8;
}

.edn-sections .edn-section:nth-child(3n+1) .edn-card:not(:first-child) {
    grid-column: 2;
    border-top: 1px solid var(--edn-line-soft);
    padding-top: 16px;
}

.edn-sections .edn-section:nth-child(3n+1) .edn-card:first-child .edn-card-media img {
    aspect-ratio: 16 / 9;
}

.edn-sections .edn-section:nth-child(3n+1) .edn-card:first-child .edn-card-title {
    font-size: clamp(2.6rem, 3.4vw, 4rem);
    line-height: 1.04;
}

.edn-sections .edn-section:nth-child(3n+1) .edn-card:first-child .edn-card-kicker {
    display: inline-block;
}

.edn-sections .edn-section:nth-child(3n+1) .edn-card:first-child .edn-card-excerpt {
    display: block;
    margin: 10px 0 0;
    max-width: 60ch;
    font-family: var(--edn-sans);
    font-size: 1.6rem;
    line-height: 1.55;
    color: #333;
}

.edn-sections .edn-section:nth-child(3n+1) .edn-card:not(:first-child) .edn-card-media img {
    aspect-ratio: 16 / 10;
}

/* Si la sección tiene una sola nota, ocupa todo el ancho */
.edn-sections .edn-cards > .edn-card:only-child {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
}

/* Variante 2 · Filas horizontales (3n+2) */
.edn-sections .edn-section:nth-child(3n+2) .edn-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px 30px;
}

.edn-sections .edn-section:nth-child(3n+2) .edn-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    border-top: 1px solid var(--edn-line-soft);
    padding-top: 16px;
}

.edn-sections .edn-section:nth-child(3n+2) .edn-card-media {
    margin-bottom: 0;
}

.edn-sections .edn-section:nth-child(3n+2) .edn-card-media img {
    aspect-ratio: 1 / 1;
}

.edn-sections .edn-section:nth-child(3n+2) .edn-card-title {
    font-size: 2rem;
}

/* Variante 3 · Ranking numerado (3n+3) */
.edn-sections .edn-section:nth-child(3n+3) .edn-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 0 34px;
    counter-reset: edn-rank;
}

.edn-sections .edn-section:nth-child(3n+3) .edn-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: baseline;
    border-bottom: 1px solid var(--edn-line-soft);
    padding: 15px 0;
    counter-increment: edn-rank;
}

.edn-sections .edn-section:nth-child(3n+3) .edn-card::before {
    content: counter(edn-rank, decimal-leading-zero);
    font-family: var(--edn-serif);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--edn-accent);
}

.edn-sections .edn-section:nth-child(3n+3) .edn-card-media {
    display: none;
}

.edn-sections .edn-section:nth-child(3n+3) .edn-card-title {
    font-size: 2rem;
}

/* Sin columna lateral: el destacado ocupa todo el ancho */
.edn-frontpage .edn-front--noside {
    grid-template-columns: minmax(0, 1fr);
}

/* Si la etiqueta no tiene notas, la columna no deja hueco */
.edn-frontpage .edn-front:not(:has(.edn-vida)) {
    grid-template-columns: minmax(0, 1fr);
}

/* Una sección sin notas no se muestra */
.edn-sections .edn-section:not(:has(.edn-card)) {
    display: none;
}

.edn-vida-block:not(:has(.edn-card)) {
    display: none;
}

/* ==========================================================================
   Cintillo de Última hora
   ========================================================================== */
.edn-ticker {
    border-top: 2px solid var(--edn-ink-soft);
    border-bottom: 1px solid var(--edn-rule);
    background: var(--edn-paper-soft);
    margin-bottom: 28px;
}

.edn-ticker-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 46px;
    overflow: hidden;
}

.edn-ticker-label {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    background: var(--edn-accent);
    color: #fff;
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.edn-ticker-label::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: edn-pulse 1.4s ease-in-out infinite;
}

.edn-ticker-track {
    display: flex;
    align-items: center;
    gap: 44px;
    white-space: nowrap;
    will-change: transform;
}

.edn-ticker-track.is-ready {
    animation: edn-ticker-move 38s linear infinite;
}

.edn-ticker-inner:hover .edn-ticker-track.is-ready {
    animation-play-state: paused;
}

.edn-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--edn-sans);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--edn-ink);
    text-decoration: none;
}

.edn-ticker-item:hover {
    color: var(--edn-accent);
}

.edn-ticker-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--edn-accent);
}

@keyframes edn-ticker-move {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes edn-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.75); }
}

/* ==========================================================================
   Carrusel de Lo más leído
   ========================================================================== */
.edn-mostread {
    margin-top: 54px;
}

.edn-mostread-header {
    align-items: center;
}

.edn-carousel-nav {
    display: flex;
    gap: 8px;
}

.edn-carousel-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--edn-line-strong);
    border-radius: 50%;
    background: var(--edn-paper);
    color: var(--edn-ink);
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.edn-carousel-nav button:hover:not(:disabled) {
    background: var(--edn-ink);
    border-color: var(--edn-ink);
    color: #fff;
}

.edn-carousel-nav button:disabled {
    opacity: 0.3;
    cursor: default;
}

.edn-carousel {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 2px 6px;
    /* Sin barra de desplazamiento: se mueve con las flechas, arrastrando o solo */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Edge viejo */
    cursor: grab;
}

/* Chrome / Safari / Edge: oculta la barra del carrusel */
.edn-carousel::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Mientras se arrastra: sin barra, sin imán y sin animación (para que siga el mouse) */
.edn-carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
    user-select: none;
}

.edn-carousel > .edn-card {
    flex: 0 0 clamp(220px, 26vw, 300px);
    scroll-snap-align: start;
}

.edn-carousel > .edn-card .edn-card-title {
    font-size: 1.9rem;
}

/* Etiquetas visibles en tarjetas y artículos */
.gh-card .gh-card-tag {
    display: block;
    margin-bottom: 4px;
    font-family: var(--edn-sans);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--edn-accent);
}

.gh-article-tag {
    display: inline-block;
    margin-bottom: 12px;
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--edn-accent);
    text-decoration: none;
}

/* Páginas de sección */
/* .gh-archive {
    
    padding-top: 24px;
} */

.edn-section-label {
    margin: 0 0 8px;
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--edn-accent);
}

.gh-archive .gh-article-title {
    font-family: var(--edn-serif);
}

.gh-archive .gh-article-excerpt {
    color: var(--edn-muted);
}

.edn-error {
    max-width: 820px;
}

.edn-error .gh-article-title {
    font-size: clamp(3rem, 6vw, 5.6rem);
}

.edn-error-actions {
    margin-top: 24px;
}

.edn-error-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--edn-rule);
}

.edn-error-nav a {
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--edn-accent);
    text-decoration: none;
}

/* Footer */
/* Footer Editorial Premium: Limpio, asimétrico y sofisticado */
.gh-footer {
    position: relative; /* contexto para el fondo de líneas */
    border-top: 1px solid var(--edn-line-strong); /* Línea superior suave */
    background-color: var(--edn-paper);
    padding-top: 60px;
    
}

/* Grilla limpia con líneas divisorias verticales sutiles */
.edn-footer-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--edn-rule);
}

/* Cada columna es un bloque limpio y enmarcado */
.edn-footer-col {
    padding: 0 40px 40px;
    border-right: 1px solid var(--edn-rule);
}

.edn-footer-col:first-child {
    padding-left: 0;
}

.edn-footer-col:last-child {
    border-right: none;
    padding-right: 0;
}

/* Tipografía rígida, compacta y elegante */
.edn-footer-col h4 {
    margin: 0 0 14px;
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--edn-ink);
}

.edn-footer-col p {
    margin: 0;
    font-family: var(--edn-sans);
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--edn-muted);
}

/* Microinteracción fina en los links */
.edn-footer-col a {
    color: var(--edn-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.edn-footer-col a:hover {
    color: var(--edn-ink);
    border-bottom-color: var(--edn-accent);
}

.edn-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 0 0 28px;
}

.gh-footer-menu .nav a {
    font-family: var(--edn-sans);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.gh-footer-menu .nav a:hover {
    color: var(--edn-accent);
}

.gh-footer-menu .nav {
    flex-wrap: wrap;
    gap: 16px 22px;
}

.gh-footer-copyright {
    font-family: var(--edn-sans);
    font-size: 1.3rem;
    color: var(--edn-muted);
    white-space: normal;
    min-width: 0;
}

/* Responsive */
@media (max-width: 1023px) {
    .edn-front {
        grid-template-columns: 1fr;
    }

    .edn-layout--lead-right .edn-lead,
    .edn-layout--lead-right .edn-vida {
        order: initial;
    }

    .edn-vida {
        border-left: 0;
        border-top: 1px solid var(--edn-rule);
        padding-top: 26px;
        padding-left: 0;
    }

    .edn-footer-info-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding-bottom: 0;
    }

    .edn-footer-col {
        border-right: 0;
        padding: 0 0 24px;
    }

    .edn-footer-col:last-child {
        padding-bottom: 24px;
    }

    .post-template .gh-container.is-grid .gh-feed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .edn-edition-brand {
        display: none;
    }
}

@media (max-width: 900px) {
    .edn-sections .edn-section:nth-child(3n+1) .edn-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .edn-sections .edn-section:nth-child(3n+1) .edn-card:first-child,
    .edn-sections .edn-section:nth-child(3n+1) .edn-card:not(:first-child) {
        grid-column: 1;
        grid-row: auto;
    }

    .edn-sections .edn-section:nth-child(3n+1) .edn-card:not(:first-child) {
        display: grid;
        grid-template-columns: 130px minmax(0, 1fr);
        gap: 14px;
    }

    .edn-sections .edn-section:nth-child(3n+1) .edn-card:not(:first-child) .edn-card-media {
        margin-bottom: 0;
    }
}

@media (max-width: 640px) {
    .home-template #gh-navigation .gh-navigation-brand img {
        max-height: 40px;
    }

    .edn-edition-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 9px 0;
    }

    .edn-edition-date,
    .edn-edition-brand {
        white-space: normal;
    }

    .edn-weather-condition {
        display: none;
    }

    .edn-sections .edn-section:nth-child(3n+2) .edn-card,
    .edn-sections .edn-section:nth-child(3n+1) .edn-card:not(:first-child) {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .edn-ticker-inner {
        gap: 10px;
    }

    .edn-ticker-item {
        font-size: 1.4rem;
    }

    .edn-carousel > .edn-card {
        flex-basis: 78vw;
    }
}

@media (max-width: 767px) {
    .gh-article-title {
        font-size: 3.2rem;
        line-height: 1.12;
    }
}

/* Fondo del footer: líneas verticales finas que ondulan tras el contenido */
.edn-footer-lines {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.edn-footer-lines i {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    transform-origin: top;
    animation: edn-footer-line 6s ease-in-out infinite alternate;
}

@keyframes edn-footer-line {
    from { transform: scaleY(0.1); }
    to { transform: scaleY(1); }
}

/* El contenido pinta por encima del fondo decorativo */
.gh-footer-inner { position: relative; }

/* Respeto por reduced motion */
@media (prefers-reduced-motion: reduce) {
    .edn-footer-lines i { animation: none; }
    .edn-ticker-label::before { animation: none; }
    .edn-ticker-track.is-ready { animation: none; }
    .edn-ticker-inner { overflow-x: auto; }
    .edn-carousel { scroll-behavior: auto; }
}

/* ==========================================================================
   Publicidad
   ========================================================================== */
.edn-ad-slot {
    margin: 0 0 30px;
    padding: 16px 0 0;
    border-top: 1px solid var(--edn-rule);
}

.edn-ad-slot[hidden],
.edn-ad-dots[hidden] {
    display: none;
}

.edn-ad-slot--top {
    margin-top: 0;
}

.edn-ad-slot--article {
    margin: 44px 0 0;
    padding-top: 22px;
    border-top: 2px solid var(--edn-ink-soft);
}

.edn-ad-slot--bottom {
    margin: 48px 0 0;
    padding-top: 22px;
    border-top: 2px solid var(--edn-ink-soft);
}

.edn-ad-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.edn-ad-label {
    font-family: var(--edn-sans);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--edn-muted);
}

.edn-ad-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.edn-ad-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--edn-line-strong);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.edn-ad-dot:hover,
.edn-ad-dot.is-active {
    background: var(--edn-accent);
}

.edn-ad-dot.is-active {
    transform: scale(1.25);
}

.edn-ad-rotator {
    position: relative;
}

.edn-ad-creative {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 70px;
    background: var(--edn-paper-soft);
    text-decoration: none;
}

.edn-ad-creative.is-active {
    display: flex;
}

.edn-ad-creative img {
    display: block;
    width: 100%;
    max-height: 140px;
    object-fit: contain;
}

.edn-ad-slot--top .edn-ad-creative img {
    max-height: 120px;
}

.edn-ad-slot--article .edn-ad-creative img {
    max-height: 170px;
}

.edn-ad-slot--bottom .edn-ad-creative img {
    max-height: 160px;
}

@media (max-width: 640px) {
    .edn-ad-slot {
        margin-bottom: 24px;
    }

    .edn-ad-creative img,
    .edn-ad-slot--top .edn-ad-creative img,
    .edn-ad-slot--article .edn-ad-creative img,
    .edn-ad-slot--bottom .edn-ad-creative img {
        max-height: 110px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .edn-ad-dot {
        transition: none;
    }
}

