/*
Theme Name: Líneas del Metro
Theme URI: https://lineasdelmetro.com.mx/
Description: Tema a la medida para lineasdelmetro.com.mx. Plantillas de inicio, ciudad, línea, estación, tarifas y noticias para el Metro CDMX, el Metrorrey y el Tren Ligero de Guadalajara. Los datos de cada línea y estación se editan en campos dentro de cada página.
Version: 1.0.6
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: lineas-del-metro
License: GPL-2.0-or-later
*/

/* ---------- Tokens ---------- */
:root {
	--ink: #12202F;
	--ink-2: #33424F;
	--muted: #4B5B6B;
	--ground: #F4F6F8;
	--card: #FFFFFF;
	--line-soft: #E3E8EE;
	--rule: #EEF1F4;
	--placeholder: #E6EBF0;
	--night-2: #1D3249;
	--night-text: #C9D3DD;
	--brand: #C2410C;
	--brand-soft: #FBEDE5;
	--yellow: #FFC845;
	--notice: #FFF4D6;
	--green: #0A7C66;
	--green-soft: #E3F3EF;
	--blue: #1F5FA8;
	--blue-soft: #E4EEF9;
	--amber-soft: #FFF1D6;
	--amber: #B45309;
	--display: 'Bricolage Grotesque', Georgia, serif;
	--body: 'Figtree', Arial, sans-serif;
	--gutter: 32px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); background: var(--ground); color: var(--ink); line-height: 1.5; font-size: 16px; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 800; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; }
.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; background: #fff; padding: 10px 14px; border-radius: 10px; width: auto; height: auto; clip: auto; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.container { max-width: 1164px; margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: 64px; }
.section:last-of-type { padding-bottom: 72px; }
.section-title { font-size: 32px; }
.section-lead { margin: 6px 0 24px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.xsmall { font-size: 13px; }

/* ---------- Header ---------- */
.site-header { background: #F3F5F8; color: var(--ink); border-bottom: 1px solid #E1E6EC; }
.header-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; }
.brand img { max-height: 46px; width: auto; }
.brand-mark { width: 44px; height: 44px; border-radius: 13px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 21px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 20px; }
.brand-tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9A3412; margin-top: 3px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nav-link, .nav-list--custom a { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1px solid #D9E0E7; color: var(--ink); font-weight: 600; font-size: 15px; box-shadow: 0 1px 2px rgba(18, 32, 47, .05); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.nav-link:hover, .nav-list--custom a:hover { border-color: #AEB9C5; box-shadow: 0 3px 10px rgba(18, 32, 47, .08); }
.nav-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); flex: none; }
.nav-item.is-current .nav-link { background: var(--ink); border-color: var(--ink); color: #fff; }
.nav-item--city.is-current .nav-link { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-item--city.is-current .nav-dot { background: #fff; }
.nav-list--custom .current-menu-item > a, .nav-list--custom .current-menu-ancestor > a { background: var(--ink); border-color: var(--ink); color: #fff; }
.line-stripe { height: 5px; }

@media (max-width: 760px) {
	.header-bar { padding-top: 14px; padding-bottom: 14px; }
	.primary-nav { width: 100%; }
	.nav-list { gap: 6px; }
	.nav-link, .nav-list--custom a { min-height: 40px; padding: 0 13px; font-size: 14px; }
	.brand-name { font-size: 18px; }
	.brand-mark { width: 40px; height: 40px; font-size: 19px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #fff; padding: 64px 0 96px; }
.hero--line { background: var(--line); color: var(--line-fg); padding-bottom: 64px; }
.hero--flat { padding-bottom: 64px; }
.eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero .eyebrow { color: var(--yellow); }
.hero--line .eyebrow, .hero .breadcrumbs { color: inherit; }
.hero .breadcrumbs { color: var(--night-text); }
.hero--line .breadcrumbs { color: var(--line-fg); }
.hero h1 { font-size: 56px; line-height: 1.05; max-width: 800px; }
.hero-lead { margin-top: 18px; font-size: 19px; max-width: 660px; color: var(--night-text); }
.hero--line .hero-lead { color: inherit; }
.hero-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.hero-badge { width: 84px; height: 84px; border-radius: 50%; font-family: var(--display); font-weight: 800; font-size: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--line-fg); color: var(--line); }
.pill-status { display: inline-block; margin-top: 18px; background: var(--yellow); color: var(--ink); font-size: 14px; font-weight: 700; border-radius: 999px; padding: 6px 14px; }
.tiles { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tile { background: var(--night-2); border-radius: 14px; padding: 18px 20px; color: #fff; display: block; }
.tile-label { font-size: 13px; color: var(--night-text); }
.tile-value { font-family: var(--display); font-size: 26px; font-weight: 800; }
.tile--accent { background: var(--yellow); color: var(--ink); }
.tile--accent .tile-label { color: var(--ink); }
.hero--line .tile { background: rgba(255, 255, 255, .16); color: inherit; }
.hero--line.is-light .tile { background: rgba(255, 255, 255, .38); }
.hero--line .tile-label { color: inherit; }

.search-form { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 640px; }
.search-form input[type=search] { flex: 1 1 300px; min-height: 52px; padding: 14px 18px; border: 0; border-radius: 14px; font: inherit; font-size: 17px; color: var(--ink); background: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0; font-weight: 700; cursor: pointer; text-decoration: none !important; }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid #BCC6D0; }

/* ---------- Cards ---------- */
.panel { background: #fff; border-radius: 20px; padding: 36px; box-shadow: 0 8px 30px rgba(18, 32, 47, .08); }
.panel--overlap { margin-top: -48px; position: relative; }
.card { background: #fff; border: 1px solid var(--line-soft); border-radius: 22px; padding: 28px; box-shadow: 0 6px 24px rgba(18, 32, 47, .06); }
.card--plain { border: 0; box-shadow: none; border-radius: 20px; }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.card-head h2, .card-head h3 { font-size: 23px; }
.icon-box { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--ground); color: var(--ink); }
.icon-box svg { width: 24px; height: 24px; }
.icon-box--brand { background: var(--brand-soft); color: var(--brand); }
.icon-box--amber { background: var(--amber-soft); color: var(--amber); }
.icon-box--green { background: var(--green-soft); color: var(--green); }
.icon-box--blue { background: var(--blue-soft); color: var(--blue); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.grid-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }

.info-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 12px; background: var(--ground); border-radius: 14px; padding: 16px 18px; margin-bottom: 10px; }
.info-row--accent { background: var(--soft, var(--brand-soft)); }
.info-row strong { font-weight: 700; }
.info-row .big { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--accent, var(--brand)); }
.info-row .bigger { font-family: var(--display); font-size: 30px; font-weight: 800; color: var(--accent, var(--brand)); }
.kv { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.kv:last-child { border-bottom: 0; }
.price { font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--accent, var(--brand)); }
.notice { background: var(--notice); border-radius: 16px; padding: 16px 18px; font-size: 15px; }
.link-more { display: inline-block; margin-top: 16px; font-weight: 700; color: var(--accent, var(--brand)); }
.placeholder { border-radius: 12px; background: var(--placeholder); display: flex; align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 16px; min-height: 220px; }
.media-frame { background: #fff; border-radius: 20px; padding: 18px; }
.media-frame img { border-radius: 12px; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 4px 4px; }

/* ---------- Line chips & cards ---------- */
.line-badge { width: 44px; height: 44px; border-radius: 12px; background: var(--line); color: var(--line-fg); font-family: var(--display); font-weight: 800; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.line-badge--round { border-radius: 50%; width: 48px; height: 48px; font-size: 22px; }
.line-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: #fff; }
.line-link .route { display: block; font-weight: 700; }
.line-link .meta { display: block; font-size: 14px; color: var(--muted); }
.line-link .arrow { font-weight: 700; color: var(--brand); margin-left: auto; }
.line-card { display: block; background: #fff; border-radius: 18px; padding: 20px; border-top: 6px solid var(--line); box-shadow: 0 4px 16px rgba(18, 32, 47, .05); }
.line-card .head { display: flex; align-items: center; gap: 14px; }
.line-card .name { display: block; font-weight: 700; font-size: 18px; }
.line-card .route { margin-top: 14px; font-weight: 500; }
.line-card .cta { margin-top: 12px; font-weight: 700; color: var(--accent, var(--brand)); }
.mini-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.mini-badge { width: 52px; height: 52px; border-radius: 50%; background: var(--line); color: var(--line-fg); font-family: var(--display); font-weight: 800; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.xfer { width: 30px; height: 30px; border-radius: 50%; background: var(--line); color: var(--line-fg); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; background: var(--ground); border-radius: 14px; padding: 6px; }
.tabs--white { background: #fff; }
.tab { min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; background: transparent; color: var(--ink); display: inline-flex; align-items: center; }
.tab[aria-selected=true], .tab[aria-pressed=true], .tab.is-active { background: var(--ink); color: #fff; text-decoration: none; }
.tabs-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
[hidden] { display: none !important; }

/* ---------- Route (line diagram) ---------- */
.split { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.split-main { flex: 999 1 560px; min-width: 0; }
.split-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.route-box { background: #fff; border-radius: 20px; padding: 12px 24px; }
.stop { display: flex; align-items: stretch; gap: 18px; min-height: 56px; }
.stop-rail { width: 20px; flex: none; display: flex; flex-direction: column; align-items: center; }
.stop-rail::before, .stop-rail::after { content: ""; width: 6px; flex: 1; background: var(--line); }
.stop:first-child .stop-rail::before, .stop:last-child .stop-rail::after { background: transparent; }
.stop-rail.cap-top::before, .stop-rail.cap-bottom::after { background: transparent; }
.stop-dot { width: 20px; height: 20px; border-radius: 50%; border: 5px solid var(--line); background: #fff; flex: none; }
.stop-body { flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.stop-name { font-weight: 700; font-size: 17px; }
.stop-xfers { display: flex; gap: 6px; }
a.stop:hover .stop-name { text-decoration: underline; }
a.stop:hover { text-decoration: none; }
.stop.is-current .stop-dot { width: 26px; height: 26px; border-width: 7px; margin: 0 -3px; }
.stop.is-current .stop-name { font-weight: 800; font-size: 19px; }
.stop.is-neighbor .stop-name { font-weight: 500; font-size: 16px; color: var(--ink-2); }
.here { background: var(--yellow); color: var(--ink); font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 12px; }
.direction { font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 0 4px 38px; }

.line-panel { border: 2px solid var(--line); border-radius: 18px; overflow: hidden; }
.line-panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--line); color: var(--line-fg); padding: 14px 20px; }
.line-panel-head .t { font-family: var(--display); font-size: 21px; font-weight: 800; }
.line-panel-body { padding: 8px 20px 14px; }

/* ---------- Station extras ---------- */
.line-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--night-2); border-radius: 999px; padding: 6px 16px 6px 6px; font-weight: 700; color: #fff; }
.line-chip .xfer { width: 36px; height: 36px; font-size: 17px; font-family: var(--display); }
.access { display: flex; gap: 12px; align-items: flex-start; background: var(--ground); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.access .n { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.service { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.service .v { font-weight: 700; color: var(--muted); }
.service .v.yes { color: var(--green); }
.service .v.no { color: #9A3412; }
.nearby { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 6px 16px; border-bottom: 1px solid var(--rule); padding: 12px 0; }
.nearby .d { font-size: 14px; font-weight: 700; color: var(--blue); white-space: nowrap; }

/* ---------- Content (editor text) ---------- */
.entry { background: #fff; border-radius: 20px; padding: 32px; font-size: 17px; }
.entry > * + * { margin-top: 1em; }
.entry > :first-child { margin-top: 0; }
.entry h2 { font-size: 28px; margin-top: 1.4em; }
.entry h3 { font-size: 21px; margin-top: 1.2em; }
.entry a { color: var(--brand); text-decoration: underline; }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry img { border-radius: 12px; }

/* ---------- Calculator ---------- */
.calc { display: flex; flex-wrap: wrap; gap: 28px; align-items: stretch; }
.calc-controls { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.calc-result { flex: 1 1 280px; min-width: 0; background: var(--soft, var(--brand-soft)); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.calc-result .total { font-family: var(--display); font-size: 52px; font-weight: 800; line-height: 1.1; color: var(--accent, var(--brand)); margin-top: 4px; }
.sys-btn { min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; cursor: pointer; border: 1px solid #BCC6D0; background: #fff; color: var(--ink); }
.sys-btn[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid #BCC6D0; background: #fff; font-size: 22px; font-weight: 700; cursor: pointer; }
.stepper output { min-width: 48px; text-align: center; font-family: var(--display); font-size: 30px; font-weight: 800; }
.months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.month { border-radius: 12px; padding: 10px 12px; background: var(--green-soft); }
.month.past { background: var(--ground); color: var(--muted); }
.month.now { background: var(--green); color: #fff; }
.month .m { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.month .p { font-family: var(--display); font-size: 20px; font-weight: 800; }
.system-block { background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-soft); }
.system-block-head { background: var(--accent); color: #fff; padding: 22px 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.system-block-head h2 { font-size: 28px; }
.system-block-body { padding: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }

/* ---------- News ---------- */
.news-feature { display: flex; flex-wrap: wrap; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 8px 30px rgba(18, 32, 47, .08); }
.news-feature .img { flex: 1 1 420px; min-height: 280px; background: var(--placeholder); }
.news-feature .img img { width: 100%; height: 100%; object-fit: cover; }
.news-feature .txt { flex: 1 1 380px; min-width: 0; padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.news-feature h2 { font-size: 32px; line-height: 1.15; margin-top: 14px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.news-card { background: #fff; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.news-card .img { height: 170px; background: var(--placeholder); }
.news-card .img img { width: 100%; height: 100%; object-fit: cover; }
.news-card .txt { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card .t { font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1.2; }
.news-card .date { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--muted); }
.tag { align-self: flex-start; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 12px; background: var(--ground); color: var(--ink); }
.tag--cdmx { background: var(--brand-soft); color: #9A3412; }
.tag--monterrey { background: var(--green-soft); color: #0A6B58; }
.tag--guadalajara { background: var(--blue-soft); color: var(--blue); }
.tag--yellow { background: var(--yellow); }
.pagination { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; font-weight: 700; padding: 0 12px; }
.pagination .current { background: var(--ink); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--night-text); padding: 32px 0; text-align: center; font-size: 14px; }
.site-footer nav ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
	:root { --gutter: 16px; }
	.hero { padding: 44px 0 80px; }
	.hero h1 { font-size: 38px; }
	.hero-badge { width: 64px; height: 64px; font-size: 32px; }
	.hero-lead { font-size: 17px; }
	.panel, .card, .entry { padding: 22px; }
	.section { padding-top: 48px; }
	.section-title { font-size: 26px; }
	.route-box { padding: 8px 16px; }
	.calc-result .total { font-size: 40px; }
	.news-feature h2 { font-size: 26px; }
	.system-block-body { padding: 20px; }
}
