/* mbus.mx — brand from the store graphics: red #C8102E → #A10C27, coral CTA #FF7264,
   Poppins headings, Roboto text; line colours come from the network DB. */
:root {
  --red: #c8102e; --red-dark: #a10c27; --coral: #ff7264; --coral-dark: #f5604f;
  --ink: #1c1c1e; --text: #3a3a3e; --muted: #75757b; --line: #e8e8ea; --bg: #f5f5f6; --card: #fff;
  --radius: 16px; --shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 24px rgba(0,0,0,.05);
  --head: 'Poppins', 'Roboto', system-ui, sans-serif; --body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f1f1f5; --text: #d5d5da; --muted: #9a9aa0; --line: #33333a; --bg: #161618; --card: #232326; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--body); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--red); text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { a { color: #ff8a80; } }
h1, h2, h3 { font-family: var(--head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* header */
/* The app's toolbar (bg_toolbar): a near-white bar closed by a hairline, full-colour logo. */
.top { background: #f5f5f6; border-bottom: 1px solid #e3e3e6; position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
@media (prefers-color-scheme: dark) { .top { background: #232326; border-bottom-color: #33333a; } }
.top__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand img { display: block; height: 36px; width: auto; }
.top__nav { display: flex; gap: 20px; flex: 1; }
.top__nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.top__nav a:hover { color: var(--red); }
@media (max-width: 760px) { .top__nav { display: none; } .top__in { justify-content: space-between; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; text-decoration: none; padding: 12px 22px; }
.btn--sm { padding: 8px 16px; font-size: .9rem; }
.btn--light { background: #fff; color: var(--red) !important; }
.btn--cta { background: var(--coral); color: #fff !important; }
.btn--cta:hover { background: var(--coral-dark); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0; }
.store { display: inline-flex; align-items: center; gap: 10px; background: #111; color: #fff !important; text-decoration: none; border-radius: 12px; padding: 8px 16px 8px 12px; min-height: 52px; border: 1px solid rgba(255,255,255,.25); }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.store small { font-weight: 400; font-size: .68rem; opacity: .85; }
.store--web { background: var(--coral); border-color: transparent; }
.store:hover { transform: translateY(-1px); }

/* hero */
.hero { background: linear-gradient(160deg, var(--red) 0%, var(--red) 55%, var(--red-dark) 100%); color: #fff; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; padding: 56px 16px 0; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); }
.hero .lead { font-size: 1.15rem; opacity: .95; max-width: 34em; }
.stats { display: flex; gap: 28px; list-style: none; padding: 0; margin: 8px 0 40px; }
.stats strong { display: block; font: 700 1.9rem/1 var(--head); }
.stats li { opacity: .95; }
.hero__phones { display: flex; gap: 16px; justify-content: center; align-self: end; }
.hero__phones img { width: 46%; max-width: 270px; border-radius: 28px 28px 0 0; box-shadow: 0 -8px 40px rgba(0,0,0,.3); }
.hero__phones img:last-child { margin-top: 60px; }
@media (max-width: 860px) { .hero__in { grid-template-columns: 1fr; padding-top: 36px; } .hero__phones img { width: 42%; } }

/* sections */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: -1px; padding-top: 40px; padding-bottom: 24px; }
.features article { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.features h2 { color: var(--red); }
.section-title { font-size: 1.6rem; margin: 32px 0 16px; }
.cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.city { background: var(--card); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); border: 1px solid transparent; }
.city:hover { border-color: var(--coral); }
.city h3 { color: var(--ink); margin-bottom: 4px; }
.city p { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.city__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.shots { margin: 40px auto; }
.shots__row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.shots__row img { width: 216px; flex: none; border-radius: 18px; scroll-snap-align: start; box-shadow: var(--shadow); }

/* inner pages */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 14px 16px 0; margin: 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: '›'; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; gap: 18px; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head h1 span { display: block; font: 500 1rem var(--body); color: var(--muted); margin-top: 4px; }
.page-head .lead { color: var(--muted); margin: 6px 0 0; }
.page-head .lead p { margin: .4em 0 0; }
.page-head--sys { border-left: 6px solid var(--c); padding-left: 16px; margin-top: 12px; }
.picto { border-radius: 16px 16px 16px 0; flex: none; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; padding-bottom: 40px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.systems { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding-bottom: 16px; }
.system { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); border-left: 5px solid var(--c); }
.system h2 { margin: 0; font-size: 1.1rem; }
.system p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.sysmark { border-radius: 10px; flex: none; object-fit: contain; }
.sysmark--dot { display: inline-block; width: 28px; height: 28px; background: var(--bg); border-radius: 50%; }

/* lines */
.badge { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; background: var(--bg); color: var(--fg); background: var(--bg, #999); font: 700 .95rem/1 var(--body); flex: none; vertical-align: middle; }
.badge { background: var(--bg); }
.badge[style] { background: var(--bg); }
.badge--sm { min-width: 22px; height: 22px; border-radius: 6px; font-size: .72rem; padding: 0 4px; }
.badge--lg { min-width: 64px; height: 64px; border-radius: 16px; font-size: 1.6rem; }
.lines { list-style: none; padding: 0; margin: 0; }
.lines li a { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.lines li:last-child a { border-bottom: 0; }
.lines strong { display: block; color: var(--ink); }
.lines small { color: var(--muted); }
.lines--compact li a { padding: 6px 0; }
.az { columns: 3 180px; gap: 18px; list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.az li { break-inside: avoid; padding: 3px 0; }
.thread { list-style: none; margin: 0; padding: 0; position: relative; }
.thread::before { content: ''; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 4px; background: var(--c); border-radius: 2px; }
.thread li { position: relative; display: flex; align-items: center; gap: 14px; padding: 7px 0; }
.thread img { width: 40px; height: 40px; border-radius: 10px 10px 10px 0; position: relative; background: var(--card); }
.thread .dot { width: 18px; height: 18px; margin: 0 11px; border-radius: 50%; background: var(--card); border: 4px solid var(--c); position: relative; }
.thread__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.thread__name a { color: var(--ink); font-weight: 500; text-decoration: none; }
.thread__name a:hover { text-decoration: underline; }
.thread__tr { display: inline-flex; gap: 4px; align-items: center; }
.thread__tr .sysmark { width: 20px; height: 20px; border-radius: 5px; }

/* station */
.neighbours, .transfers, .venues { list-style: none; padding: 0; margin: 0; }
.neighbours li { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.neighbours li:last-child { border-bottom: 0; }
.neighbours__line { font-weight: 500; }
.neighbours__seq { text-align: right; color: var(--muted); }
@media (max-width: 560px) { .neighbours li { grid-template-columns: auto 1fr; } .neighbours__seq { grid-column: 1 / -1; text-align: left; } }
.transfers li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.venues { columns: 2 200px; }
.venues li { padding: 3px 0; break-inside: avoid; }
.venues li::before { content: '•'; color: var(--coral); margin-right: 8px; }

/* info + CTAs */
.hours { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.hours th, .hours td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-weight: 700; color: var(--ink); }
.fares { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 12px; }
.fare { background: var(--bg); border-radius: 12px; padding: 12px; }
.fare span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fare strong { display: block; font: 700 1.5rem/1.2 var(--head); color: var(--red); }
.fare small { color: var(--muted); }
.note { background: #fff1ef; color: #6b2a22; border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
@media (prefers-color-scheme: dark) { .note { background: #3a2220; color: #ffd6cf; } }
.note p:last-child { margin: 0; }
.links { font-size: .92rem; margin: 12px 0 0; }
.app-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--coral); color: #fff !important; text-decoration: none; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(255,114,100,.35); }
.app-cta:hover { background: var(--coral-dark); }
.app-cta strong { display: block; font: 600 1.02rem/1.3 var(--head); }
.app-cta small { opacity: .92; }
.app-cta svg { width: 22px; height: 22px; flex: none; }
.map-dl { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; font-weight: 500; text-decoration: none; }
.map-dl::before { content: '⬇ '; }

/* FAQ */
.faq { margin: 24px 0; }
.faq details { background: var(--card); border-radius: 12px; padding: 14px 18px; margin-bottom: 8px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq details p { margin: 10px 0 0; }

.legal { margin: 20px auto 40px; max-width: 820px; }

/* footer */
.foot { background: #1c1c1e; color: #c7c7cc; padding: 40px 0 24px; margin-top: 40px; font-size: .92rem; }
.foot a { color: #fff; }
.foot h2 { color: #fff; font-size: 1rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { padding: 3px 0; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__grid > :first-child { grid-column: 1 / -1; } }
.foot__legal { border-top: 1px solid #333; margin-top: 24px; padding-top: 16px; color: #8a8a90; font-size: .82rem; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

/* AdSense, line and station pages. min-height holds the space so the page does not shift (CLS)
   when the ad fills; an unfilled slot collapses completely. */
.ad { margin: 0 0 16px; min-height: 120px; }
.ad__label { display: block; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad:has(ins[data-ad-status='unfilled']) { display: none; }

/* Language switch in the header (Español ⇄ English) */
.top__lang { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .92rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.top__lang:hover { border-color: var(--coral); color: var(--red); }
.foot li small { color: #8a8a90; margin-left: 4px; }
@media (max-width: 760px) { .top__in { gap: 10px; } .brand img { height: 30px; } }
.btn { white-space: nowrap; }
@media (max-width: 420px) { .top__in .btn--sm { padding: 7px 12px; font-size: .85rem; } .top__lang { padding: 5px 8px; font-size: .85rem; } }
