/*
 * Portal Hoy — hoja principal.
 * Estilo agregador claro: fondo gris muy claro, tarjetas blancas con
 * esquinas redondeadas y sombras suaves, acento azul.
 */

:root {
	--ph-accent: #a67c00;
	--ph-accent-dark: #856200;
	--ph-accent-soft: #f8efdb;
	--ph-bg: #f4f4f4;
	--ph-card: #ffffff;
	--ph-surface: #ffffff;
	--ph-soft: #f0f0f0;
	--ph-ink: #1b1b1b;
	--ph-ink-2: #5b5b5b;
	--ph-line: #e3e3e3;
	--ph-radius: 10px;
	--ph-shadow: 0 1px 2px rgba(0, 0, 0, .07), 0 2px 8px rgba(0, 0, 0, .05);
	--ph-shadow-hover: 0 2px 4px rgba(0, 0, 0, .09), 0 8px 20px rgba(0, 0, 0, .09);
	--ph-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* Modo oscuro: mismas variables, paleta oscura. */
:root[data-theme="dark"] {
	--ph-bg: #141414;
	--ph-card: #1f1f1f;
	--ph-surface: #1f1f1f;
	--ph-soft: #2b2b2b;
	--ph-ink: #f2f2f2;
	--ph-ink-2: #a8a8a8;
	--ph-line: #343434;
	--ph-accent-soft: #2e2608;
	--ph-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .35);
	--ph-shadow-hover: 0 2px 4px rgba(0, 0, 0, .45), 0 8px 20px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--ph-bg);
	color: var(--ph-ink);
	font-family: var(--ph-font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--ph-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.ph-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 16px;
}

.ph-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ph-accent);
	color: #fff;
	padding: 8px 14px;
	z-index: 200;
	border-radius: 0 0 8px 0;
}
.ph-skip-link:focus { left: 0; color: #fff; }

/* ---------- Cabecera ---------- */

.ph-header {
	background: var(--ph-surface);
	border-bottom: 1px solid var(--ph-line);
}
.ph-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	padding-top: 12px;
	padding-bottom: 12px;
}
.ph-brand { flex: 0 0 auto; min-width: 0; }
.ph-brand .custom-logo { max-height: 52px; width: auto; display: block; }
.ph-brand__name {
	font-size: 1.9rem;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--ph-ink);
	line-height: 1;
}
.ph-brand__name:hover { text-decoration: none; color: var(--ph-accent-dark); }
.ph-brand__tagline {
	margin: 3px 0 0;
	font-size: .8rem;
	color: var(--ph-ink-2);
}

.ph-header__search { flex: 1 1 auto; max-width: 560px; margin: 0 auto; }

.ph-searchform {
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--ph-soft);
	border: 1px solid var(--ph-line);
	border-radius: 999px;
	padding: 4px 6px 4px 14px;
	transition: border-color .15s ease, background .15s ease;
}
.ph-searchform:focus-within { background: var(--ph-surface); border-color: var(--ph-accent); }
.ph-searchform__icon { color: var(--ph-ink-2); display: inline-flex; }
.ph-searchform__field {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: .95rem;
	color: var(--ph-ink);
	outline: none;
}
.ph-searchform__submit {
	flex: 0 0 auto;
	border: 0;
	border-radius: 999px;
	background: var(--ph-accent);
	color: #fff;
	font: inherit;
	font-size: .88rem;
	font-weight: 600;
	padding: 7px 16px;
	cursor: pointer;
}
.ph-searchform__submit:hover { background: var(--ph-accent-dark); }

.ph-header__side {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 14px;
}
.ph-header__date {
	font-size: .82rem;
	color: var(--ph-ink-2);
	text-transform: capitalize;
	white-space: nowrap;
}
.ph-header__social { display: flex; gap: 4px; }
.ph-header__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: var(--ph-ink-2);
}
.ph-header__social a:hover { background: var(--ph-accent-soft); color: var(--ph-accent); text-decoration: none; }
.ph-header__contact {
	font-size: .9rem;
	font-weight: 600;
	border: 1px solid var(--ph-line);
	border-radius: 999px;
	padding: 7px 16px;
	color: var(--ph-ink);
}
.ph-header__contact:hover { border-color: var(--ph-accent); color: var(--ph-accent); text-decoration: none; }

.ph-search-toggle {
	display: none;
	margin-left: auto;
	background: none;
	border: 0;
	color: var(--ph-ink);
	padding: 8px;
	cursor: pointer;
}
.ph-mobile-search { border-top: 1px solid var(--ph-line); padding: 10px 0; background: var(--ph-surface); }

/* ---------- Navegación principal ---------- */

.ph-navbar {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ph-surface);
	border-bottom: 1px solid var(--ph-line);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}
.ph-navbar__inner { display: flex; align-items: center; }
.ph-nav-checkbox { position: absolute; opacity: 0; pointer-events: none; }
.ph-nav-button {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 12px 8px;
	cursor: pointer;
}
.ph-nav-button__bar { width: 22px; height: 2px; background: var(--ph-ink); border-radius: 2px; }

.ph-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 8px 0;
}
.ph-nav__list li { margin: 0; }
.ph-nav { flex: 1 1 auto; min-width: 0; }
.ph-nav__list a {
	display: inline-block;
	padding: 6px 11px;
	border-radius: 999px;
	border: 1px solid transparent;
	color: var(--ph-ink);
	font-size: .92rem;
	font-weight: 600;
	white-space: nowrap;
}
.ph-nav__list a:hover { background: var(--ph-accent-soft); text-decoration: none; }
.ph-nav__list .current-menu-item > a,
.ph-nav__list .current_page_item > a,
.ph-nav__list .current-category-ancestor > a {
	border-color: var(--ph-accent);
	color: var(--ph-accent);
	background: var(--ph-surface);
}

/* Botón de modo claro / oscuro, al final de la barra de navegación. */
.ph-theme-toggle {
	margin-left: auto;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--ph-line);
	background: var(--ph-surface);
	color: var(--ph-ink);
	cursor: pointer;
}
.ph-theme-toggle:hover { border-color: var(--ph-accent); color: var(--ph-accent); }
.ph-theme-toggle__sun { display: none; }
:root[data-theme="dark"] .ph-theme-toggle__sun { display: block; }
:root[data-theme="dark"] .ph-theme-toggle__moon { display: none; }

/* Detalles que en oscuro usan el tono suave en vez del gris claro. */
:root[data-theme="dark"] .ph-card__media,
:root[data-theme="dark"] .ph-rel-card__media,
:root[data-theme="dark"] .ph-popular__thumb { background: var(--ph-soft); }
:root[data-theme="dark"] .ph-hero__main { background: #000; }
/* En oscuro, el texto sobre dorado va oscuro para que se lea y no encandile */
:root[data-theme="dark"] .ph-searchform__submit,
:root[data-theme="dark"] .ph-btn:hover,
:root[data-theme="dark"] .pagination .page-numbers.current,
:root[data-theme="dark"] .ph-article__cat:hover,
:root[data-theme="dark"] .ph-share__btn:hover { color: #1d1503; }

/* Submenús: ocultos hasta pasar el ratón o enfocar (escritorio). */
.ph-nav__list > li { position: relative; }
.ph-nav__list .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	margin-left: 6px;
	border: 4px solid transparent;
	border-top-color: currentColor;
	border-bottom: 0;
	vertical-align: middle;
	opacity: .65;
}
.ph-nav__list .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	min-width: 230px;
	list-style: none;
	margin: 0;
	padding: 8px;
	background: var(--ph-surface);
	border: 1px solid var(--ph-line);
	border-radius: 12px;
	box-shadow: var(--ph-shadow-hover);
	z-index: 130;
}
.ph-nav__list li:hover > .sub-menu,
.ph-nav__list li:focus-within > .sub-menu {
	display: block;
}
.ph-nav__list .sub-menu a {
	display: block;
	border-radius: 8px;
	padding: 8px 12px;
	white-space: normal;
}
.ph-nav__list .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

/* ---------- Contenido ---------- */

.ph-main { padding: 18px 0 34px; }

.ph-page-title {
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -.01em;
	margin: 6px 0 16px;
}
.ph-archive-desc { color: var(--ph-ink-2); margin: -8px 0 16px; max-width: 70ch; }
.ph-section-title {
	font-size: 1.25rem;
	font-weight: 800;
	margin: 26px 0 14px;
}
.ph-empty { color: var(--ph-ink-2); padding: 20px 0; }

/* ---------- Bloque principal (héroe) ---------- */

.ph-hero {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 12px;
	margin-bottom: 12px;
}
.ph-hero__main {
	position: relative;
	border-radius: var(--ph-radius);
	overflow: hidden;
	background: #222;
	min-height: 320px;
	box-shadow: var(--ph-shadow);
}
.ph-hero__link { display: block; height: 100%; color: #fff; }
.ph-hero__link:hover { text-decoration: none; }
.ph-hero__link img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ph-hero__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0) 70%);
}
.ph-hero__text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ph-hero__meta {
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .85);
}
.ph-hero__title {
	font-size: 1.65rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -.01em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ph-hero .ph-card { height: 100%; }

/* ---------- Tarjetas ---------- */

.ph-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}

.ph-card {
	background: var(--ph-card);
	border-radius: var(--ph-radius);
	overflow: hidden;
	box-shadow: var(--ph-shadow);
	display: flex;
	flex-direction: column;
	transition: box-shadow .15s ease, transform .15s ease;
}
.ph-card:hover { box-shadow: var(--ph-shadow-hover); }
.ph-card__media {
	display: block;
	aspect-ratio: 640 / 335;
	background: #e9e9e9;
	overflow: hidden;
}
.ph-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ph-card__nophoto {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 3rem;
	font-weight: 800;
	color: #fff;
	background: var(--ph-accent);
}
.ph-card__body {
	padding: 12px 14px 13px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 auto;
}
.ph-card__source {
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--ph-ink-2);
	align-self: flex-start;
}
.ph-card__source:hover { color: var(--ph-accent); text-decoration: none; }
.ph-card__title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.32;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ph-card__title a { color: var(--ph-ink); }
.ph-card__title a:hover { color: var(--ph-accent-dark); text-decoration: none; }
.ph-card__meta {
	margin-top: auto;
	padding-top: 4px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: .8rem;
	color: var(--ph-ink-2);
}
.ph-card__comments { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Módulo «Historias principales» ---------- */

.ph-top {
	background: var(--ph-card);
	border-radius: var(--ph-radius);
	box-shadow: var(--ph-shadow);
	padding: 16px 20px 8px;
	margin-bottom: 12px;
}
.ph-top__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--ph-ink);
}
.ph-top__title svg { color: var(--ph-accent); }
.ph-top__list { list-style: none; margin: 0; padding: 0; }
.ph-top__item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	padding: 9px 0;
	border-top: 1px solid var(--ph-line);
}
.ph-top__item:first-child { border-top: 0; }
.ph-top__link { font-weight: 700; color: var(--ph-ink); flex: 1 1 260px; }
.ph-top__link:hover { color: var(--ph-accent-dark); text-decoration: none; }
.ph-top__meta { font-size: .8rem; color: var(--ph-ink-2); white-space: nowrap; }

/* ---------- Anuncios ---------- */

.ph-ad { margin: 4px 0 16px; text-align: center; }
.ph-ad .widget { margin: 0; }
.ph-ad--sidebar { position: sticky; top: 64px; }

/* ---------- Río / carga infinita ---------- */

.ph-river__sentinel { height: 1px; }
.ph-river__loader {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 22px 0;
	color: var(--ph-ink-2);
	font-size: .92rem;
}
/* El atributo hidden manda sobre el display:flex del aviso de carga:
   sin estas reglas el «Cargando más noticias…» NUNCA se ocultaba
   (fallo detectado el 2026-11-07). */
.ph-river__loader[hidden],
.ph-river__end[hidden],
.ph-river__more[hidden] { display: none; }
.ph-river__spinner {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 3px solid var(--ph-line);
	border-top-color: var(--ph-accent);
	animation: ph-spin .8s linear infinite;
}
@keyframes ph-spin { to { transform: rotate(360deg); } }
.ph-river__end { text-align: center; color: var(--ph-ink-2); padding: 18px 0 4px; }
.ph-river__more { text-align: center; padding: 20px 0 4px; }
.ph-btn {
	border: 1px solid var(--ph-accent);
	background: var(--ph-surface);
	color: var(--ph-accent);
	font: inherit;
	font-weight: 700;
	font-size: .95rem;
	border-radius: 999px;
	padding: 10px 26px;
	cursor: pointer;
}
.ph-btn:hover { background: var(--ph-accent); color: #fff; }

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

.pagination { margin: 24px 0 6px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers {
	display: inline-block;
	min-width: 38px;
	padding: 8px 12px;
	border-radius: 999px;
	background: var(--ph-surface);
	border: 1px solid var(--ph-line);
	color: var(--ph-ink);
	font-weight: 600;
}
.pagination .page-numbers.current { background: var(--ph-accent); border-color: var(--ph-accent); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--ph-accent); color: var(--ph-accent); text-decoration: none; }

/* ---------- Artículo ---------- */

.ph-article-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 26px;
	align-items: start;
}
.ph-article {
	background: var(--ph-card);
	border-radius: var(--ph-radius);
	box-shadow: var(--ph-shadow);
	padding: 28px 32px;
}
.ph-article--page { max-width: 860px; margin: 0 auto; }
.ph-article__cat {
	display: inline-block;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	background: var(--ph-accent-soft);
	color: var(--ph-accent-dark);
	border-radius: 999px;
	padding: 5px 12px;
}
.ph-article__cat:hover { text-decoration: none; background: var(--ph-accent); color: #fff; }
.ph-article__title {
	font-size: 2.1rem;
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -.015em;
	margin: 14px 0 10px;
}
.ph-article__standfirst { font-size: 1.08rem; color: var(--ph-ink-2); margin: 0 0 14px; line-height: 1.55; }
.ph-article__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	font-size: .88rem;
	color: var(--ph-ink-2);
	padding-bottom: 14px;
	border-bottom: 1px solid var(--ph-line);
}
.ph-article__figure { margin: 20px 0; }
.ph-article__figure img { border-radius: 8px; width: 100%; max-width: 100%; height: auto; display: block; }
.ph-article__figure figcaption { font-size: .82rem; color: var(--ph-ink-2); margin-top: 6px; }
.ph-article__content { font-size: 1.05rem; line-height: 1.7; }
.ph-article__content p { margin: 0 0 1.1em; }
.ph-article__content h2 { font-size: 1.45rem; margin: 1.4em 0 .5em; line-height: 1.3; }
.ph-article__content h3 { font-size: 1.2rem; margin: 1.3em 0 .5em; }
.ph-article__content ul, .ph-article__content ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.ph-article__content blockquote {
	margin: 1.2em 0;
	padding: 4px 0 4px 18px;
	border-left: 4px solid var(--ph-accent);
	color: var(--ph-ink-2);
	font-style: italic;
}
/* Fotos DENTRO del texto (orden del dueño, 2026-11-07): SIEMPRE al ancho
   completo del área del artículo — nunca pequeñas ni centradas con huecos
   a los lados, nunca fuera del área y nunca estiradas ni alargadas:
   ancho 100% con alto automático, que conserva la proporción original. */
.ph-article__content { overflow-wrap: break-word; }
.ph-article__content img {
	border-radius: 8px;
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}
.ph-article__content p > img,
.ph-article__content > img {
	margin: 1.1em 0;
}
.ph-article__content figure,
.ph-article__content .wp-block-image,
.ph-article__content .wp-caption {
	margin: 1.1em 0;
	width: 100%;
	max-width: 100%;
}
.ph-article__content figure img { width: 100%; max-width: 100%; height: auto; display: block; }
.ph-article__content .alignleft,
.ph-article__content .alignright,
.ph-article__content .aligncenter,
.ph-article__content .alignnone {
	float: none;
	display: block;
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}
/* Incrustados y tablas: jamás más anchos que el área del artículo. */
.ph-article__content iframe,
.ph-article__content video,
.ph-article__content embed,
.ph-article__content object,
.ph-article__content .wp-block-embed,
.ph-article__content .wp-block-video,
.ph-article__content table {
	max-width: 100%;
}
.ph-article__content iframe,
.ph-article__content video {
	width: 100%;
}
.ph-article__content figcaption {
	text-align: center;
	font-size: .85rem;
	color: var(--ph-ink-2);
	margin-top: 6px;
}
.ph-article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.ph-article__tags a {
	font-size: .84rem;
	font-weight: 600;
	background: var(--ph-soft);
	color: var(--ph-ink);
	border-radius: 999px;
	padding: 6px 13px;
}
.ph-article__tags a:hover { background: var(--ph-accent-soft); color: var(--ph-accent-dark); text-decoration: none; }

.ph-share {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0;
}
.ph-share__label { font-size: .9rem; font-weight: 700; color: var(--ph-ink-2); }
.ph-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--ph-soft);
	color: var(--ph-ink);
}
.ph-share__btn:hover { background: var(--ph-accent); color: #fff; text-decoration: none; }

.ph-article__nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 24px 0 4px;
}
.ph-article__navlink {
	display: flex;
	flex-direction: column;
	gap: 3px;
	background: var(--ph-soft);
	border-radius: 8px;
	padding: 13px 15px;
	color: var(--ph-ink);
}
.ph-article__navlink span { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ph-ink-2); }
.ph-article__navlink--next { text-align: right; }
.ph-article__navlink:hover { background: var(--ph-accent-soft); text-decoration: none; }

/* ---------- Relacionados: panel claro estilo «Más para ti» ---------- */

.ph-related {
	margin-top: 28px;
	background: var(--ph-card);
	border: 1px solid var(--ph-line);
	border-radius: 12px;
	box-shadow: var(--ph-shadow);
	padding: 20px 20px 22px;
}
.ph-related__title {
	margin: 0 0 14px;
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--ph-ink);
}
.ph-rel-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}
.ph-rel-card {
	background: var(--ph-card);
	border: 1px solid var(--ph-line);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.ph-rel-card__media {
	display: block;
	aspect-ratio: 640 / 335;
	background: #e9e9e9;
	overflow: hidden;
}
.ph-rel-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-rel-card__nophoto {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 2.6rem;
	font-weight: 800;
	color: #fff;
	background: var(--ph-accent);
}
.ph-rel-card__body {
	padding: 11px 13px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 auto;
}
.ph-rel-card__source {
	font-size: .76rem;
	font-weight: 600;
	color: var(--ph-ink-2);
	letter-spacing: .01em;
}
.ph-rel-card__headline {
	margin: 0;
	font-size: .99rem;
	font-weight: 700;
	line-height: 1.32;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ph-rel-card__headline a { color: var(--ph-ink); }
.ph-rel-card__headline a:hover { color: var(--ph-accent-dark); text-decoration: none; }
.ph-rel-card__meta {
	margin-top: auto;
	padding-top: 4px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: .8rem;
	color: var(--ph-ink-2);
}
.ph-rel-card__comments { display: inline-flex; align-items: center; gap: 4px; }

/* La primera tarjeta va grande, con la foto de fondo y el titular encima. */
.ph-rel-card--big {
	grid-column: span 2;
	position: relative;
	min-height: 260px;
	background: #111;
}
.ph-rel-card--big .ph-rel-card__link { display: block; height: 100%; color: #fff; }
.ph-rel-card--big .ph-rel-card__link:hover { text-decoration: none; }
.ph-rel-card--big img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ph-rel-card--big .ph-rel-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .35) 48%, rgba(0, 0, 0, 0) 72%);
}
.ph-rel-card--big .ph-rel-card__text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.ph-rel-card--big .ph-rel-card__source { color: rgba(255, 255, 255, .85); }
.ph-rel-card--big .ph-rel-card__title {
	font-size: 1.32rem;
	font-weight: 800;
	line-height: 1.22;
	letter-spacing: -.01em;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Barra lateral ---------- */

.ph-sidebar { display: flex; flex-direction: column; gap: 18px; }
.ph-sidebar .widget {
	background: var(--ph-card);
	border-radius: var(--ph-radius);
	box-shadow: var(--ph-shadow);
	padding: 16px 18px;
	margin: 0;
}
.ph-sidebar .widget-title,
.ph-footer-widgets .widget-title {
	font-size: 1rem;
	font-weight: 800;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ph-accent);
}
.ph-sidebar ul, .ph-footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.ph-sidebar li, .ph-footer-widgets li { padding: 6px 0; border-bottom: 1px solid var(--ph-line); }
.ph-sidebar li:last-child, .ph-footer-widgets li:last-child { border-bottom: 0; }

.ph-popular { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ph-popular__item { display: flex; gap: 11px; align-items: flex-start; }
.ph-popular__thumb { flex: 0 0 62px; width: 62px; height: 62px; border-radius: 8px; overflow: hidden; background: #e9e9e9; }
.ph-popular__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-popular__thumb--none { display: flex; align-items: center; justify-content: center; background: var(--ph-accent); }
.ph-popular__nophoto { color: #fff; font-weight: 800; font-size: 1.3rem; }
.ph-popular__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ph-popular__link { color: var(--ph-ink); font-weight: 700; font-size: .92rem; line-height: 1.35; }
.ph-popular__link:hover { color: var(--ph-accent-dark); text-decoration: none; }
.ph-popular__meta { font-size: .78rem; color: var(--ph-ink-2); }

/* ---------- Comentarios ---------- */

.ph-comments { margin-top: 28px; }
.ph-comments__list { list-style: none; margin: 0; padding: 0; }
.ph-comments__list .comment { padding: 14px 0; border-bottom: 1px solid var(--ph-line); }
.ph-comments__list .comment-author { font-weight: 700; }
.ph-comments__list .comment-meta { font-size: .8rem; color: var(--ph-ink-2); }
.ph-comments .comment-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.ph-comments .comment-form input[type="text"],
.ph-comments .comment-form input[type="email"],
.ph-comments .comment-form input[type="url"],
.ph-comments .comment-form textarea {
	width: 100%;
	border: 1px solid var(--ph-line);
	border-radius: 8px;
	padding: 9px 12px;
	font: inherit;
	background: var(--ph-surface);
	color: var(--ph-ink);
}
.ph-comments .form-submit input {
	background: var(--ph-accent);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 10px 22px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.ph-comments .form-submit input:hover { background: var(--ph-accent-dark); }

/* ---------- Pie ---------- */

.ph-footer-widgets { background: var(--ph-surface); border-top: 1px solid var(--ph-line); padding: 26px 0 8px; }
.ph-footer-widgets__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.ph-footer-widgets .widget { margin: 0 0 18px; }

.ph-footer { background: var(--ph-surface); border-top: 1px solid var(--ph-line); }
.ph-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
	padding-top: 13px;
	padding-bottom: 13px;
	font-size: .88rem;
	color: var(--ph-ink-2);
}
.ph-footer__copy a { color: var(--ph-ink); font-weight: 700; }
.ph-footer__nav { margin-left: auto; }
.ph-footer__list { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.ph-footer__list a { color: var(--ph-ink-2); }
.ph-footer__list a:hover { color: var(--ph-accent); }

/* ---------- 404 y búsqueda ---------- */

.ph-404 { max-width: 640px; margin: 10px auto 24px; text-align: center; }
.ph-search-again { max-width: 520px; margin: 16px auto; }

/* ---------- Migas de pan ---------- */

.ph-crumb { margin: 2px 0 14px; }
.ph-crumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: .85rem;
	color: var(--ph-ink-2);
}
.ph-crumb__item { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ph-crumb__item:not(:last-child)::after { content: "›"; color: var(--ph-ink-2); }
.ph-crumb__item a { color: var(--ph-ink-2); font-weight: 600; }
.ph-crumb__item a:hover { color: var(--ph-accent); }
.ph-crumb__item [aria-current="page"] {
	color: var(--ph-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 420px;
}

/* ---------- Caja de autor ---------- */

.ph-authorbox {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	background: var(--ph-soft);
	border-radius: 10px;
	padding: 18px 20px;
	margin: 24px 0 6px;
}
.ph-authorbox__avatar {
	border-radius: 50%;
	flex: 0 0 auto;
	width: 72px;
	height: 72px;
	object-fit: cover;
}
.ph-authorbox__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ph-authorbox__label {
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--ph-ink-2);
}
.ph-authorbox__name { font-size: 1.12rem; font-weight: 800; color: var(--ph-ink); }
.ph-authorbox__name:hover { color: var(--ph-accent-dark); text-decoration: none; }
.ph-authorbox__desc { margin: 4px 0 0; font-size: .93rem; color: var(--ph-ink-2); line-height: 1.55; }

/* ---------- Boletín en la barra lateral ---------- */

.ph-newsletter__text { font-size: .92rem; color: var(--ph-ink-2); margin: 0 0 12px; }
.ph-newsletter__form { display: flex; flex-direction: column; gap: 8px; }
.ph-newsletter__form input {
	border: 1px solid var(--ph-line);
	border-radius: 8px;
	padding: 10px 12px;
	font: inherit;
	background: var(--ph-surface);
	color: var(--ph-ink);
	width: 100%;
}
.ph-newsletter__form button {
	border: 0;
	border-radius: 999px;
	background: var(--ph-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	padding: 10px 18px;
	cursor: pointer;
}
.ph-newsletter__form button:hover { background: var(--ph-accent-dark); }

/* ---------- Botón «volver arriba» ---------- */

.ph-top-btn {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 150;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: var(--ph-accent);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--ph-shadow-hover);
	cursor: pointer;
}
.ph-top-btn:hover { background: var(--ph-accent-dark); }
.ph-top-btn[hidden] { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
	.ph-grid { grid-template-columns: repeat(3, 1fr); }
	.ph-rel-grid { grid-template-columns: repeat(3, 1fr); }
	.ph-hero { grid-template-columns: 1fr 1fr; }
	.ph-hero__main { grid-column: 1 / -1; min-height: 280px; }
	.ph-header__date { display: none; }
}

@media (max-width: 860px) {
	.ph-article-layout { grid-template-columns: 1fr; }
	.ph-article { padding: 22px 18px; }
	.ph-article__title { font-size: 1.65rem; }
	.ph-hero { grid-template-columns: 1fr 1fr; }
	.ph-hero__main { grid-column: 1 / -1; min-height: 250px; }
	.ph-hero__title { font-size: 1.3rem; }
	.ph-hero .ph-card:last-child { display: flex; }
	.ph-footer-widgets__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	.ph-grid { grid-template-columns: repeat(2, 1fr); }
	.ph-rel-grid { grid-template-columns: repeat(2, 1fr); }
	.ph-rel-card--big { grid-column: 1 / -1; min-height: 220px; }
	.ph-header__search { display: none; }
	.ph-search-toggle { display: block; }
	/* En móvil se quedan visibles las redes; se ocultan fecha y contacto. */
	.ph-header__side { gap: 6px; }
	.ph-header__contact { display: none; }
	.ph-nav-button { display: flex; }
	.ph-nav { display: none; width: 100%; }
	.ph-nav__list { flex-direction: column; padding: 6px 0 12px; }
	.ph-nav__list a { display: block; }
	/* En móvil los submenús van desplegados pero sangrados, dentro del menú abierto. */
	.ph-nav__list .sub-menu {
		display: block;
		position: static;
		min-width: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		padding: 0 0 0 18px;
	}
	.ph-navbar__inner { flex-wrap: wrap; }
	.ph-nav-checkbox:checked ~ .ph-nav { display: block; }
	.ph-article__nav { grid-template-columns: 1fr; }
	.ph-article__navlink--next { text-align: left; }
}

@media (max-width: 420px) {
	.ph-grid { grid-template-columns: 1fr; }
	.ph-rel-grid { grid-template-columns: 1fr; }
	.ph-hero { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Modernización visual (v1.0.7) — misma forma, acabado actual
   ========================================================================== */

body {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
h1, h2, h3, .ph-logo, .ph-hero__title, .ph-card__title, .ph-topcard__title {
	letter-spacing: -.022em;
}
::selection { background: var(--ph-accent); color: #fff; }

/* Menú fijo con efecto cristal al bajar. */
.ph-navbar {
	background: color-mix(in srgb, var(--ph-surface) 86%, transparent);
	-webkit-backdrop-filter: saturate(1.5) blur(12px);
	backdrop-filter: saturate(1.5) blur(12px);
	border-bottom: 1px solid var(--ph-line);
	box-shadow: 0 6px 24px rgba(16, 24, 40, .05);
}

/* El ítem activo del menú y las etiquetas de categoría en degradado. */
.ph-nav__list > li.current-menu-item > a,
.ph-nav__list > li.current-menu-parent > a,
.ph-nav__list > li.current-post-ancestor > a {
	background: linear-gradient(135deg, var(--ph-accent), var(--ph-accent-dark));
	color: #fff;
	border-color: transparent;
}
.ph-card__cat, .ph-topcard__cat {
	background: linear-gradient(135deg, var(--ph-accent), var(--ph-accent-dark));
	color: #fff;
}
.ph-card__cat {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	line-height: 1.5;
}

/* Con la sesión iniciada, el menú fijo se coloca bajo la barra de WP. */
body.admin-bar .ph-navbar { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .ph-navbar { top: 46px; }
}

/* Tarjetas más redondeadas y con elevación suave al pasar el cursor. */
.ph-card, .ph-topcard, .ph-article, .ph-sidebar .widget, .ph-authorbox {
	border-radius: 16px;
}
.ph-card, .ph-topcard { transition: transform .22s ease, box-shadow .22s ease; }
.ph-card:hover, .ph-topcard:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(16, 24, 40, .13);
}
.ph-hero {
	border-radius: 20px;
	box-shadow: 0 18px 44px rgba(16, 24, 40, .16);
}
.ph-hero__title { font-weight: 900; }
.ph-article__figure img { border-radius: 16px; }
.ph-rel-card { border-radius: 16px; }
.ph-rel-card--big { border-radius: 20px; }

/* Titulares de sección con barra en degradado. */
.ph-top__head h2, .ph-archive-head h1, .widget-title {
	position: relative;
	padding-left: 14px;
}
.ph-top__head h2::before, .ph-archive-head h1::before, .widget-title::before {
	content: "";
	position: absolute;
	left: 0;
	top: .12em;
	bottom: .12em;
	width: 5px;
	border-radius: 99px;
	background: linear-gradient(180deg, var(--ph-accent), var(--ph-accent-dark));
}
.widget-title { border-bottom: 0; padding-bottom: 2px; }

/* Botones principales en degradado. */
.ph-loadmore, .ph-newsletter__form button {
	background: linear-gradient(135deg, var(--ph-accent), var(--ph-accent-dark));
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ph-loadmore:hover, .ph-newsletter__form button:hover {
	background: linear-gradient(135deg, var(--ph-accent-dark), var(--ph-accent-dark));
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(16, 24, 40, .16);
}
.ph-top-btn {
	background: linear-gradient(135deg, var(--ph-accent), var(--ph-accent-dark));
	box-shadow: 0 12px 26px rgba(16, 24, 40, .22);
}

/* Números de «Lo más leído» en círculo degradado. */
.ph-popular__rank {
	background: linear-gradient(135deg, var(--ph-accent), var(--ph-accent-dark));
	color: #fff;
}

/* Buscador con anillo de foco suave. */
.ph-search input:focus, .ph-newsletter__form input:focus {
	border-color: var(--ph-accent);
	box-shadow: 0 0 0 4px var(--ph-accent-soft);
	outline: none;
}

/* Citas dentro del artículo con borde en degradado. */
.ph-article__content blockquote {
	border-left: 4px solid var(--ph-accent);
	background: var(--ph-soft);
	border-radius: 0 12px 12px 0;
	padding: 14px 18px;
}

/* Pie con línea superior en degradado. */
.ph-footer { position: relative; }
.ph-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--ph-accent), var(--ph-accent-dark), var(--ph-accent));
}

/* v1.0.9: la categoría del río usa la clase ph-card__source: píldora degradado. */
.ph-card__source {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--ph-accent), var(--ph-accent-dark));
	color: #fff;
	font-size: .72rem;
	line-height: 1.5;
}
.ph-card__source:hover { color: #fff; text-decoration: none; opacity: .92; }

/* ==========================================================================
   v1.0.12 — Logo sin fondo: variante oscura y centrado en móvil
   ========================================================================== */

/* La variante oscura del logo (paquete del tema) solo se ve en modo oscuro. */
.ph-brand a.ph-logo-dark-link { display: none; }
:root[data-theme="dark"] .ph-brand .custom-logo-link { display: none; }
:root[data-theme="dark"] .ph-brand a.ph-logo-dark-link { display: block; }
.ph-brand .ph-logo-dark { max-height: 52px; width: auto; display: block; }

/* En móvil el logo va centrado, en su propia fila de la cabecera. */
@media (max-width: 640px) {
	.ph-header__inner { flex-wrap: wrap; justify-content: center; }
	.ph-brand {
		flex: 1 1 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	.ph-brand .custom-logo-link,
	.ph-brand a.ph-logo-dark-link { margin: 0 auto; }
	.ph-brand__tagline { text-align: center; }
}

/* ==========================================================================
   v1.0.16 — Buscador móvil COMPLETO y siempre visible (orden del dueño,
   2026-11-08): en el celular ya no va la lupita que había que tocar; la
   barra de búsqueda completa (campo + botón «Buscar») se ve entera bajo
   la cabecera. En escritorio no se muestra (ahí va el buscador de la
   cabecera, para no duplicarlo).
   ========================================================================== */

.ph-mobile-search { display: none; }
.ph-search-toggle { display: none !important; }

@media (max-width: 640px) {
	.ph-mobile-search {
		display: block;
		border-top: 1px solid var(--ph-line);
		padding: 10px 0 12px;
		background: var(--ph-surface);
	}
	.ph-mobile-search .ph-searchform { width: 100%; }
	.ph-mobile-search[hidden] { display: block; }
}

/* ==========================================================================
   v1.0.17 — Blindaje anti-desborde en artículos (reporte del dueño,
   2026-11-08): los posts viejos del editor clásico traen figuras con
   ancho FIJO en línea (style="width: 671px" en .wp-caption) que las
   reglas normales no pueden vencer: la columna del artículo se estiraba
   a ~700 px y en el celular TODO se veía cortado (título, buscador,
   compartir). Aquí el ancho en línea se neutraliza con !important y se
   protege la rejilla y la barra lateral para que nada pase del ancho
   de la pantalla.
   ========================================================================== */

.ph-article__content .wp-caption,
.ph-article__content figure {
	width: auto !important;
	max-width: 100% !important;
}
.ph-article__content [style*="width"] { max-width: 100% !important; }
.ph-article__content pre {
	max-width: 100%;
	overflow-x: auto;
}
.ph-article__title { overflow-wrap: break-word; }
.ph-article-layout > * { min-width: 0; }
.ph-sidebar .widget { max-width: 100%; }
.ph-sidebar .widget img,
.ph-sidebar .widget iframe,
.ph-sidebar .widget table { max-width: 100%; }
.ph-sidebar .widget div.cjsearchbox { width: auto !important; max-width: 100%; }

@media (max-width: 860px) {
	.ph-article-layout { grid-template-columns: minmax(0, 1fr); }
	.ph-article__content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.ph-crumb__item [aria-current="page"] { max-width: 52vw; }
}
