/* ==========================================================================
   hoponhopoffbus.barcelona — independent visitor guide
   Editorial "field-guide" look: warm paper, deep ink, coral route accents
   ========================================================================== */
:root {
  --ink: #1b2a41;
  --ink-soft: #3d4d66;
  --paper: #fbf7f0;
  --paper-deep: #f3ecdf;
  --white: #ffffff;
  --coral: #e4572e;
  --coral-dark: #c74722;
  --amber: #f2a541;
  --amber-soft: #ffd9a0;
  --teal: #17a398;
  --teal-dark: #0e7d74;
  --line: #e2d9c8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(27, 42, 65, 0.10);
  --shadow-soft: 0 4px 14px rgba(27, 42, 65, 0.07);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--coral); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.18; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 1.9em; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); margin-top: 1.5em; }
p { margin: 0 0 1.1em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 300;
  background: rgba(251, 247, 240, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 40px; width: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 9px 11px; font-size: 0.92rem; font-weight: 600;
  color: var(--ink); text-decoration: none; border-radius: 8px; white-space: nowrap;
}
.main-nav a:hover { background: var(--paper-deep); color: var(--coral); }
.nav-drop { position: relative; }
.nav-drop > button {
  display: flex; align-items: center; gap: 5px; padding: 9px 11px; font-size: 0.92rem;
  font-weight: 600; color: var(--ink); background: none; border: 0; border-radius: 8px;
  cursor: pointer; font-family: var(--font-body); white-space: nowrap;
}
.nav-drop > button:hover { background: var(--paper-deep); color: var(--coral); }
.nav-drop > button::after { content: "▾"; font-size: 0.7em; opacity: 0.7; }
.drop-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px; display: none; z-index: 400;
}
.nav-drop.open .drop-menu { display: block; }
.drop-menu a { padding: 9px 12px; border-radius: 8px; font-weight: 500; white-space: normal; }

/* Language switcher */
.lang-switch { position: relative; }
.lang-switch > button {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--white); font-family: var(--font-body); font-size: 0.85rem;
  font-weight: 600; color: var(--ink); cursor: pointer;
}
.lang-switch > button::after { content: "▾"; font-size: 0.65em; opacity: 0.7; }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-height: 62vh; overflow: auto;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px; display: none; z-index: 400;
  columns: 2; column-gap: 4px;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu a {
  display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px;
  font-size: 0.88rem; color: var(--ink); text-decoration: none; break-inside: avoid;
}
.lang-menu a:hover { background: var(--paper-deep); }
.lang-menu a.active { background: var(--amber-soft); font-weight: 700; }
.lang-flag { font-size: 1.05rem; }

/* Header CTA */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 0.98rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--coral); color: var(--white) !important; box-shadow: 0 6px 18px rgba(228, 87, 46, 0.35); }
.btn-primary:hover { background: var(--coral-dark); }
.btn-ghost { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper) !important; }
.btn-light { background: var(--white); color: var(--ink) !important; box-shadow: var(--shadow-soft); }
.header-cta { padding: 9px 18px; font-size: 0.88rem; }

/* Burger */
.burger {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  padding: 10px; cursor: pointer; margin-left: 4px;
}
.burger span { width: 24px; height: 3px; border-radius: 2px; background: var(--ink); transition: 0.2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--white); overflow: hidden;
  background: linear-gradient(140deg, #14213a 0%, #1b2a41 45%, #274060 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--hero-img); background-size: cover; background-position: center;
  opacity: 0.34;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 33, 58, 0.55) 0%, rgba(20, 33, 58, 0.25) 45%, rgba(20, 33, 58, 0.72) 100%);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr); gap: 44px; padding: 56px 20px 60px; align-items: start; }
.hero h1 { color: var(--white); margin-bottom: 0.45em; }
.hero .lead { font-size: 1.14rem; color: #e8ecf4; max-width: 56ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0 26px; padding: 0; list-style: none; }
.hero-badges li {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.13); border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.85rem; font-weight: 600; backdrop-filter: blur(4px);
}
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero .btn-primary { padding: 15px 30px; font-size: 1.05rem; }

/* Disclaimer chip in hero */
.disclaimer-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: 26px;
  font-size: 0.72rem; color: rgba(255, 255, 255, 0.66); cursor: help;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.45); padding-bottom: 1px; width: fit-content;
}
.disclaimer-chip .tip {
  visibility: hidden; opacity: 0; transition: opacity 0.15s; position: absolute;
  bottom: calc(100% + 10px); left: 0; width: 300px; background: var(--ink); color: #dfe6f0;
  font-size: 0.78rem; line-height: 1.5; padding: 12px 14px; border-radius: 10px;
  box-shadow: var(--shadow); z-index: 50;
}
.disclaimer-chip:hover .tip, .disclaimer-chip:focus .tip { visibility: visible; opacity: 1; }

/* Widget card in hero */
.widget-card {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; min-width: 0;
}
.widget-card .widget-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  margin: 0 0 4px; display: flex; align-items: center; gap: 8px;
}
.widget-card .widget-note { font-size: 0.78rem; color: var(--ink-soft); margin: 0 0 10px; }

/* ---------- Sections ---------- */
.section { padding: 30px 0 6px; }
.section-alt { background: var(--paper-deep); padding: 44px 0; margin: 44px 0; }
.kicker {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--coral); margin-bottom: 8px;
}

/* Discovery strip */
.discovery-strip { padding: 34px 0 10px; }
.discovery-strip h2 { margin-top: 0; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.82rem; padding: 14px 0 0; color: var(--ink-soft); position: relative; z-index: 2; }
.hero .breadcrumbs { color: rgba(255,255,255,0.75); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; opacity: 0.6; }
.breadcrumbs a { color: inherit; }

/* Article layout */
.article { max-width: 780px; margin: 0 auto; padding: 10px 20px 30px; }
.article-wide { max-width: 980px; }
.article ul, .article ol { padding-left: 1.35em; margin: 0 0 1.2em; }
.article li { margin-bottom: 0.45em; }
.article figure { margin: 1.8em 0; }
.article figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 8px; text-align: center; }
.article img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }

/* Route-stop styled list */
.stop-list { list-style: none; padding-left: 0 !important; }
.stop-list li {
  position: relative; padding-left: 30px; margin-bottom: 0.7em;
}
.stop-list li::before {
  content: ""; position: absolute; left: 6px; top: 0.48em; width: 11px; height: 11px;
  border-radius: 50%; background: var(--white); border: 3px solid var(--coral);
}
.stop-list li:not(:last-child)::after {
  content: ""; position: absolute; left: 11px; top: 1.25em; bottom: -0.75em; width: 2px;
  background: repeating-linear-gradient(var(--coral) 0 4px, transparent 4px 8px);
}
.stop-list.blue li::before { border-color: #2a6fdb; }
.stop-list.blue li:not(:last-child)::after { background: repeating-linear-gradient(#2a6fdb 0 4px, transparent 4px 8px); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.4em 0; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
table { border-collapse: collapse; width: 100%; background: var(--white); font-size: 0.95rem; min-width: 480px; }
caption { text-align: left; font-weight: 700; padding: 12px 16px; background: var(--white); font-family: var(--font-display); font-size: 1.02rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: var(--paper); font-size: 0.85rem; letter-spacing: 0.04em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fdfbf6; }
td strong { color: var(--coral-dark); }

/* Info cards / quick summary */
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 1.5em 0; }
.fact-card {
  background: var(--white); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow-soft); border-top: 3px solid var(--amber);
}
.fact-card .fact-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 4px; }
.fact-card .fact-value { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.fact-card .fact-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 3px; }

/* Callouts */
.callout {
  border-radius: var(--radius); padding: 18px 20px; margin: 1.5em 0; font-size: 0.97rem;
  background: var(--white); border-left: 4px solid var(--teal); box-shadow: var(--shadow-soft);
}
.callout.tip { border-left-color: var(--teal); }
.callout.warn { border-left-color: var(--amber); }
.callout.source { border-left-color: var(--ink-soft); font-size: 0.85rem; color: var(--ink-soft); }
.callout p:last-child { margin-bottom: 0; }

/* FAQ */
.faq details {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-soft);
  margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  padding: 16px 46px 16px 20px; font-weight: 700; cursor: pointer; position: relative;
  list-style: none; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--coral); font-weight: 400; transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 20px 16px; color: var(--ink-soft); }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--coral) 0%, #ef7b41 60%, var(--amber) 130%);
  color: var(--white); border-radius: 20px; padding: 38px 34px; margin: 3em 0 2em;
  text-align: center; box-shadow: 0 14px 36px rgba(228, 87, 46, 0.35);
}
.cta-banner h2 { color: var(--white); margin-top: 0; }
.cta-banner p { max-width: 60ch; margin-left: auto; margin-right: auto; color: #fff3ea; }
.cta-banner .btn-light:hover { background: var(--ink); color: var(--white) !important; }

/* Cards grid (home hub) */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; margin: 1.6em 0; }
.hub-card {
  display: flex; flex-direction: column; gap: 6px; background: var(--white);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-soft);
  text-decoration: none; color: var(--ink); border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--amber); color: var(--ink); }
.hub-card .hub-ico { font-size: 1.6rem; }
.hub-card h3 { margin: 0; font-size: 1.12rem; }
.hub-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.hub-card .hub-more { margin-top: auto; font-size: 0.85rem; font-weight: 700; color: var(--coral); }

/* Rating chip */
.rating-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rating-chip .stars { color: var(--amber); letter-spacing: 1px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c6cfdd; margin-top: 70px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 34px; padding: 48px 20px 30px; }
.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 0.9em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #c6cfdd; text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.footer-brand img { height: 38px; margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 22px 20px; font-size: 0.78rem;
  color: #93a1b8; line-height: 1.6;
}
.footer-disclaimer strong { color: #b8c4d6; }
.footer-bottom { padding: 0 20px 26px; font-size: 0.78rem; color: #7d8ba3; display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .main-nav { display: none; position: fixed; inset: 66px 0 0 0; background: var(--paper); overflow: auto; padding: 18px 20px 40px; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a, .nav-drop > button { font-size: 1.05rem; padding: 13px 10px; width: 100%; text-align: left; }
  .drop-menu { position: static; display: block; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 16px; min-width: 0; }
  .nav-drop > button::after { margin-left: auto; }
  .burger { display: flex; }
  .header-cta { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .header-inner { gap: 8px; min-height: 58px; }
  .logo img { height: 30px; }
  .lang-switch > button { padding: 6px 9px; font-size: 0.78rem; }
  .burger { padding: 8px 6px; }
  .hero-inner { padding-top: 30px; padding-bottom: 40px; }
  .hero .btn-primary { width: 100%; }
  .hero-cta-row .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .lang-menu { width: 270px; }
  .cta-banner { padding: 30px 20px; }
}

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.small { font-size: 0.85rem; color: var(--ink-soft); }
