/*
Theme Name: Revista México Vanguardista
Theme URI: https://www.revistamexico.online/
Author: Revista México
Description: Tema editorial propio para Revista México: portada modular, tipografía periodística y lectura enfocada.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: revista-mexico-vanguardista
*/

:root {
  --ink: #111217;
  --paper: #f7f4ef;
  --white: #fffdfa;
  --muted: #6f6b70;
  --line: #d9d2ca;
  --magenta: #c90068;
  --magenta-dark: #8d0049;
  --teal: #0e6d70;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Arial, Helvetica, sans-serif; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--magenta); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 9999; top: 1rem; left: 1rem; width: auto; height: auto; padding: .7rem 1rem; background: var(--magenta); color: #fff; clip: auto; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.utility-bar { background: var(--ink); color: #fff; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.utility-inner, .brand-row, .nav-inner, .site-main, .site-footer-inner { max-width: var(--max); margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.utility-inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.utility-inner a { color: #fff; }
.utility-inner a:hover { color: #f49ac8; }
.brand-row { min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; }
.brand-logo { width: 68px; height: 68px; object-fit: contain; flex: 0 0 auto; }
.brand-title { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2rem, 4vw, 3.6rem); line-height: .95; letter-spacing: -.055em; }
.tagline { max-width: 260px; margin: 0; color: var(--muted); font-family: Georgia, 'Times New Roman', serif; font-size: 1.1rem; font-style: italic; text-align: right; }
.primary-nav { background: var(--magenta); color: #fff; }
.nav-inner { min-height: 48px; display: flex; align-items: center; overflow-x: auto; }
.nav-menu { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 0; width: 100%; }
.nav-menu li { margin: 0; }
.nav-menu a { display: block; padding: .72rem 1rem; color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.nav-menu a:hover, .nav-menu .current-menu-item > a { background: var(--ink); color: #fff; }

.site-main { padding-top: 3.8rem; padding-bottom: 4rem; }
.section-kicker { margin: 0 0 .55rem; color: var(--magenta); font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 0 0 1.4rem; border-bottom: 2px solid var(--ink); padding-bottom: .7rem; }
.section-heading h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; letter-spacing: -.045em; }
.section-heading a { color: var(--magenta); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-intro { display: grid; grid-template-columns: 1.3fr .7fr; gap: 2rem; align-items: end; margin-bottom: 2.8rem; }
.hero-intro h1 { max-width: 760px; margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(3rem, 7vw, 6.8rem); line-height: .9; letter-spacing: -.075em; }
.hero-intro p { margin: 0; color: var(--muted); font-size: 1.04rem; }
.hero-grid { display: grid; grid-template-columns: 1.45fr .8fr .8fr; gap: 1.25rem; }
.story-card { min-width: 0; background: var(--white); border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease; }
.story-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(17,18,23,.1); }
.story-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: #ddd; }
.story-card--lead img { aspect-ratio: 16/10; }
.story-card__body { padding: 1.1rem 1.15rem 1.3rem; }
.story-card__category, .post-meta { color: var(--magenta); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.story-card h2, .story-card h3 { margin: .45rem 0 .55rem; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.35rem, 2.2vw, 2.05rem); line-height: 1.02; letter-spacing: -.04em; }
.story-card--lead h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.story-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.latest-section { margin-top: 4rem; }
.latest-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.latest-grid .story-card h3 { font-size: 1.35rem; }
.latest-grid .story-card img { aspect-ratio: 4/3; }
.section-band { margin-top: 4rem; padding: 2rem; background: var(--ink); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.section-band h2 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1; }
.section-band a { padding: .75rem 1rem; background: var(--magenta); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.archive-header { margin-bottom: 2.4rem; padding-bottom: 1.2rem; border-bottom: 2px solid var(--ink); }
.archive-header h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.5rem, 6vw, 5.5rem); line-height: .95; letter-spacing: -.06em; }
.archive-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.article-header { max-width: 920px; margin: 0 auto 2rem; }
.article-header h1 { margin: .55rem 0 1rem; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.8rem, 7vw, 6.6rem); line-height: .92; letter-spacing: -.075em; }
.article-excerpt { margin: 0; color: var(--muted); font-family: Georgia, 'Times New Roman', serif; font-size: 1.35rem; line-height: 1.35; }
.article-figure { max-width: 1120px; margin: 0 auto 2rem; }
.article-figure img { width: 100%; max-height: 680px; object-fit: cover; }
.article-figure figcaption { margin-top: .5rem; color: var(--muted); font-size: .78rem; }
.article-content { max-width: 780px; margin: 0 auto; font-family: Georgia, 'Times New Roman', serif; font-size: 1.2rem; line-height: 1.75; }
.article-content p { margin: 0 0 1.35rem; }
.article-content h2, .article-content h3 { margin-top: 2.2rem; line-height: 1.1; }
.article-content a { color: var(--magenta-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content blockquote { margin: 2rem 0; padding: 1rem 1.5rem; border-left: 5px solid var(--magenta); font-size: 1.45rem; }
.article-footer { max-width: 780px; margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

.site-footer { background: var(--ink); color: #fff; padding: 3rem 0 1.25rem; }
.site-footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-family: Georgia, 'Times New Roman', serif; font-size: 2rem; line-height: 1; }
.site-footer p { color: #c8c4c1; font-size: .9rem; }
.footer-heading { margin: 0 0 .8rem; color: #f49ac8; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin: .35rem 0; }
.footer-menu a { color: #fff; font-size: .9rem; }
.footer-bottom { max-width: var(--max); margin: 2rem auto 0; padding: 1rem 1.25rem 0; border-top: 1px solid #3b3b42; color: #aaa6a5; font-size: .75rem; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .story-card--lead { grid-column: 1 / -1; }
  .latest-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .utility-inner { min-height: 30px; font-size: .6rem; }
  .utility-inner span:last-child { display: none; }
  .brand-row { min-height: 106px; }
  .brand-title { font-size: 2.1rem; }
  .brand-logo { width: 48px; height: 48px; }
  .tagline { display: none; }
  .site-main { padding-top: 2.4rem; }
  .hero-intro { display: block; }
  .hero-intro p { margin-top: 1.2rem; }
  .hero-grid, .latest-grid, .archive-list { grid-template-columns: 1fr; }
  .section-band { display: block; }
  .section-band a { display: inline-block; margin-top: 1.2rem; }
  .site-footer-inner { grid-template-columns: 1fr; }
  .article-content { font-size: 1.08rem; }
}

/* Portada interactiva y fondo dinámico */
body { position: relative; overflow-x: hidden; background: radial-gradient(circle at 8% 12%, rgba(201,0,104,.12), transparent 26rem), radial-gradient(circle at 92% 28%, rgba(14,109,112,.13), transparent 30rem), var(--paper); }
body::before { content: ''; position: fixed; inset: -22%; z-index: -1; pointer-events: none; background: conic-gradient(from 190deg at 48% 50%, rgba(201,0,104,.16), transparent 28%, rgba(14,109,112,.15), transparent 62%, rgba(245,184,66,.10)); filter: blur(58px); opacity: .64; animation: rmv-drift 22s ease-in-out infinite alternate; }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .18; background-image: linear-gradient(115deg, transparent 0 48%, rgba(17,18,23,.06) 49%, transparent 50%), linear-gradient(25deg, transparent 0 48%, rgba(201,0,104,.04) 49%, transparent 50%); background-size: 34px 34px, 52px 52px; mix-blend-mode: multiply; }
@keyframes rmv-drift { 0% { transform: translate3d(-2%, -1%, 0) rotate(0deg) scale(1); } 50% { transform: translate3d(2%, 2%, 0) rotate(7deg) scale(1.05); } 100% { transform: translate3d(-1%, 3%, 0) rotate(-4deg) scale(1.02); } }
.category-atlas { margin: 4.5rem auto; padding: 2.2rem; max-width: var(--max); background: rgba(255,253,250,.82); border: 1px solid rgba(217,210,202,.9); box-shadow: 0 22px 60px rgba(17,18,23,.08); backdrop-filter: blur(10px); }
.section-heading--atlas { align-items: end; margin-bottom: 1.2rem; }
.section-heading--atlas h2 { max-width: 700px; }
.atlas-intro { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.2rem; margin-bottom: 1.4rem; }
.atlas-statement { padding: 1.1rem 1.2rem; border-left: 4px solid var(--magenta); background: #fff; font-size: 1.05rem; }
.atlas-note { background: var(--ink); color: #fff; padding: 1rem 1.1rem; }
.atlas-note summary { cursor: pointer; font-weight: 700; }
.atlas-note p { color: rgba(255,255,255,.78); margin: .8rem 0 0; font-size: .92rem; }
.category-clusters { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
.category-cluster { border: 1px solid var(--line); background: rgba(255,255,255,.72); transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.category-cluster:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(17,18,23,.08); }
.category-cluster summary { display: grid; grid-template-columns: 1fr auto auto; gap: .8rem; align-items: center; padding: 1rem 1.1rem; cursor: pointer; list-style: none; }
.category-cluster summary::-webkit-details-marker, .atlas-note summary::-webkit-details-marker { display: none; }
.cluster-name { font-family: Georgia, 'Times New Roman', serif; font-size: 1.35rem; font-weight: 700; }
.cluster-count { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.cluster-toggle { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--magenta); color: #fff; font-size: 1.35rem; line-height: 1; transition: transform .25s ease, background .25s ease; }
.category-cluster[open] .cluster-toggle { transform: rotate(45deg); background: var(--teal); }
.category-cluster__body { padding: 0 1.1rem 1rem; animation: rmv-reveal .3s ease both; }
@keyframes rmv-reveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.category-list { list-style: none; margin: 0; padding: .2rem 0 0; border-top: 1px solid var(--line); }
.category-list li { border-bottom: 1px solid rgba(217,210,202,.7); }
.category-list li:last-child { border-bottom: 0; }
.category-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; color: var(--ink); }
.category-list a:hover { color: var(--magenta); }
.category-list a span:last-child { color: var(--muted); font-size: .8rem; white-space: nowrap; }
@media (max-width: 760px) { .category-atlas { margin: 3rem 1rem; padding: 1.2rem; } .atlas-intro, .category-clusters { grid-template-columns: 1fr; } .category-cluster summary { grid-template-columns: 1fr auto; } .cluster-count { grid-column: 1; grid-row: 2; } .cluster-toggle { grid-column: 2; grid-row: 1 / span 2; } }
@media (prefers-reduced-motion: reduce) { body::before, .category-cluster__body { animation: none; } .category-cluster { transition: none; } }
