/*
Theme Name: Reinas
Theme URI: https://reinas.com
Author: The Moreira Organization LLC
Description: Tema editorial ligero para Reinas.com: portada de revista, noticias optimizadas para Google Discover, enciclopedia de perfiles tipo wiki (requiere el plugin Reinas Core) y espacios de AdSense sin saltos de diseño.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: reinas
*/

:root {
	--paper: #fbf8f3;
	--card: #ffffff;
	--ink: #16110f;
	--ink-2: #3a302b;
	--muted: #6d625b;
	--line: #e6ddd1;
	--accent: #8c1c3a;
	--accent-ink: #6e1029;
	--gold: #b08a4a;
	--gold-soft: #d8c39b;
	/* Superficies (las paletas de Apariencia > Personalizar las sobrescriben) */
	--dark: #16110f;
	--dark-text: #cfc4b8;
	--dark-link: #e8dfd4;
	--dark-line: #2e2622;
	--band: #16110f;
	--band-text: #fbf8f3;
	--band-muted: #cfc4b8;
	--band-frame: rgba(176, 138, 74, .35);
	--band-chip: rgba(216, 195, 155, .45);
	--band-chip-text: #d8c39b;
	--soft: #f3ebe0;
	--soft-2: #e8dccb;
	--nav-bg: var(--paper);
	--font-display: "Bodoni Moda", Didot, "Bodoni 72", "Times New Roman", serif;
	--font-body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--wrap: 1240px;
	--gutter: 16px;
}
@media (min-width: 760px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.005em; margin: 0 0 .5em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--ink); color: #fff; padding: .6rem 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }

.label { margin: 0 0 .5rem; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.label a { color: inherit; text-decoration: none; }
.label--gold, .label--gold a { color: var(--gold); }
.kicker { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); text-decoration: none; margin-bottom: .45rem; }
.btn { display: inline-block; padding: .7rem 1.2rem; background: var(--accent); color: var(--paper); text-decoration: none; font-size: .85rem; font-weight: 600; letter-spacing: .04em; }
.btn:hover { background: var(--accent); color: #fff; }
.btn--light { background: transparent; color: var(--band-text); border: 1px solid var(--band-chip); }
.btn--light:hover { background: var(--band-text); color: var(--accent); }
.fineprint { font-size: .85rem; color: var(--muted); }
.empty { color: var(--muted); padding: 2rem 0; }

/* Barra superior */
.topbar { background: var(--dark); color: var(--dark-text); font-size: .75rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding-top: .45rem; padding-bottom: .45rem; }
.topbar__social a { color: var(--dark-text); text-decoration: none; margin-left: 1rem; }
.topbar__social a:hover { color: var(--gold-soft); }
@media (max-width: 600px) { .topbar__social { display: none; } }

/* Cabecera */
.masthead { background: var(--nav-bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar .masthead { top: 0; position: relative; } }
.masthead__inner { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding-top: .7rem; padding-bottom: .55rem; }
.brand { text-align: center; }
.brand__tag { margin: .15rem 0 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wordmark { display: inline-flex; flex-direction: column; align-items: center; color: var(--ink); text-decoration: none; line-height: 1; }
.wordmark__crown { color: var(--gold); margin-bottom: 2px; }
.wordmark__text { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: .06em; text-transform: uppercase; }
.wordmark:hover { color: var(--ink); }
.wordmark--light { color: var(--paper); }
.wordmark--light:hover { color: var(--gold-soft); }
.custom-logo { max-height: 64px; width: auto; }
.masthead__menu, .masthead__search { background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; } .burger::after { top: 7px; }
.masthead__menu[aria-expanded="true"] .burger { background: transparent; }
.masthead__menu[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.masthead__menu[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }
.searchbar { border-top: 1px solid var(--line); padding: .8rem 0; }

.nav { border-top: 1px solid var(--line); }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: .2rem 1.6rem; flex-wrap: wrap; }
.nav__list a { display: block; padding: .6rem 0; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.nav__list a:hover, .nav__list .current-menu-item > a, .nav__list .current-menu-ancestor > a { border-bottom-color: var(--accent); color: var(--accent); }
@media (max-width: 759px) {
	.nav { display: none; }
	.nav.is-open { display: block; }
	.nav__list { flex-direction: column; gap: 0; }
	.nav__list a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
}
@media (min-width: 760px) { .masthead__menu { visibility: hidden; } }

.searchform { display: flex; gap: .5rem; }
.searchform input, .ency__search input { flex: 1; min-width: 0; padding: .7rem .9rem; border: 1px solid var(--line); background: var(--card); font: inherit; font-size: 1rem; }
.searchform button, .ency__search button { padding: .7rem 1.1rem; border: 0; background: var(--accent); color: var(--paper); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; }
.searchform button:hover, .ency__search button:hover { background: var(--accent); }

.site-main { min-height: 50vh; }

/* Tarjetas de noticia */
.story { position: relative; }
.story__media { display: block; overflow: hidden; background: var(--soft); aspect-ratio: 16/9; }
.story__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.story:hover .story__media img { transform: scale(1.03); }
.story__noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--soft), var(--soft-2)); }
.story__body { padding-top: .7rem; }
.story__title { font-size: 1.22rem; margin: 0 0 .35rem; }
.story__title a { color: var(--ink); text-decoration: none; }
.story__title a:hover { color: var(--accent); }
.story__dek { color: var(--ink-2); margin: 0 0 .5rem; font-size: 1.02rem; }
.story__meta { margin: 0; font-size: .78rem; color: var(--muted); }
.story--hero .story__title { font-size: clamp(1.8rem, 4.2vw, 3rem); line-height: 1.05; }
.story--list { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.story--list .story__media { aspect-ratio: 1; }
.story--list .story__body { padding: 0; }
.story--list .story__title { font-size: 1.02rem; line-height: 1.22; }
.story--list .kicker { margin-bottom: .2rem; font-size: .64rem; }

/* Portada */
.lead { display: grid; gap: 2rem; padding-top: 1.8rem; padding-bottom: 1.5rem; }
@media (min-width: 960px) { .lead { grid-template-columns: 1fr 340px; gap: 2.5rem; } }
.lead__side .label { padding-bottom: .4rem; }
.empty-state { padding: 4rem var(--gutter); text-align: center; }
.empty-state h1 { font-size: clamp(2rem, 5vw, 3rem); }

.section { padding-top: 2.2rem; padding-bottom: 1rem; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; border-top: 3px solid var(--accent); padding-top: .7rem; margin-bottom: 1.2rem; }
.section__title { font-size: 1.7rem; margin: 0; }
.section__title a { color: var(--ink); text-decoration: none; }
.section__more { font-size: .8rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.8rem 1.4rem; }

.band { background: var(--band); color: var(--band-text); padding: 3rem 0 2.6rem; margin: 2rem 0 1rem; position: relative; }
.band::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--band-frame); pointer-events: none; }
.band__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.2rem; margin-bottom: 1.8rem; }
.band__title { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0; font-style: italic; font-weight: 500; }
.band__dek { margin: .5rem 0 0; color: var(--band-muted); max-width: 52ch; }
.band .rc-card { color: var(--band-text); }
.band .rc-card__role { color: var(--band-muted); }
.band .label--gold { color: var(--band-chip-text); }
.band .rc-card:hover .rc-card__name { color: var(--band-chip-text); }
.rc-grid--band { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.band__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2rem; }
.band__chips a { padding: .38rem .85rem; border: 1px solid var(--band-chip); border-radius: 999px; color: var(--band-chip-text); font-size: .8rem; text-decoration: none; }
.band__chips a:hover { background: var(--band-text); color: var(--accent); border-color: var(--band-text); }

/* Migas */
.crumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 .45rem; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* Noticia */
.article__head { padding-top: 1.8rem; text-align: left; }
.article__title { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.06; margin-bottom: .6rem; }
.article__dek { font-size: 1.2rem; color: var(--ink-2); margin: 0 0 1.2rem; line-height: 1.45; }
.byline { display: flex; gap: .7rem; align-items: center; font-size: .82rem; color: var(--muted); padding: .9rem 0 1.2rem; border-top: 1px solid var(--line); }
.byline__avatar { border-radius: 50%; }
.byline__author { display: block; color: var(--ink); font-weight: 600; }
.byline__author a { color: inherit; text-decoration: none; }
.article__hero { margin: 0 auto 1.6rem; }
.article__hero img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article__hero figcaption { font-size: .78rem; color: var(--muted); padding-top: .4rem; }
.article__layout { display: grid; gap: 2rem; }
@media (min-width: 1000px) { .article__layout { grid-template-columns: minmax(0, 720px) 300px; justify-content: center; gap: 3rem; } }
.article__aside .sticky { position: sticky; top: 140px; }
@media (max-width: 999px) { .article__aside { display: none; } }

.prose { font-size: 1.08rem; line-height: 1.72; }
.prose > * { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.75rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.5em; }
.prose blockquote { margin: 1.6em 0; padding: 0 0 0 1.2rem; border-left: 3px solid var(--gold); font-family: var(--font-display); font-size: 1.35rem; font-style: italic; line-height: 1.4; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-size: .8rem; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.tags a { display: inline-block; margin: 0 .35rem .35rem 0; padding: .25rem .65rem; border: 1px solid var(--line); font-size: .78rem; color: var(--ink-2); text-decoration: none; }
.author-box { display: flex; gap: 1rem; padding: 1.1rem; margin-top: 2rem; border-top: 2px solid var(--ink); background: var(--card); font-size: .92rem; }
.author-box { align-items: flex-start; }
.author-box .avatar, .byline__avatar { border-radius: 50% !important; object-fit: cover; flex: none; }
.author-box .avatar { width: 64px; height: 64px; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line); }
.author-box p { margin: 0 0 .3rem; }
.author-box__name a { font-weight: 700; color: var(--ink); text-decoration: none; }

/* Anuncios: altura reservada para no mover el diseño (CLS) */
.ad { margin: 1.6rem auto; text-align: center; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ad ins { width: 100%; }
.ad__label { display: block; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.ad--home { min-height: 120px; }
.ad--side { min-height: 600px; margin-top: 0; }
.ad--placeholder { background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 10px, var(--paper) 10px, var(--paper) 20px); color: var(--muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; border: 1px dashed var(--line); }
.profile__ad .ad--side { min-height: 280px; margin-top: 1.4rem; }

/* Enciclopedia */
.ency__head, .profile__head { background: linear-gradient(180deg, var(--soft), var(--paper)); border-bottom: 1px solid var(--line); padding: 1.6rem 0 1.8rem; }
.ency__title, .profile__title { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1; margin: 0 0 .4rem; }
.ency__dek { max-width: 62ch; color: var(--ink-2); margin: .3rem 0 1.2rem; }
.ency__search { display: flex; gap: .5rem; max-width: 520px; }
.ency { padding-top: 1.6rem; padding-bottom: 2rem; }
.ency__chips { margin-bottom: .6rem; }
.ency__count { font-size: .85rem; color: var(--muted); margin: .4rem 0 1.4rem; }
.rc-grid--ency { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.6rem 1.2rem; }
.cards__profile { max-width: 220px; }

.profile__role { font-size: 1.05rem; color: var(--ink-2); margin: 0; }
.profile__layout { display: grid; gap: 2rem; padding-top: 1.8rem; padding-bottom: 1rem; }
@media (min-width: 900px) {
	.profile__layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; }
	.profile__aside { order: 2; }
	.profile__aside > .rc-infobox { position: sticky; top: 140px; }
}
.profile__main { max-width: 760px; }
.profile__lead { font-family: var(--font-display); font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.4; margin: 1rem 0 0; max-width: 60ch; color: var(--ink-2); }
.profile__foot { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.profile__foot p { margin: 0 0 .3rem; }

/* Pie */
.footer { background: var(--dark); color: var(--dark-text); margin-top: 3rem; padding: 3rem 0 0; font-size: .9rem; }
.footer__inner { display: grid; gap: 2rem; }
@media (min-width: 860px) { .footer__inner { grid-template-columns: 1fr 2fr; } }
.footer__brand p { max-width: 36ch; }
.footer__social a { color: var(--gold-soft); margin-right: .9rem; text-decoration: none; }
.footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
.footer__title { color: var(--gold); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; margin: 0 0 .7rem; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li { margin: 0 0 .45rem; }
.footer__list a { color: var(--dark-link); text-decoration: none; }
.footer__list a:hover { color: var(--gold-soft); }
.footer__legal { border-top: 1px solid var(--dark-line); margin-top: 2.5rem; padding-top: 1rem; padding-bottom: 1.4rem; font-size: .78rem; }
.footer__legal p { margin: 0; }

/* Paginación */
.pager { margin: 2.4rem 0 1rem; }
.pager .nav-links { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.pager .page-numbers { padding: .5rem .85rem; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: .88rem; }
.pager .page-numbers.current, .pager .page-numbers:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.archive { padding-top: 1.6rem; padding-bottom: 2rem; }
.archive__head { border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 1.6rem; }
.archive__title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0; }
.archive__dek { color: var(--ink-2); max-width: 62ch; margin-top: .4rem; }
.page-article { padding-top: 2rem; padding-bottom: 2rem; }

/* WordPress */
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption-text, .wp-element-caption { font-size: .8rem; color: var(--muted); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
