/*
Theme Name: El Pescardo
Theme URI: https://elpescardogt.com
Author: El Pescardo GT
Description: Tema propio de El Pescardo GT. Estilo tabloide deportivo: fondo papel, tinta negra y acento celeste. Muestra tablas, resultados y goleadores; se complementa con el plugin Pescardo Studio.
Version: 1.2.2
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: pescardo
*/

:root {
	--paper: #F4F1EA;
	--paper-2: #ECE7DC;
	--white: #FFFFFF;
	--ink: #141414;
	--ink-2: #3A3732;
	--muted: #5A554B;
	--rule: #C9C3B5;
	--sky: #7EC3EC;
	--sky-ink: #1F5F99;
	--grey: #8A847A;
	--f-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
	--f-cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--f-body: 'Source Serif 4', Georgia, serif;
	--max: 1280px;
	--gut: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 18px; line-height: 1.55; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover, a:focus-visible { color: var(--sky-ink); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--sky-ink); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: var(--ink); color: var(--paper); padding: 10px 16px; font-family: var(--f-cond); font-weight: 700; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- Ticker ---------- */
.ticker { background: var(--ink); color: var(--paper); font-family: var(--f-cond); font-size: 16px; text-transform: uppercase; letter-spacing: .03em; }
.ticker .wrap { display: flex; align-items: stretch; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.ticker .wrap::-webkit-scrollbar { display: none; }
.ticker__label { background: var(--sky); color: var(--ink); font-weight: 700; padding: 10px 14px; flex-shrink: 0; }
.ticker__item { display: flex; gap: 8px; padding: 10px 16px; border-right: 1px solid #3A3A3A; }
.ticker__item strong { color: #FFF; font-weight: 700; }

/* ---------- Masthead ---------- */
.masthead { padding-top: 24px; }
.masthead__bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-bottom: 6px solid var(--ink); padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 84px; height: 84px; object-fit: contain; }
.brand__name { font-family: var(--f-display); font-size: 72px; line-height: .9; text-transform: uppercase; letter-spacing: -.01em; }
.brand__name span { color: var(--sky-ink); }
.masthead__meta { font-family: var(--f-cond); font-size: 17px; text-transform: uppercase; letter-spacing: .05em; text-align: right; line-height: 1.3; }

.nav { border-bottom: 1px solid var(--ink); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.nav a { display: inline-block; padding: 12px 0; font-family: var(--f-cond); font-weight: 700; font-size: 20px; text-transform: uppercase; }
.nav .current-menu-item > a, .nav .current-cat > a { box-shadow: inset 0 -4px 0 var(--sky); }
.nav .menu-item { position: relative; }
.nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 0; height: 0; margin-left: 7px; vertical-align: middle; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; }
.nav .sub-menu { display: none; position: absolute; top: 100%; left: -14px; z-index: 50; min-width: 250px; flex-direction: column; gap: 0; padding: 6px 0; background: var(--paper); border: 3px solid var(--ink); box-shadow: 6px 6px 0 rgba(20, 20, 20, .12); }
.nav .menu-item:hover > .sub-menu, .nav .menu-item:focus-within > .sub-menu { display: flex; }
.nav .sub-menu a { display: block; padding: 9px 16px; font-size: 18px; white-space: nowrap; }
.nav .sub-menu a:hover { background: var(--white); }


/* ---------- Type helpers ---------- */
.kicker { font-family: var(--f-cond); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--sky-ink); }
.h-display { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; line-height: 1; margin: 0; }
.section-title { font-family: var(--f-display); font-weight: 400; font-size: 32px; text-transform: uppercase; border-bottom: 4px solid var(--ink); padding-bottom: 6px; margin: 0 0 8px; line-height: 1.1; }
.more-link { display: inline-block; margin-top: 12px; font-family: var(--f-cond); font-weight: 700; text-transform: uppercase; color: var(--sky-ink); }
.meta { font-family: var(--f-cond); font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* ---------- Agenda ---------- */
.agenda { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 32px; }
.agenda__title { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 28px; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; border-left: 4px solid var(--ink); padding-left: 8px; }
.agenda__list { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.agenda__item { flex: 0 0 210px; scroll-snap-align: start; background: var(--white); border: 3px solid var(--ink); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-family: var(--f-cond); }
.agenda__item.is-today { background: var(--sky); }
a.agenda__item:hover { color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.agenda__when { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.agenda__teams { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; font-weight: 600; font-size: 17px; line-height: 1.25; }
.agenda__teams span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda__teams strong { font-family: var(--f-display); font-weight: 400; font-size: 19px; }
.agenda__comp { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.agenda__item:not(.is-today) .agenda__comp { color: var(--muted); }

/* ---------- Layout ---------- */
main { padding: 32px 0 16px; }
.grid-lead { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.band { margin-top: 48px; }
.band--rule { border-top: 6px solid var(--ink); padding-top: 20px; }

/* ---------- Cards ---------- */
.lead { display: flex; flex-direction: column; gap: 14px; }
.lead__media img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border: 4px solid var(--ink); }
.lead__title { font-size: 60px; }
.lead__excerpt { margin: 0; font-size: 20px; max-width: 62ch; }

.card { display: flex; flex-direction: column; gap: 10px; }
.card__media img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border: 3px solid var(--ink); }
.card__title { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.05; text-transform: uppercase; margin: 0; }

/* Tarjeta tipográfica cuando la nota no tiene imagen */
.slate { aspect-ratio: 1200 / 630; border: 3px solid var(--ink); background: var(--white); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 16px; text-align: center; position: relative; overflow: hidden; }
.slate__top { font-family: var(--f-cond); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.slate__main { font-family: var(--f-display); font-size: 34px; line-height: 1; text-transform: uppercase; }
.slate--lead { border-width: 4px; }
.slate--lead .slate__main { font-size: 72px; }
.slate--lead .slate__top { font-size: 16px; }
.slate__tag { position: absolute; top: 0; left: 0; background: var(--ink); color: var(--paper); font-family: var(--f-cond); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-family: var(--f-cond); font-size: 18px; }
.tbl th { text-align: left; font-size: 14px; font-weight: 600; text-transform: uppercase; color: var(--muted); padding: 6px 4px; }
.tbl td { border-top: 1px solid var(--rule); padding: 7px 4px; }
.tbl .n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .pos { width: 30px; font-weight: 700; }
.tbl .team { font-weight: 600; }
.tbl .pts { font-weight: 700; }
.tbl tr.is-zone td { background: rgba(126, 195, 236, .18); }
.tbl caption { text-align: left; }
.tbl--full td, .tbl--full th { padding: 9px 6px; }
.tbl-scroll { overflow-x: auto; }

.list-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 10px 0; border-top: 1px solid var(--rule); font-family: var(--f-cond); font-size: 18px; }
.list-row--stack { grid-template-columns: 1fr; }
.list-row__main { font-weight: 700; }
.list-row__sub { color: var(--muted); }
.list-row__num { font-family: var(--f-display); font-size: 24px; grid-row: span 2; align-self: center; }
.fixture { display: grid; grid-template-columns: 116px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); font-family: var(--f-cond); font-size: 18px; }
.fixture__when { color: var(--muted); text-transform: uppercase; }
.fixture__teams { font-weight: 600; }
.result { display: grid; grid-template-columns: 1fr 70px 1fr; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--rule); font-family: var(--f-cond); font-size: 18px; font-weight: 600; }
.result__home { text-align: right; }
.result--wide { grid-template-columns: 1fr 112px 1fr; }
.result__score { text-align: center; font-family: var(--f-display); font-weight: 400; font-size: 22px; }
.group-label { font-family: var(--f-cond); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--sky-ink); padding: 8px 0 4px; }
.placeholder { font-family: var(--f-cond); font-size: 17px; color: var(--muted); border-top: 1px solid var(--rule); padding: 12px 0; }

/* ---------- Single ---------- */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
.article__head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.article__title { font-size: 56px; }
.article__media { margin: 0 0 24px; }
.article__media img { width: 100%; border: 4px solid var(--ink); }
.article__media figcaption { font-family: var(--f-cond); font-size: 15px; color: var(--muted); padding-top: 6px; }
.entry { font-size: 20px; line-height: 1.65; max-width: 68ch; }
.entry p, .entry li { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.entry p { margin: 0 0 1.1em; }
.entry h2, .entry h3 { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; line-height: 1.1; margin: 1.4em 0 .5em; }
.entry h2 { font-size: 34px; } .entry h3 { font-size: 26px; }
.entry a { color: var(--sky-ink); text-decoration: underline; text-underline-offset: 3px; }
.entry blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 6px solid var(--sky); font-style: italic; }
.entry ul, .entry ol { padding-left: 1.2em; }
.entry figure { margin: 1.4em 0; }
.entry iframe, .entry .wp-block-embed { max-width: 100%; }
.entry table { border-collapse: collapse; width: 100%; font-family: var(--f-cond); }
.entry table td, .entry table th { border-top: 1px solid var(--rule); padding: 8px; text-align: left; }
.source { font-family: var(--f-cond); font-size: 16px; border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 24px; color: var(--muted); }
.share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; align-items: center; }
.share span { font-family: var(--f-cond); font-weight: 700; text-transform: uppercase; margin-right: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 3px solid var(--ink); background: var(--white); font-family: var(--f-cond); font-weight: 700; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; color: var(--ink); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--sky-ink); border-color: var(--sky-ink); color: #FFF; }
.sidebar { display: flex; flex-direction: column; gap: 40px; }

.btn.nav-toggle { display: none; }

/* ---------- Archive ---------- */
.archive-head { border-bottom: 6px solid var(--ink); padding-bottom: 12px; margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.archive-head h1 { font-size: 64px; }
.archive-head p { margin: 6px 0 0; font-family: var(--f-cond); font-size: 18px; color: var(--muted); }
.pagination { margin-top: 40px; display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--f-cond); font-weight: 700; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 3px solid var(--ink); padding: 0 12px; background: var(--white); }
.pagination .current { background: var(--ink); color: var(--paper); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 3px solid var(--ink); font-family: var(--f-cond); font-weight: 700; text-transform: uppercase; background: var(--white); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* ---------- Club ---------- */
.club-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; border-bottom: 6px solid var(--ink); padding-bottom: 16px; margin-bottom: 28px; }
.club-hero h1 { font-size: 72px; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 3px solid var(--ink); background: var(--white); }
.stat { padding: 14px 16px; border-left: 1px solid var(--rule); }
.stat:first-child { border-left: 0; }
.stat__num { font-family: var(--f-display); font-size: 40px; line-height: 1; }
.stat__lbl { font-family: var(--f-cond); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.form-dots { display: flex; gap: 6px; }
.form-dots span { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-cond); font-weight: 700; font-size: 15px; border: 2px solid var(--ink); }
.form-dots .w { background: var(--ink); color: var(--paper); }
.form-dots .d { background: var(--paper-2); }
.form-dots .l { background: var(--white); color: var(--muted); border-color: var(--grey); }

/* ---------- Empty / 404 ---------- */
.empty { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: center; padding: 40px 0; }
.empty img { width: 260px; }
.search-form { display: flex; gap: 8px; margin-top: 16px; max-width: 520px; }
.search-form label { flex-grow: 1; }
.search-form input[type="search"] { width: 100%; min-height: 48px; border: 3px solid var(--ink); padding: 0 14px; font: inherit; font-family: var(--f-cond); font-size: 18px; background: var(--white); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); margin-top: 56px; border-top: 6px solid var(--ink); }
.footer .wrap { padding-top: 32px; padding-bottom: 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; align-items: end; }
.footer__brand { display: flex; align-items: flex-end; gap: 16px; }
.footer__brand img { width: 130px; }
.footer__name { font-family: var(--f-display); font-size: 36px; text-transform: uppercase; line-height: 1; }
.footer__tag { font-family: var(--f-cond); font-size: 17px; color: var(--rule); margin-top: 6px; }
.footer a { color: var(--paper); }
.footer a:hover { color: var(--sky); }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--f-cond); }
.footer__social a { font-weight: 700; font-size: 18px; text-transform: uppercase; }
.footer__legal a { font-size: 16px; color: var(--rule); }
.footer__copy { grid-column: 1 / -1; font-family: var(--f-cond); font-size: 14px; color: var(--grey); border-top: 1px solid #333; padding-top: 16px; }

/* ---------- WP core ---------- */
.alignleft { float: left; margin: 0 1em 1em 0; } .alignright { float: right; margin: 0 0 1em 1em; } .aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, .wp-element-caption { font-family: var(--f-cond); font-size: 15px; color: var(--muted); }
.sticky, .bypostauthor, .gallery-caption { }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.article { grid-template-columns: 1fr; }
	.sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.grid-lead, .grid-2 { grid-template-columns: 1fr; }
	.brand__name { font-size: 52px; }
	.brand img { width: 64px; height: 64px; }
	.lead__title { font-size: 42px; }
	.article__title { font-size: 40px; }
	.footer .wrap { grid-template-columns: 1fr; align-items: start; }
	.stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stat:nth-child(3) { border-left: 0; }
	.stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
	:root { --gut: 16px; }
	body { font-size: 17px; }
	.masthead { padding-top: 14px; }
	.masthead__meta { display: none; }
	.masthead__bar { flex-wrap: nowrap; gap: 12px; }
	.brand { gap: 8px; min-width: 0; }
	.brand__name { font-size: 34px; white-space: nowrap; }
	.brand img { width: 46px; height: 46px; }
	.card { display: grid; grid-template-columns: 128px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: start; }
	.card__media { grid-row: 1 / span 2; }
	.card .slate { padding: 6px; }
	.card .slate__top { display: none; }
	.card .slate__main { font-size: 15px; }
	.card__title { font-size: 20px; }
	.grid-4 { gap: 20px; }
	.btn.nav-toggle { display: inline-flex; margin-left: auto; }
	.nav ul { display: none; flex-direction: column; gap: 0; }
	.nav.is-open ul { display: flex; }
	.nav ul a { display: block; padding: 12px 0; border-top: 1px solid var(--rule); min-height: 44px; }
	.nav.is-open .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 18px; background: transparent; min-width: 0; }
	.nav .sub-menu a { padding: 10px 0; font-size: 17px; white-space: normal; }
	.nav .menu-item-has-children > a::after { display: none; }
	.grid-4, .grid-3, .sidebar { grid-template-columns: 1fr; }
	.lead__title { font-size: 34px; }
	.slate--lead .slate__main { font-size: 44px; }
	.article__title { font-size: 34px; }
	.entry { font-size: 18px; }
	.archive-head h1, .club-hero h1 { font-size: 44px; }
	.club-hero { grid-template-columns: 1fr; }
	.empty { grid-template-columns: 1fr; }
	.empty img { width: 180px; }
	.fixture { grid-template-columns: 96px 1fr; }
	.section-title { font-size: 28px; }
	.agenda { grid-template-columns: 1fr; gap: 8px; }
	.agenda__title { writing-mode: horizontal-tb; transform: none; border-left: 0; padding-left: 0; font-size: 24px; text-align: left; }
	.agenda__item { flex-basis: 190px; }
}
