/*
Theme Name: En Corto
Theme URI: https://encorto.com.mx/
Author: En Corto
Description: Tema editorial para las noticias de Chihuahua, con portada, cobertura por secciones y espacios publicitarios.
Version: 1.0.2
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: en-corto
*/

:root {
  --ink: #132734;
  --muted: #50616a;
  --red: #b31119;
  --flame: #ef101b;
  --cream: #f6f3ec;
  --line: #d4d8d6;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --width: 1200px;
  --gutter: clamp(1rem, 4.2vw, 4.5rem);
  --gap: clamp(1.2rem, 3vw, 2.75rem);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  background: #fff; color: var(--ink); font: 1rem/1.5 var(--font);
  margin: 0; -webkit-text-size-adjust: 100%; overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .16em; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #1573a2; outline-offset: 4px; }
::selection { color: #fff; background: #a53727; }
.ec-wrap { width: min(calc(100% - var(--gutter) * 2), var(--width)); margin-inline: auto; }
.screen-reader-text:not(:focus) {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute; width: 1px; white-space: nowrap;
}
.skip-link:focus { position: absolute; z-index: 999; top: .5rem; left: 1rem; padding: .6rem 1rem; background: #fff; }

.utility { color: #41545b; background: var(--cream); border-bottom: 1px solid #e2e0d9; }
.utility-inner { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 32px; font: 600 .64rem/1.3 var(--mono); letter-spacing: .065em; text-transform: uppercase; }
.utility-inner span { display: inline-flex; align-items: center; gap: .56rem; }
.utility-inner span::before { content: ""; width: 7px; height: 7px; border: 1.5px solid var(--red); transform: rotate(45deg); }
.masthead { background: #000; color: #fff; }
.masthead-inner { position: relative; display: flex; justify-content: center; align-items: center; padding-block: clamp(.8rem,1.5vw,1.4rem); }
.brand-group { display: flex; justify-content: center; align-items: center; min-width: 0; }
.brand, .custom-logo-link { display: inline-flex; align-items: center; flex-shrink: 1; text-decoration: none; vertical-align: middle; }
.brand img, .custom-logo-link img { display: block; width: min(54vw, 665px); height: auto; object-fit: contain; }
.search-panel { position: absolute; right: 0; z-index: 3; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.search-panel summary { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 650; padding: .55rem .85rem; border: 1px solid #707478; color: #fff; background: #171819; }
.search-panel summary:hover, .search-panel[open] summary { border-color: #fff; }
.search-panel .search-form { position: absolute; z-index: 5; top: calc(100% + .45rem); right: 0; width: min(340px, calc(100vw - 2rem)); padding: .65rem; border: 1px solid var(--line); box-shadow: 0 6px 14px #13273418; background: #fff; }
.search-form { display: flex; gap: .35rem; max-width: 31rem; }
.search-form label { flex: 1; min-width: 0; }
.search-form input { width: 100%; height: 43px; border: 1px solid #9fabad; border-radius: 0; padding: 0 .65rem; background: #fff; color: var(--ink); }
.search-form button, .wp-block-search__button, .form-submit input, .post-password-form input[type=submit] { border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: .55rem 1rem; font-weight: 700; border-radius: 0; }
.search-form button:hover { background: var(--red); border-color: var(--red); }
.nav-band { background: #181d20; color: #fff; border-top: 2px solid #b61318; }
.nav-band > .wrap { position: relative; }
.nav-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; }
.nav-band .nav-list { gap: clamp(.6rem, 2.3vw, 2rem); }
.nav-list a { text-decoration: none; }
.nav-band .nav-list a { position: relative; display: block; padding-block: .83rem; font-size: .85rem; line-height: 1.35; font-weight: 680; }
.nav-band .nav-list a:hover, .nav-band a[aria-current], .nav-band .current-menu-item > a { color: #fff; }
.nav-band a[aria-current]::after, .nav-band .current-menu-item > a::after, .nav-band .nav-list a:hover::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: #fd6569; }
.mobile-nav { display: none; }
.story { min-width: 0; }
.story-media { display: block; position: relative; overflow: hidden; background: #e5e4dc; }
.story-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s ease; }
.story-media:hover img { transform: scale(1.018); }
.story .story-copy { padding-top: .93rem; }
.eyebrow, .ec-kicker { display: inline-block; color: var(--red); text-transform: uppercase; letter-spacing: .105em; font: 750 .69rem/1.3 var(--font); text-decoration: none; }
a.eyebrow:hover { text-decoration: underline; text-underline-offset: .25em; }
.story-title { font: 700 clamp(1.35rem, 2.1vw, 1.83rem)/1.11 var(--serif); letter-spacing: -.035em; margin: .33rem 0 .65rem; overflow-wrap: anywhere; }
.story-title a, .minute-list a { text-decoration: none; }
.story-title a:hover, .minute-list a:hover { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.ec-lead .story-title { font-size: clamp(2.45rem, 4.1vw, 4rem); line-height: 1.025; letter-spacing: -.048em; margin-top: .35rem; }
.ec-lead .story-media img { aspect-ratio: 1.98; }
.ec-lead .story-copy { padding-top: 1.05rem; }
.story-excerpt { margin: .65rem 0 1rem; font: 1.055rem/1.55 var(--font); color: #3e525a; max-width: 64ch; }
.ec-meta { color: var(--muted); font: 500 .73rem/1.5 var(--mono); letter-spacing: .01em; }
.ec-home-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr); gap: var(--gap); align-items: start; }
.ec-rail { min-width: 0; border-left: 1px solid var(--line); padding-left: var(--gap); }
.ec-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2.1rem var(--gap); }
.ec-section { margin-block: clamp(2rem,4.5vw,4rem); }
.ec-section-title { margin: 0; font: 750 clamp(1.85rem,3vw,2.6rem)/1.12 var(--serif); letter-spacing: -.045em; }
.ec-ad { width: 100%; background: #f8f8f5; text-align: center; margin-block: 2rem; padding: .45rem 1rem .8rem; }
.ad-label { display: block; font: .56rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .3rem; }
.ad-widget img { display: inline-block; vertical-align: middle; }
.ad-widget p, .ad-widget figure { margin: 0; }
.site-footer { background: #000; color: #fff; border-top: 3px solid #b61318; margin-top: clamp(2.5rem,6vw,5.75rem); }
.footer-inner { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding-block: clamp(1.6rem,3.4vw,3rem); }
.footer-brand img { width: min(280px, 62vw); height: auto; }
.footer-meta { font: .71rem/1.7 var(--mono); color: #c9cdd0; }
.footer-inner .nav-list { gap: .65rem 1.2rem; font-size: .9rem; }
.footer-inner a:hover { color: #ff797c; }
.site-footer .custom-logo-link img { max-width: 280px; }

.home-main { margin-top: clamp(1.35rem,2.5vw,2.3rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-top: 2px solid var(--ink); padding-top: .85rem; margin-bottom: 1.35rem; }
.cover-heading { border: 0; margin-bottom: .9rem; padding: 0; align-items: center; gap: .9rem; }
.cover-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-kicker { display: inline-flex; align-items: center; gap: .55rem; color: var(--muted); font: 700 .66rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.section-kicker::before { content: ""; width: 17px; height: 4px; transform: skew(-12deg); background: var(--flame); }
.minute { scroll-margin-top: 1rem; }
.minute:focus { outline: none; }
.minute:focus-visible { outline: 3px solid #1573a2; outline-offset: 4px; }
.minute-heading { display: flex; align-items: center; gap: .65rem; background: var(--ink); color: #fff; font: 750 clamp(1.45rem, 2.35vw, 2.05rem)/1.15 var(--serif); letter-spacing: -.045em; padding: .35rem 1rem .85rem; margin: 0; }
.minute-heading::before, .minute-shortcut::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ff4b53; box-shadow: 0 0 0 3px #ff4b5330; }
.minute-shortcut { display: inline-flex; align-items: center; gap: .55rem; position: absolute; left: 0; z-index: 3; padding: .55rem .74rem; border: 1px solid #575d61; text-decoration: none; font: 700 .78rem/1.4 var(--font); background: #121416; color: #fff; }
.minute-shortcut:is(:hover,:focus-visible) { border-color: #ff6269; }
.minute-shortcut::before { width: 6px; height: 6px; }
.minute-list { list-style: none; margin: 0; padding: 0 .9rem 0 1.25rem; max-height: 37rem; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-color: #b7bdbe #f4f5f4; scrollbar-width: thin; background: #fafaf8; }
.minute-list li { position: relative; display: grid; align-content: start; gap: .36rem; padding: .85rem .15rem .85rem 1rem; border-left: 1px solid #d4b4b1; border-bottom: 1px solid var(--line); }
.minute-list li:last-child { border-bottom: 0; }
.minute-list a:focus-visible { outline-offset: 1px; }
.minute-list li::before { content: ""; position: absolute; top: 1.15rem; left: -4px; width: 7px; height: 7px; border: 1.4px solid #bd3139; border-radius: 50%; background: #fff; }
.minute-list li:first-child::before { background: var(--flame); border-color: var(--flame); }
.minute-time { display: inline-flex; align-items: baseline; gap: .55rem; font: 700 .76rem/1.2 var(--mono); color: var(--red); }
.minute-time small { font: 500 .69rem/1.3 var(--mono); color: var(--muted); border-left: 1px solid #adbbba; padding-left: .55rem; }
.minute-list a { text-decoration: none; font: 680 clamp(1rem,1.42vw,1.17rem)/1.28 var(--font); letter-spacing: -.022em; }
.minute-list a:hover { color: var(--red); text-decoration: underline; }
.minute-update { display: block; border-top: 1px solid var(--line); background: var(--cream); padding: .55rem .9rem; margin: 0; font: .64rem/1.45 var(--mono); color: var(--muted); }
.minute-kick { display:block; border-top:3px solid var(--flame); padding:.65rem 1rem 0; background:var(--ink); color:#d0d7d8; font:700 .6rem/1.4 var(--mono); letter-spacing:.11em; text-transform:uppercase; }
.minute-empty { background:#fafaf8; margin:0; padding:1rem; font-size:.87rem; color:var(--muted); }
.section-link { font: 680 .84rem/1.45 var(--font); text-decoration: none; color: var(--red); }
.section-link:hover { text-decoration: underline; }
.section-link span { margin-left: .22rem; }
.cover-grid.no-rail { display: block; }
.no-rail > .lead { display: grid; align-items: center; grid-template-columns: 1.28fr 1fr; gap: var(--gap); }
.no-rail .story-copy { padding-top: 0; }
.empty-state { min-width: 0; margin-top: clamp(1.5rem,3vw,3rem); }
.empty-state h1, .listing-header h1 { font: 700 clamp(2.5rem,4.8vw,4.5rem)/1.035 var(--serif); letter-spacing: -.055em; margin: .55rem 0 .85rem; }
.empty-state > p { max-width: 38rem; font-size: 1.05rem; color: var(--muted); }
.home-main > .empty-state { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: clamp(295px,35vw,470px); background: var(--cream); padding: clamp(1.5rem,4.5vw,4.25rem) 56% clamp(1.5rem,4.5vw,4.25rem) clamp(1.5rem,4.5vw,4.25rem); margin-block: 2.1rem; border-top: 3px solid var(--ink); }
.home-main > .empty-state::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 52%; background: #ede7d6 url("assets/chihuahua.svg") 60% 50% / cover no-repeat; }
.home-main > .empty-state h1 { font-size: clamp(3rem,5.4vw,5.35rem); }
.home-main > .empty-state p { font: clamp(1.05rem,1.6vw,1.25rem)/1.5 var(--serif); margin: 0 0 1rem; }
.listing { margin-block: clamp(1.85rem,4vw,4rem); }
.listing-header { padding-bottom: 1.35rem; margin-bottom: 1.8rem; border-bottom: 2px solid var(--ink); }
.listing-header .archive-description { max-width: 46rem; color: var(--muted); }
.listing-header p { margin-bottom: 0; }
.pagination { margin: 2.75rem 0 1rem; padding-block: 1rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .35rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .35rem; }
.page-numbers { display: inline-grid; min-width: 2.3rem; height: 2.3rem; padding: 0 .65rem; place-content: center; font: 600 .82rem/1 var(--font); text-decoration: none; }
.page-numbers.current { background: var(--ink); color: white; }
a.page-numbers:hover { box-shadow: inset 0 0 0 1px var(--line); color: var(--red); }
.article-shell { margin-top: clamp(2rem,5vw,4.5rem); }
.article-head, .article-body, .article-tags, .comments-area { width: min(100%, 720px); margin-inline: auto; }
.article-head { width: min(100%, 880px); }
.article-title { font: 700 clamp(2.5rem,5.3vw,4.65rem)/1.035 var(--serif); letter-spacing: -.052em; margin: .55rem 0 1rem; overflow-wrap: anywhere; }
.article-deck { max-width: 67ch; margin: .9rem 0 1.4rem; font: clamp(1.12rem,1.8vw,1.32rem)/1.5 var(--font); color: #3f5159; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin-block: 1.2rem 1.8rem; padding-block: .85rem; border-block: 1px solid var(--line); }
.byline span:first-child a { font-weight: 700; color: var(--ink); text-decoration: none; }
.byline span + span { border-left: 1px solid var(--line); padding-left: .75rem; }
.article-figure { width: min(100%, 1000px); margin: 1.3rem auto clamp(1.5rem,3.2vw,3rem); }
.article-figure img { display: block; width: 100%; height: auto; }
.article-figure figcaption, .wp-caption-text, .article-body figcaption, .gallery-caption { color: var(--muted); font: .82rem/1.5 var(--font); margin-top: .5rem; }
.article-body { font: clamp(1.1rem,1.6vw,1.24rem)/1.72 var(--serif); }
.article-body::after { content: ""; display: table; clear: both; }
.article-body p { margin: 0 0 1.25em; }
.article-body :where(h2,h3,h4) { line-height: 1.18; letter-spacing: -.035em; margin: 1.55em 0 .6em; }
.article-body h2 { font-size: 1.6em; }
.article-body h3 { font-size: 1.33em; }
.article-body a:not(.wp-element-button) { color: var(--red); }
.article-body figure { max-width: 100%; }
.article-body iframe, .article-body video, .article-body audio, .article-body embed { max-width: 100%; }
.article-body pre { overflow-x: auto; padding: 1rem; background: var(--cream); font-size: .86em; }
.article-body blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1em; border-left: 4px solid var(--flame); font-style: italic; font-size: 1.2em; }
.article-body blockquote > :last-child { margin-bottom: 0; }
.article-body table { border-collapse: collapse; max-width: 100%; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: .35rem .55rem; }
.article-body img { height: auto; }
.alignleft { float: left; margin: .3em 1em .8em 0; }
.alignright { float: right; margin: .3em 0 .8em 1em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.article-body .alignwide, .article-body .alignfull { max-width: none; width: min(calc(100vw - 2 * var(--gutter)), 980px); position: relative; left: 50%; transform: translateX(-50%); margin-inline: 0; }
.article-tags { margin-top: 1.75rem; font-size: .84rem; color: var(--muted); }
.comments-area { margin-top: 3rem; }
.comments-area :is(h2,h3) { font-family: var(--serif); }
.comment-respond { border-top: 1px solid var(--line); padding-top: .8rem; }
.comment-form label { font-weight: 650; font-size: .9rem; }
.comment-form textarea, .comment-form input:not([type=checkbox],[type=submit]) { width: 100%; padding: .65rem; border: 1px solid #a8b2b4; border-radius: 0; }
.comment-list .children { padding-inline-start: 1.2rem; }

@media (max-width: 850px) {
  .ec-home-grid { grid-template-columns: minmax(0,1.75fr) minmax(205px,1fr); }
  .ec-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ec-lead .story-title { font-size: clamp(2.1rem,4.6vw,2.7rem); }
  .minute-list li { padding-block: .8rem; }
}
@media (max-width: 650px) {
  :root { --gutter: clamp(1rem,4.25vw,1.6rem); --gap: 1.3rem; }
  .masthead-inner { padding-block: .85rem; }
  .brand-group { width: 100%; }
  .brand-group img { width: min(100%, 520px); }
  .utility-inner { font-size: .57rem; letter-spacing: .02em; min-height: 27px; }
  .utility-inner span { gap: .32rem; }
  .search-panel { bottom: -38px; }
  .minute-shortcut { top:auto; bottom:-38px; left:50%; transform:translateX(-50%); height:38px; border:0; padding:.45rem .4rem; white-space:nowrap; background:transparent; font-size:.73rem; }
  .minute-list { max-height:none; overflow:visible; }
  .search-panel summary { border: 0; background: transparent; padding: .54rem .4rem; }
  .search-panel summary span { display: none; }
  .primary-nav { display: none; }
  .mobile-nav { display: block; }
  .nav-toggle { width:max-content; display: flex; align-items: center; gap: .55rem; padding-block: .7rem; font: 700 .8rem/1.3 var(--font); }
  .nav-toggle span { display: inline-block; font-size: 1rem; line-height: 1; }
  .mobile-nav[open] .nav-toggle { border-bottom: 1px solid #49606b; }
  .mobile-nav .nav-list { gap: 0 .9rem; padding-block: .35rem; }
  .mobile-nav .nav-list a { font-size: .84rem; padding-block: .7rem; }
  .cover-grid, .no-rail > .lead { display: block; }
  .no-rail .story-copy { padding-top: .9rem; }
  .ec-lead .story-title { font-size: clamp(2.05rem,7.8vw,2.65rem); }
  .story-excerpt { font-size: .99rem; line-height: 1.48; }
  .ec-rail { margin-top: 1.8rem; padding: 0; border: 0; }
  .minute-list li { grid-template-columns: 3.75rem minmax(0,1fr); align-items: start; gap: .65rem; padding-block: .9rem; }
  .minute-time { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .minute-time small { padding: 0; border: 0; font-size: .64rem; }
  .minute-list a { font-size: 1.025rem; }
  .section-head { margin-bottom: .95rem; }
  .cover-heading { margin-bottom: .65rem; }
  .ec-cards { grid-template-columns: 1fr; gap: 0; }
  .ec-cards .ec-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); align-items: start; gap: .9rem; border-bottom: 1px solid var(--line); padding-block: 1rem; }
  .ec-cards .ec-card:first-child { padding-top: .3rem; }
  .ec-card .story-media img { aspect-ratio: 4 / 3; }
  .ec-card .story-copy { padding: 0; }
  .ec-card .story-title { font-size: clamp(1.12rem,4.25vw,1.52rem); margin: .2rem 0 .35rem; }
  .ec-card .ec-meta { font-size: .63rem; }
  .ec-kicker { font-size: .61rem; }
  .home-main > .empty-state { display: flex; min-height: 0; padding: 1.5rem; margin: 1.35rem 0; }
  .home-main > .empty-state::after { position: static; display: block; height: auto; aspect-ratio: 1.87; width: calc(100% + 3rem); margin: 1rem -1.5rem -1.5rem; }
  .footer-inner { flex-wrap: wrap; gap: 1.3rem; align-items: center; }
  .footer-brand img { width: min(250px,75vw); }
  .footer-meta { font-size: .64rem; }
  .story-title a { overflow-wrap: break-word; }
}
@media (max-width: 350px) {
  .utility-inner { flex-wrap: wrap; }
  .minute-list li { grid-template-columns: 3rem minmax(0,1fr); }
  .ec-cards .ec-card { gap: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .story-media img { transition: none; }
  .story-media:hover img { transform: none; }
}
@media print {
  .utility, .header-action, .minute-shortcut, .nav-band, .ec-ad, .related, .site-footer, .comments-area { display: none; }
  body, .article-body, .article-head { color: #111; width: 100%; }
  .ec-wrap { width: 100%; }
  .article-title { font-size: 28pt; }
  .article-body { font-size: 12pt; }
  .article-body a { color: inherit; }
}
