/*
Theme Name: La Vida en Pesos
Theme URI: https://lavidaenpesos.com
Author: La Vida en Pesos
Description: Tema editorial ligero para un medio de economía cotidiana, trabajo, vivienda y consumo en México.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lavidaenpesos
*/

:root {
  --ink: #17212b;
  --muted: #607080;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #e5e3dc;
  --accent: #df5d35;
  --accent-dark: #b94421;
  --teal: #0e6b66;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--accent-dark); }
img { display: block; max-width: 100%; height: auto; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus { background: #fff; clip: auto !important; clip-path: none; color: var(--ink); display: block; height: auto; left: 1rem; padding: .75rem 1rem; top: 1rem; width: auto; z-index: 100000; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.topline { border-bottom: 1px solid var(--line); color: var(--muted); font-size: .79rem; letter-spacing: .06em; text-transform: uppercase; }
.topline-inner, .header-inner, .content-wrap, .footer-inner { margin: 0 auto; max-width: var(--max); padding-left: 1.25rem; padding-right: 1.25rem; }
.topline-inner { display: flex; justify-content: space-between; padding-bottom: .55rem; padding-top: .55rem; }
.header-inner { align-items: center; display: flex; gap: 2rem; justify-content: space-between; padding-bottom: 1.25rem; padding-top: 1.25rem; }
.brand { align-items: center; display: inline-flex; gap: .72rem; text-decoration: none; }
.brand-mark { align-items: center; background: var(--accent); border-radius: 10px 10px 10px 2px; color: #fff; display: inline-flex; font-size: 1.05rem; font-weight: 800; height: 38px; justify-content: center; letter-spacing: -.06em; width: 38px; }
.brand-name { font-size: 1.23rem; font-weight: 800; letter-spacing: -.035em; }
.brand-name span { color: var(--accent); }
.primary-nav ul { align-items: center; display: flex; flex-wrap: wrap; gap: 1.15rem; list-style: none; margin: 0; padding: 0; }
.primary-nav a { font-size: .9rem; font-weight: 700; text-decoration: none; }
.menu-toggle { display: none; }

.section-nav { background: var(--ink); color: #fff; }
.section-nav-inner { margin: 0 auto; max-width: var(--max); overflow-x: auto; padding: 0 1.25rem; scrollbar-width: none; }
.section-nav-inner::-webkit-scrollbar { display: none; }
.section-nav ul { display: flex; gap: 1.3rem; list-style: none; margin: 0; min-width: max-content; padding: .68rem 0; }
.section-nav a { color: #e8edf0; font-size: .83rem; font-weight: 700; text-decoration: none; }
.section-nav a:hover { color: #fff; }

.content-wrap { padding-bottom: 4.5rem; padding-top: 2.7rem; }
.eyebrow { color: var(--accent-dark); font-size: .76rem; font-weight: 800; letter-spacing: .12em; margin: 0 0 .65rem; text-transform: uppercase; }
.page-title, .article-title { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.045em; line-height: 1.07; }
.page-title { font-size: clamp(2.05rem, 4.2vw, 4.1rem); margin: 0 0 1.2rem; max-width: 820px; }
.dek { color: var(--muted); font-size: 1.03rem; margin: 0; max-width: 670px; }
.home-intro { align-items: end; border-bottom: 1px solid var(--line); display: flex; gap: 2rem; justify-content: space-between; margin-bottom: 2rem; padding-bottom: 1.7rem; }
.home-intro .dek { max-width: 510px; }
.home-date { color: var(--muted); font-size: .82rem; margin: 0 0 .25rem; text-align: right; }

.featured-grid { display: grid; gap: 1.7rem; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .8fr); margin-bottom: 3.7rem; }
.featured-card { background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; min-height: 390px; }
.featured-card .card-image { min-height: 260px; }
.featured-card .card-body { align-self: center; padding: clamp(1.3rem, 3vw, 2.7rem); }
.card-image { background: #e9e3d9; overflow: hidden; }
.card-image img { height: 100%; object-fit: cover; width: 100%; }
.card-category, .article-category { color: var(--teal); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.card-title { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 3vw, 2.8rem); letter-spacing: -.035em; line-height: 1.12; margin: .7rem 0 .8rem; }
.card-excerpt { color: var(--muted); margin: 0 0 1.1rem; }
.card-meta, .article-meta { color: var(--muted); font-size: .8rem; }
.side-stack { display: grid; gap: 1rem; }
.side-card { background: var(--ink); color: #fff; padding: 1.45rem; }
.side-card:nth-child(2) { background: #e7efe9; color: var(--ink); }
.side-card h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; line-height: 1.15; margin: .5rem 0 .65rem; }
.side-card p { color: inherit; opacity: .78; margin: 0; }
.side-card a { text-decoration: none; }

.section-heading { align-items: baseline; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; margin: 0 0 1.25rem; padding-bottom: .65rem; }
.section-heading h2 { font-family: Georgia, "Times New Roman", serif; font-size: 1.85rem; letter-spacing: -.03em; margin: 0; }
.section-heading a { color: var(--accent-dark); font-size: .82rem; font-weight: 800; text-decoration: none; }
.article-grid { display: grid; gap: 1.35rem; grid-template-columns: repeat(3, 1fr); }
.article-card { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.article-card .card-image { aspect-ratio: 16 / 9; }
.article-card .card-body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem; }
.article-card .card-title { font-size: 1.48rem; margin: .48rem 0 .6rem; }
.article-card .card-excerpt { font-size: .92rem; }
.article-card .card-meta { margin-top: auto; }
.empty-state { border: 1px dashed #c7c2b7; padding: 2rem; }
.empty-state p { margin: 0; }

.article-header { margin: 0 auto; max-width: 800px; }
.article-title { font-size: clamp(2.15rem, 4.3vw, 4.6rem); margin: .75rem 0 1rem; }
.article-standfirst { color: var(--muted); font-size: 1.08rem; line-height: 1.55; margin: 0 0 1.1rem; max-width: 700px; }
.article-byline { align-items: center; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); display: flex; gap: .7rem; margin: 1.3rem 0 2rem; padding: .85rem 0; }
.byline-dot { background: var(--accent); border-radius: 50%; height: 9px; width: 9px; }
.article-featured { margin: 0 auto 2.2rem; max-width: 1000px; }
.article-featured img { max-height: 650px; object-fit: cover; width: 100%; }
.article-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.78; margin: 0 auto; max-width: 700px; }
.article-content h2, .article-content h3 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; line-height: 1.22; margin-top: 2rem; }
.article-content h2 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.article-content h3 { font-size: 1.18rem; }
.article-content a { color: var(--accent-dark); }
.article-content blockquote { border-left: 4px solid var(--accent); color: #46515a; font-size: 1.35rem; font-style: italic; margin: 1.8rem 0; padding: .2rem 0 .2rem 1.2rem; }
.article-content table { border-collapse: collapse; display: block; margin: 1.5rem 0; max-width: 100%; overflow-x: auto; }
.article-content th, .article-content td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; }
.article-content th { background: #f0eee8; font-family: Inter, ui-sans-serif, sans-serif; font-size: .8rem; }
.sources-box, .ai-note { background: #eef4f0; border-left: 4px solid var(--teal); font-family: Inter, ui-sans-serif, sans-serif; font-size: .86rem; margin: 2.3rem auto 0; max-width: 730px; padding: 1rem 1.1rem; }
.sources-box h2 { font-size: 1rem; margin: 0 0 .35rem; }
.sources-box p, .ai-note p { margin: 0; }
.ai-note { background: #f7efe8; border-color: var(--accent); margin-top: 1rem; }
.related { border-top: 1px solid var(--line); margin: 3.5rem auto 0; max-width: 1000px; padding-top: 1.5rem; }
.related .article-grid { grid-template-columns: repeat(3, 1fr); }

.archive-header { border-bottom: 1px solid var(--line); margin-bottom: 2rem; padding-bottom: 1.6rem; }
.archive-header .page-title { font-size: clamp(2.05rem, 4vw, 3.7rem); }
.pagination { display: flex; gap: .6rem; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span { border: 1px solid var(--line); padding: .55rem .8rem; text-decoration: none; }
.pagination .current { background: var(--ink); color: #fff; }
.search-form { display: flex; gap: .5rem; margin-top: 1rem; max-width: 600px; }
.search-form label { flex: 1; }
input[type="search"], input[type="text"], textarea { background: #fff; border: 1px solid #cfcac1; border-radius: 2px; font: inherit; padding: .72rem .8rem; width: 100%; }
button, input[type="submit"] { background: var(--accent); border: 0; color: #fff; cursor: pointer; font: inherit; font-weight: 700; padding: .72rem 1rem; }

.site-footer { background: var(--ink); color: #e8edf0; }
.footer-inner { display: grid; gap: 2rem; grid-template-columns: 1.2fr 1fr 1fr; padding-bottom: 2.5rem; padding-top: 2.8rem; }
.footer-inner h2, .footer-inner h3 { color: #fff; font-family: Georgia, "Times New Roman", serif; margin: 0 0 .6rem; }
.footer-inner p { color: #bdc8ce; font-size: .9rem; margin: 0; }
.footer-inner ul { list-style: none; margin: 0; padding: 0; }
.footer-inner li { margin: .35rem 0; }
.footer-inner a { color: #e8edf0; font-size: .88rem; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); color: #aebbc1; font-size: .76rem; margin: 0 auto; max-width: var(--max); padding: 1rem 1.25rem; }

@media (max-width: 820px) {
  .header-inner { gap: 1rem; }
  .primary-nav ul { gap: .7rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 621px) {
  .section-nav { display: none; }
}
@media (max-width: 620px) {
  .topline-inner { display: none; }
  .header-inner { padding-bottom: 1rem; padding-top: 1rem; }
  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav.is-open ul { align-items: flex-start; background: var(--surface); border: 1px solid var(--line); flex-direction: column; gap: .45rem; margin-top: .8rem; padding: .8rem; position: absolute; right: 1.25rem; z-index: 10; }
  .menu-toggle { background: transparent; border: 1px solid var(--line); color: var(--ink); display: block; font-size: .82rem; padding: .45rem .65rem; }
  .home-intro { align-items: start; display: block; }
  .home-date { margin-top: 1rem; text-align: left; }
  .featured-card { display: block; }
  .featured-card .card-image { aspect-ratio: 16 / 10; min-height: 0; }
  .side-stack, .article-grid, .related .article-grid { grid-template-columns: 1fr; }
  .content-wrap { padding-bottom: 3rem; padding-top: 2rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .article-content { font-size: 1rem; line-height: 1.75; }
  .article-content h2 { font-size: 1.35rem; }
  .article-content h3 { font-size: 1.12rem; }
}
