:root {
  --blue-900: #0a2a66;
  --blue-700: #0b4db5;
  --ice-100: #f4f9ff;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  /* Reserve the scrollbar gutter so toggling overflow on body (e.g. when the
     cookie-consent banner shows) doesn't cause horizontal layout shift. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Fira Sans Condensed", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 45%, #eef5ff 100%);
  color: var(--blue-900);
}

body.has-cookie-consent {
  overflow: hidden;
}

.cookie-consent-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 18, 40, 0.42);
  opacity: 0;
  pointer-events: none;
  z-index: 1190;
  transition: opacity 0.2s ease;
}

.cookie-consent-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translate(-50%, 18px);
  width: min(520px, calc(100% - 24px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(11, 77, 181, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(4, 20, 55, 0.18);
  color: var(--blue-900);
  opacity: 0;
  pointer-events: none;
  z-index: 1200;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cookie-consent.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.cookie-consent__title,
.cookie-consent__text {
  margin: 0;
}

.cookie-consent__title {
  font-weight: 700;
  font-size: 0.95rem;
}

.cookie-consent__text {
  margin-top: 3px;
  color: rgba(10, 42, 102, 0.78);
  font-size: 0.86rem;
  line-height: 1.35;
}

.cookie-consent__link {
  display: inline-flex;
  color: var(--blue-700);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.cookie-consent__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 5px;
}

.cookie-consent__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cookie-consent__btn {
  border: 1px solid rgba(11, 77, 181, 0.24);
  border-radius: 999px;
  padding: 8px 13px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 38px;
}

.cookie-consent__btn--primary {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: var(--white);
}

.cookie-consent__btn--secondary {
  background: transparent;
  border-color: transparent;
  color: var(--blue-700);
  font-size: 0.84rem;
  font-weight: 700;
  min-height: 0;
  padding: 0;
  text-decoration: none;
}

.legal-header {
  padding: 22px 24px 0;
  text-align: center;
}

.legal-header__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  color: var(--blue-900);
}

.legal-header__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}


.legal {
  max-width: 860px;
  margin: 24px auto 64px;
  background: var(--white);
  border-radius: 24px;
  padding: 32px 34px 40px;
  box-shadow: 0 18px 40px rgba(4, 20, 55, 0.12);
  border: 1px solid rgba(11, 77, 181, 0.12);
}

.legal h1 {
  font-family: "Fira Sans Condensed", "Segoe UI", sans-serif;
  font-size: 2.2rem;
  margin: 0 0 8px;
  text-align: center;
}

.legal__updated {
  margin: 0 0 26px;
  color: rgba(10, 42, 102, 0.7);
  text-align: center;
}

.legal section {
  margin-bottom: 22px;
}

.legal h2 {
  font-size: 1.1rem;
  margin: 0 0 8px;
  color: var(--blue-700);
}

.legal h3 {
  font-size: 1rem;
  margin: 14px 0 8px;
  color: var(--blue-700);
}

.about__toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 22px;
}

.about__toggle-btn {
  border: 1px solid rgba(11, 77, 181, 0.2);
  background: var(--ice-100);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about__toggle-btn.is-active {
  border-color: rgba(11, 77, 181, 0.55);
  box-shadow: 0 8px 18px rgba(11, 77, 181, 0.18);
}

.about__toggle-btn:hover {
  transform: translateY(-1px);
}

.about__section {
  margin-bottom: 26px;
}

.about__lang {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.about__tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ice-100);
  border: 1px solid rgba(11, 77, 181, 0.2);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.about__list {
  margin-left: 18px;
}

.about__features {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.about__feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(11, 77, 181, 0.12);
  background: rgba(244, 249, 255, 0.7);
}

.about__feature-text h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--blue-700);
}

.about__feature-text p {
  margin: 0;
  color: rgba(10, 42, 102, 0.75);
}

.about__mock {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(11, 77, 181, 0.16);
  padding: 12px;
  box-shadow: 0 10px 22px rgba(4, 20, 55, 0.12);
}

.mock-topbar {
  display: grid;
  gap: 10px;
}

.mock-topbar__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
}

.mock-topbar__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.mock-topbar__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.mock-topbar__subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue-900);
  line-height: 1.1;
}

.mock-topbar__controls {
  display: grid;
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

.mock-topbar__button-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 10px;
  align-items: end;
  width: 100%;
}

.mock-line-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(10, 42, 102, 0.65);
}

.mock-line-label {
  line-height: 1;
}

.mock-line-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  align-self: end;
}

.mock-line-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ice-100);
  border: 1px solid rgba(11, 77, 181, 0.2);
  color: var(--blue-900);
  font-weight: 700;
  font-size: 0.75rem;
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.mock-chevron {
  color: var(--blue-700);
  font-size: 0.8rem;
}

.mock-topbar__buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

.mock-topbar__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  width: 100%;
}

.mock-topbar__actions-left,
.mock-topbar__actions-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mock-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ice-100);
  border: 1px solid rgba(11, 77, 181, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mock-btn--sm {
  width: 28px;
  height: 28px;
}

.mock-btn--line {
  background: var(--line-color, var(--blue-700));
  border-color: var(--line-color, var(--blue-700));
}

.mock-btn--line .mock-icon {
  stroke: var(--white);
}

.mock-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--blue-700);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mock-card {
  display: grid;
  gap: 10px;
}

.mock-card__title {
  font-weight: 700;
  color: var(--blue-900);
  font-size: 0.95rem;
}

.mock-card__code {
  color: rgba(10, 42, 102, 0.6);
  font-weight: 600;
  margin-left: 4px;
}

.mock-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mock-badge {
  --line-color: var(--blue-700);
  background: var(--line-color);
  color: var(--white);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 26px;
  padding: 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
}

.mock-badge--small {
  height: 20px;
  min-width: 20px;
  font-size: 0.75rem;
  padding: 0 5px;
}

.mock-section__title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-700);
  margin-bottom: 4px;
}

.mock-bus {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  background: var(--ice-100);
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 0.78rem;
  color: rgba(10, 42, 102, 0.8);
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mock-pill {
  border: 1px solid rgba(11, 77, 181, 0.2);
  background: var(--ice-100);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-700);
}

.mock-line-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mock-line-title {
  font-weight: 700;
  color: var(--blue-900);
  font-size: 0.95rem;
}

.mock-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(11, 77, 181, 0.2);
  background: var(--ice-100);
  width: fit-content;
}

.mock-toggle__btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(10, 42, 102, 0.7);
}

.mock-toggle__btn.is-active {
  background: var(--blue-700);
  color: var(--white);
}

.mock-line-stop {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 8px;
  align-items: start;
}

.mock-dot {
  width: 8px;
  height: 8px;
  background: var(--blue-700);
  border-radius: 50%;
  margin-top: 6px;
}

.mock-line-stop__info {
  border-radius: 12px;
  border: 1px solid rgba(11, 77, 181, 0.12);
  background: rgba(244, 249, 255, 0.7);
  padding: 6px 8px;
}

.mock-line-stop__name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue-900);
}

.about.is-filtered .about__section {
  display: none;
}

.about.is-filtered .about__section.is-active {
  display: block;
}

.flag {
  width: 32px;
  height: 20px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.flag--es {
  background: linear-gradient(#c60b1e 0 25%, #ffc400 25% 75%, #c60b1e 75% 100%);
}

.flag--en {
  background-color: #012169;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 36'%3E%3Crect width='60' height='36' fill='%23012169'/%3E%3Cpath d='M0 0 L60 36 M60 0 L0 36' stroke='%23ffffff' stroke-width='12' stroke-linecap='square'/%3E%3Cpath d='M0 0 L60 36 M60 0 L0 36' stroke='%23c8102e' stroke-width='6' stroke-linecap='square'/%3E%3Cpath d='M0 18 H60 M30 0 V36' stroke='%23ffffff' stroke-width='20' stroke-linecap='square'/%3E%3Cpath d='M0 18 H60 M30 0 V36' stroke='%23c8102e' stroke-width='10' stroke-linecap='square'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.flag--va {
  background:
    linear-gradient(90deg, #1f4aa8 0 24%, transparent 24% 100%),
    repeating-linear-gradient(
      0deg,
      #d81e05 0 12.5%,
      #ffdc00 12.5% 25%
    );
}

.legal p {
  margin: 8px 0;
  line-height: 1.6;
}

.legal ul {
  margin: 8px 0 12px 18px;
  padding: 0;
  line-height: 1.6;
}

.legal a {
  color: var(--blue-700);
  font-weight: 600;
}

.legal__button {
  border: 1px solid rgba(11, 77, 181, 0.24);
  border-radius: 999px;
  background: var(--blue-700);
  color: var(--white);
  padding: 9px 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 720px) {
  .cookie-consent {
    grid-template-columns: 1fr;
  }

  .cookie-consent__actions {
    justify-content: flex-end;
  }

  .legal-header {
    padding: 18px 16px 0;
  }

  .legal {
    margin: 16px 14px 40px;
    padding: 26px 22px 32px;
  }

  .legal h1 {
    font-size: 1.9rem;
  }

  .about__feature {
    grid-template-columns: 1fr;
  }

  .mock-topbar__content {
    grid-template-columns: 1fr;
  }

  .mock-topbar__buttons {
    grid-template-columns: repeat(4, 36px);
    justify-content: center;
  }
}


.legal__lang-notice {
  background: #fff7e0;
  border: 1px solid #f0c14b;
  border-radius: 6px;
  color: #5a4a00;
  padding: 12px 16px;
  margin: 16px 0 24px;
  font-size: 0.95em;
}

@media (prefers-color-scheme: dark) {
  .legal__lang-notice {
    background: #3a2f00;
    border-color: #f0c14b;
    color: #ffe89f;
  }
}

.line-network-index__intro {
  font-size: 1.1em;
  margin-bottom: 24px;
}

.line-network-index__list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.line-network-index__list > li > a {
  display: block;
  padding: 18px 20px;
  background: #f7f9fc;
  border: 1px solid #d8e0ee;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}

.line-network-index__list > li > a:hover,
.line-network-index__list > li > a:focus-visible {
  background: #eef3fb;
  border-color: var(--blue-700, #0b4db5);
}

.line-network-index__list h2 {
  margin: 0 0 6px;
  font-size: 1.15em;
  color: var(--blue-700, #0b4db5);
}

.line-network-index__list p {
  margin: 0;
  font-size: 0.95em;
  color: #4a5566;
}

.line-network-index__hint {
  font-size: 0.95em;
  color: #4a5566;
}

@media (prefers-color-scheme: dark) {
  .line-network-index__list > li > a {
    background: #1f2738;
    border-color: #38465f;
  }
  .line-network-index__list > li > a:hover,
  .line-network-index__list > li > a:focus-visible {
    background: #283346;
    border-color: #5a90e6;
  }
  .line-network-index__list h2 {
    color: #8db4ff;
  }
  .line-network-index__list p,
  .line-network-index__hint {
    color: #c5cdda;
  }
}

/* marinaBaja/VegaBaja/GVA_ALSA line pages: stop names became links to the
   SEO stop pages (previously plain text), so default link styling would
   turn a route list into a wall of bold underlined blue text. Keep it
   reading as a list, with a link affordance only on hover/focus. */
a.line-page__stop-name {
  color: inherit;
  text-decoration: none;
}
a.line-page__stop-name:hover,
a.line-page__stop-name:focus-visible {
  text-decoration: underline;
}
