/* Edición impresa (30-edicion-impresa). Pensado para lectores mayores:
   letra grande, botones de 48 px como mínimo y mucho contraste. */
:root {
	--eh-verde: #006a25;
	--eh-verde-osc: #013220;
	--eh-fondo: #f4f7f4;
	--eh-borde: #d5e2d7;
	--eh-texto: #1b1f1c;
	--eh-suave: #4a554d;
}
[data-theme="dark"] {
	--eh-fondo: #1d2420;
	--eh-borde: #33433a;
	--eh-texto: #f1f4f2;
	--eh-suave: #b9c6bd;
}

/* Botones y enlaces */
.eh-ed-boton {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	min-height: 52px; padding: 12px 26px; border-radius: 10px;
	background: var(--eh-verde); color: #fff !important; font-size: 19px; font-weight: 700;
	text-decoration: none !important; line-height: 1.2; box-shadow: 0 2px 0 var(--eh-verde-osc);
}
.eh-ed-boton:hover, .eh-ed-boton:focus-visible { background: var(--eh-verde-osc); }
.eh-ed-boton--sec { background: transparent; color: var(--eh-verde) !important; border: 2px solid var(--eh-verde); box-shadow: none; }
.eh-ed-boton--sec:hover { color: #fff !important; }
[data-theme="dark"] .eh-ed-boton--sec { color: #8fd6a4 !important; border-color: #8fd6a4; }
.eh-ed-enlace { display: inline-block; margin: 14px 0 0 4px; font-size: 17px; color: var(--eh-verde); text-decoration: underline; }
[data-theme="dark"] .eh-ed-enlace { color: #8fd6a4; }
.eh-ed-nuevo { display: inline-block; margin-left: .4em; padding: 2px 10px; border-radius: 99px; background: #c62828; color: #fff; font-size: 14px; font-weight: 700; vertical-align: middle; }

/* Tarjeta «el periódico de esta semana» */
.eh-ed-semana {
	display: flex; gap: 22px; align-items: center; margin: 12px 0; padding: 18px;
	background: var(--eh-fondo); border: 1px solid var(--eh-borde); border-radius: 14px; color: var(--eh-texto);
}
.eh-ed-semana__img { flex: 0 0 150px; }
.eh-ed-portada { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 6px; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.eh-ed-portada--vacia { display: flex; align-items: center; justify-content: center; font-size: 48px; }
.eh-ed-semana__ante { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--eh-verde); text-transform: uppercase; letter-spacing: .02em; }
[data-theme="dark"] .eh-ed-semana__ante { color: #8fd6a4; }
.eh-ed-semana__tit { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; color: var(--eh-texto); }
.eh-ed-semana__desc { margin: 0 0 16px; font-size: 18px; line-height: 1.5; color: var(--eh-suave); }
@media (max-width: 600px) {
	.eh-ed-semana { flex-direction: column; text-align: center; }
	.eh-ed-semana__img { flex-basis: auto; width: 60%; max-width: 220px; }
	.eh-ed-semana .eh-ed-boton { width: 100%; }
}

/* Rejilla de ediciones */
.eh-ed-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px; margin: 0 0 24px; padding: 0; list-style: none; }
.eh-ed-rejilla li { margin: 0; }
.eh-ed-rejilla a { display: block; text-decoration: none !important; color: var(--eh-texto); }
.eh-ed-rejilla a:hover .eh-ed-portada { outline: 3px solid var(--eh-verde); }
.eh-ed-rejilla__fecha { display: block; margin-top: 8px; font-size: 17px; font-weight: 600; line-height: 1.3; text-align: center; }
.eh-ed-subt { margin: 28px 0 14px; font-size: 26px; }
.eh-ed-todas { text-align: center; }

/* Botón del menú: una píldora fina centrada (el fondo va en el texto, no en
   el enlace, que ocupa toda la altura de la barra). */
.eh-menu-periodico > a { background: none !important; padding-left: 6px !important; padding-right: 6px !important; }
.eh-menu-periodico > a > span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 99px; background: var(--eh-verde); color: #fff !important; line-height: 1.2; box-shadow: 0 2px 8px rgba(0, 106, 37, .25); transition: background .15s, transform .15s; }
.eh-menu-periodico > a:hover > span { background: var(--eh-verde-osc); transform: translateY(-1px); }
.eh-menu-periodico__ico { flex: 0 0 auto; }

/* Franja del móvil (en el ordenador ya está el botón del menú) */
.eh-ed-barra {
	display: none; position: relative; z-index: 2; padding: 10px 14px; text-align: center;
	background: var(--eh-verde); color: #fff !important; font-size: 17px; text-decoration: none !important;
}
.eh-ed-barra strong { color: #fff; }
@media (max-width: 1024px) { .eh-ed-barra { display: block; } }

/* Recuadro al final de la noticia */
.eh-ed-final { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 28px 0 8px; padding: 14px 18px; border-left: 5px solid var(--eh-verde); background: var(--eh-fondo); border-radius: 8px; font-size: 18px; color: var(--eh-texto); }
.eh-ed-final a { font-weight: 700; color: var(--eh-verde); text-decoration: underline; }
[data-theme="dark"] .eh-ed-final a { color: #8fd6a4; }

/* Páginas de la edición y del archivo */
.eh-ed__dentro { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; }
.eh-ed-cab { text-align: center; margin: 6px 0 18px; }
.eh-ed-cab__ante { margin: 0; font-size: 16px; font-weight: 700; color: var(--eh-verde); text-transform: uppercase; }
[data-theme="dark"] .eh-ed-cab__ante { color: #8fd6a4; }
.eh-ed-cab__tit { margin: 6px 0; font-size: clamp(26px, 4vw, 38px); line-height: 1.2; }
.eh-ed-cab__ayuda { margin: 0 auto; max-width: 640px; font-size: 18px; line-height: 1.5; color: var(--eh-suave); }
.eh-ed-paginas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; font-size: 18px; }
.eh-ed-paginas .page-numbers { display: inline-block; min-width: 48px; padding: 10px 14px; border: 1px solid var(--eh-borde); border-radius: 8px; text-align: center; }
.eh-ed-paginas .current { background: var(--eh-verde); color: #fff; }

/* El lector: un periódico hoja a hoja */
.eh-visor { position: relative; background: radial-gradient(ellipse at center, #4a504c 0%, #2f3431 75%); border-radius: 12px; }
.eh-visor:fullscreen { display: flex; flex-direction: column; justify-content: center; border-radius: 0; }
.eh-visor__marco { overflow: hidden; padding: 22px 8px 14px; }
.eh-visor__marco.es-ampliado { overflow: auto; max-height: 85vh; }
.eh-libro { position: relative; margin: 0 auto; perspective: 2600px; transition: transform .45s ease; user-select: none; -webkit-user-select: none; cursor: pointer; }
.eh-libro__pag { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; box-shadow: 0 6px 26px rgba(0, 0, 0, .45); overflow: hidden; }
.eh-libro__pag img, .eh-libro__cara img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.eh-libro.es-doble .eh-libro__pag--izq { width: 50%; }
.eh-libro.es-doble .eh-libro__pag--der { left: 50%; width: 50%; }
.eh-libro.es-doble.es-portada { transform: translateX(-25%); } /* la portada, sola y centrada */
/* El lomo: sombra en el centro del periódico abierto */
.eh-libro.es-doble:not(.es-portada)::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 22px); width: 44px; z-index: 3; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.18) 46%, rgba(0,0,0,.32) 50%, rgba(0,0,0,.18) 54%, rgba(0,0,0,0) 100%); }
.eh-libro__pag.is-cargando::before { content: "Cargando la página…"; position: absolute; top: 50%; left: 0; right: 0; text-align: center; color: #8a918c; font-size: 16px; }
/* La hoja que gira */
.eh-libro__hoja { position: absolute; top: 0; width: 50%; height: 100%; z-index: 4; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.45, .05, .25, 1); }
.eh-libro__hoja.es-der { left: 50%; transform-origin: left center; }
.eh-libro__hoja.es-izq { left: 0; transform-origin: right center; }
.eh-libro__hoja.es-der.gira { transform: rotateY(-180deg); }
.eh-libro__hoja.es-izq.gira { transform: rotateY(180deg); }
.eh-libro__cara { position: absolute; inset: 0; background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 6px 26px rgba(0, 0, 0, .35); }
.eh-libro__cara--dorso { transform: rotateY(180deg); }
.eh-libro__hoja.gira .eh-libro__cara--frente { animation: eh-sombra .7s ease; }
@keyframes eh-sombra { 50% { filter: brightness(.82); } }
/* Móvil: la página entra deslizando */
.eh-libro.desliza-izq .eh-libro__pag--der { animation: eh-entra-der .35s ease; }
.eh-libro.desliza-der .eh-libro__pag--der { animation: eh-entra-izq .35s ease; }
@keyframes eh-entra-der { from { transform: translateX(14%); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes eh-entra-izq { from { transform: translateX(-14%); opacity: .3; } to { transform: none; opacity: 1; } }
.eh-visor__cargando, .eh-visor__error { margin: 40px 0; text-align: center; font-size: 20px; color: #fff; }
.eh-visor__barra {
	position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center;
	padding: 8px; background: rgba(1, 50, 32, .96); border-radius: 0 0 12px 12px;
}
.eh-visor__barra button, .eh-visor__barra a {
	min-height: 48px; min-width: 48px; padding: 8px 14px; border: 0; border-radius: 8px;
	background: #fff; color: var(--eh-verde-osc) !important; font-size: 18px; font-weight: 700; cursor: pointer; text-decoration: none !important;
}
.eh-visor__barra button:focus-visible, .eh-visor__barra a:focus-visible { outline: 3px solid #ffd54f; }
.eh-visor__contador { min-width: 150px; color: #fff; font-size: 18px; font-weight: 700; text-align: center; }
@media (max-width: 700px) {
	.eh-visor__barra span:not(.eh-visor__contador) { display: none; } /* en el móvil, solo los símbolos */
	.eh-visor__marco { padding: 8px 4px 2px; }
	.eh-visor__contador { min-width: 110px; font-size: 16px; }
}
