/*
 * Tren de las Sierras - Rediseño 2026
 * Mobile-first sobre Bootstrap 5.3.8
 * Paleta: azul Tren de las Sierras
 */

:root {
  --ts-blue: #0494d1;
  --ts-blue-dark: #036d9e;
  --ts-blue-700: #0580b8;
  --ts-ink: #1f2530;
  --ts-body: #333a45;
  --ts-muted: #5b6470;
  --ts-bg: #ffffff;
  --ts-soft: #f6f7f9;
  --ts-border: #e6e8ec;
  --ts-link: #0580b8;
  --ts-radius: 12px;
  --ts-shadow: 0 2px 14px rgba(20, 24, 31, .08);
  --ts-max: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ts-body);
  background: var(--ts-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ts-ink);
  font-weight: 700;
  line-height: 1.25;
}

a { color: var(--ts-link); text-decoration: none; }
a:hover { color: var(--ts-blue-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; }
.img-responsive { display: block; max-width: 100%; height: auto; }

/* ============ NAVBAR ============ */
.ts-navbar {
  background: var(--ts-blue);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.ts-navbar .navbar-brand { padding: .25rem 0; }
.ts-navbar .navbar-brand img { height: 40px; width: auto; }
.ts-navbar .navbar-nav .nav-link {
  color: rgba(255, 255, 255, .92);
  font-weight: 600;
  padding: .5rem .85rem;
  border-radius: 8px;
}
.ts-navbar .navbar-nav .nav-link:hover,
.ts-navbar .navbar-nav .nav-link:focus,
.ts-navbar .navbar-nav .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}
.ts-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, .5);
  padding: .35rem .6rem;
}
.ts-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .3); }
.ts-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.95%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============ CONTENEDOR DE LECTURA ============ */
.ts-main { padding: 1.25rem 0 2rem; }
.ts-prose {
  max-width: var(--ts-max);
  margin: 0 auto;
  padding: 0 1rem;
}
.ts-prose p { margin: 0 0 1rem; color: var(--ts-body); }
.ts-prose h2 {
  font-size: 1.5rem;
  margin: 2rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 3px solid var(--ts-blue);
  display: inline-block;
}
.ts-prose h3 { font-size: 1.2rem; margin: 1.5rem 0 .6rem; }
.ts-prose h4 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
.ts-prose img { border-radius: var(--ts-radius); box-shadow: var(--ts-shadow); }
.ts-prose ul { max-width: var(--ts-max); margin: 0 0 1rem; padding-left: 1.25rem; }
.ts-prose li { margin-bottom: .4rem; }

/* Hero */
.ts-hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  margin: 0 0 .5rem;
}
.ts-hero .ts-lead { font-size: 1.1rem; color: var(--ts-muted); margin-bottom: 1rem; }
.ts-hero img { width: 100%; margin: .75rem 0 1rem; }

/* Fecha actualización */
.ts-fecha {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ts-blue-dark);
  background: #e8f4fd;
  padding: .3rem .8rem;
  border-radius: 999px;
  margin: 0 0 1rem;
}
.ts-fecha time { font-style: normal; }

/* ============ BREADCRUMB ============ */
nav.breadcrumb {
  max-width: var(--ts-max);
  margin: 0 auto;
  padding: .85rem 1rem .25rem;
  background: transparent;
  border-radius: 0;
}
nav.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  margin: 0;
  padding: 0;
  font-size: .85rem;
}
nav.breadcrumb li { display: inline-flex; align-items: center; gap: .35rem; }
nav.breadcrumb a { color: var(--ts-muted); }
nav.breadcrumb a:hover { color: var(--ts-blue-dark); }
nav.breadcrumb .divisor { color: #b7bdc6; }
nav.breadcrumb [aria-current="page"] { color: var(--ts-ink); font-weight: 600; }

/* ============ ALERTA / AVISO ============ */
.ts-aviso {
  max-width: var(--ts-max);
  margin: 1.25rem auto;
  padding: 1rem 1.1rem;
  background: #fff8e6;
  border: 1px solid #f2d98a;
  border-left: 5px solid #e0a800;
  border-radius: var(--ts-radius);
}
.ts-aviso p { margin: 0 0 .5rem; font-size: .98rem; }
.ts-aviso p:last-child { margin-bottom: 0; }
.ts-aviso ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.ts-aviso li { margin-bottom: .3rem; font-size: .98rem; }

/* Bloque centrado (PDF, mapas) */
.ts-imgmedio { text-align: center; margin: 1.25rem 0; }
.ts-imgmedio img { display: inline-block; max-width: 100%; width: auto; height: auto; box-shadow: none; }

/* Mapa de recorrido */
.ts-mapa {
  display: block;
  width: 500px;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

/* Botón CTA (descarga PDF, ver precios) */
.ts-cta { margin: 1.5rem 0; }
.ts-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: var(--ts-blue);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: .8rem 1.4rem;
  border-radius: 10px;
  box-shadow: var(--ts-shadow);
  transition: background .15s, transform .15s;
}
.ts-btn:hover,
.ts-btn:focus {
  background: var(--ts-blue-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.ts-btn:focus-visible { outline: 3px solid rgba(4, 148, 209, .35); outline-offset: 2px; }
.ts-btn svg { width: 20px; height: 20px; flex: none; }
.ts-btn small { font-weight: 400; opacity: .85; }

/* ============ FAQ ============ */
.ts-faq { max-width: var(--ts-max); margin: 2rem auto 0; padding: 0 1rem; }
.ts-faq .accordion-item {
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius) !important;
  margin-bottom: .6rem;
  overflow: hidden;
}
.ts-faq .accordion-button {
  font-weight: 600;
  color: var(--ts-ink);
  background: #fff;
}
.ts-faq .accordion-button:not(.collapsed) {
  color: var(--ts-blue-dark);
  background: #e8f4fd;
  box-shadow: none;
}
.ts-faq .accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(4, 148, 209, .15);
  border-color: var(--ts-blue);
}
.ts-faq .accordion-button:not(.collapsed)::after {
  filter: hue-rotate(180deg) saturate(2);
}
.ts-faq .accordion-body { color: var(--ts-body); }

/* ============ TARJETAS HOME ============ */
.ts-card {
  padding: .5rem;
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  background: #fff;
  height: 100%;
  transition: border-color .15s, transform .15s;
}
.ts-card:hover { border-color: var(--ts-blue); transform: translateY(-2px); }
.ts-card h2 { margin: .25rem 0 .5rem; color: var(--ts-blue-dark); border: 0; }
.ts-card img { border-radius: 8px; box-shadow: none; }

/* ============ INTERLINKING ============ */
.ts-links {
  max-width: var(--ts-max);
  margin: 2.25rem auto 0;
  padding: 1.25rem 1rem;
  background: var(--ts-soft);
  border-radius: var(--ts-radius);
  border: 1px solid var(--ts-border);
}
.ts-links h2 {
  font-size: 1.15rem;
  margin: 0 0 .85rem;
  color: var(--ts-ink);
  border: 0;
}
.ts-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ts-links li { margin: 0; }
.ts-links a {
  display: block;
  padding: .7rem .9rem;
  background: #fff;
  border: 1px solid var(--ts-border);
  border-radius: 9px;
  color: var(--ts-body);
  font-weight: 500;
  transition: border-color .15s, transform .15s;
}
.ts-links a:hover {
  border-color: var(--ts-blue);
  color: var(--ts-blue-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.ts-links a strong { color: var(--ts-blue-dark); font-weight: 700; }

/* ============ ADSENSE ============ */
.adsense-incontent {
  width: 100%;
  max-width: var(--ts-max);
  margin: 1.75rem auto;
  padding: 0 1rem;
  text-align: center;
  overflow: hidden;
}
.adsense-incontent .adsbygoogle { display: block; width: 100%; max-width: 100%; }

/* ============ TABLAS ============ */
.tabla-tarifas {
  width: 100%; max-width: var(--ts-max); margin: 1.5rem auto;
  border-collapse: collapse; font-size: .95rem;
}
.tabla-tarifas th, .tabla-tarifas td {
  padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--ts-border);
}
.tabla-tarifas thead tr { background: var(--ts-soft); }
.tabla-tarifas th { font-weight: 600; color: var(--ts-ink); }
.tabla-tarifas tbody tr:hover { background: var(--ts-soft); }

/* ============ LISTA DE ESTACIONES ============ */
.ts-estaciones {
  max-width: var(--ts-max);
  margin: 1.5rem auto;
}
.ts-estaciones .list-group-item {
  padding: .55rem .85rem;
  border: 1px solid var(--ts-border);
  font-size: .95rem;
}
.ts-estaciones .badge {
  font-size: .75rem;
}

/* ============ GOOGLE MAPS ============ */
.google-maps {
  aspect-ratio: 7 / 6; width: 100%; max-width: var(--ts-max);
  margin: 1.25rem auto; overflow: hidden; position: relative;
  border-radius: var(--ts-radius); box-shadow: var(--ts-shadow);
}
.google-maps iframe {
  width: 100%; height: 100%; border: 0;
  position: absolute; top: 0; left: 0;
}

/* ============ FOOTER ============ */
.ts-footer {
  margin-top: 2.5rem;
  padding: 1.75rem 1rem;
  background: var(--ts-ink);
  color: #cdd2da;
  text-align: center;
}
.ts-footer a { color: #fff; font-weight: 500; }
.ts-footer a:hover { color: #b8e0f7; text-decoration: none; }
.ts-footer .ts-foot-nav { margin: 0 0 .5rem; font-size: .9rem; }
.ts-footer .ts-foot-nav a { margin: 0 .3rem; }
.ts-footer .texto-bajo { font-size: .82rem; color: #98a0ab; margin: 0; }

/* Social icons */
.ts-footer .social { margin: .75rem 0; }
.ts-footer .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  width: 40px;
  height: 40px;
  font-size: 18px;
  border-radius: 50%;
  color: #fff;
  transition: all .2s ease;
  text-decoration: none;
}
.ts-footer .social a.facebook {
  background: #3b5998;
}
.ts-footer .social a.facebook:hover {
  background: #2d4373;
}
.ts-footer .social a.instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border: none;
}
.ts-footer .social a.instagram:hover {
  filter: brightness(1.1);
}
.ts-footer .social a .svg-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  pointer-events: none;
}
