/* BiciStreet — hoja de estilos global */

:root {
  --asphalt: #16191c;
  --asphalt-2: #24282d;
  --asphalt-3: #2f353b;
  --paper: #f6f4ee;
  --paper-2: #ffffff;
  --ink: #1c2024;
  --ink-soft: #565d64;
  --ink-faint: #8a8f95;
  --line: #e6e2d6;
  --green: #1f7a3d;
  --green-dark: #175c2f;
  --green-tint: #eaf4ec;
  --yellow: #f2b705;
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1120px;
  --shadow-sm: 0 2px 8px rgba(20, 22, 24, 0.06);
  --shadow-md: 0 14px 32px rgba(20, 22, 24, 0.12);
  font-size: 17px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand, .btn {
  font-family: "Barlow Condensed", "Work Sans", sans-serif;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 { font-size: 2.9rem; font-weight: 800; line-height: 1.08; margin: 0 0 14px; letter-spacing: 0; }
h2 { font-size: 1.85rem; font-weight: 700; margin: 42px 0 14px; }
h3 { font-size: 1.32rem; font-weight: 600; margin: 26px 0 8px; }
p { margin: 0 0 16px; max-width: 68ch; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Enlaces dentro de texto corrido (artículos, páginas legales, buscador):
   subrayado siempre visible para que se distingan claramente de texto normal. */
.article-body a, .legal-body a, .callout a, #search-results a {
  text-decoration: underline;
  text-decoration-color: rgba(23, 92, 47, 0.45);
  text-underline-offset: 2px;
  font-weight: 600;
}
.article-body a:hover, .legal-body a:hover, .callout a:hover, #search-results a:hover {
  text-decoration-color: currentColor;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: 6px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.site-nav {
  background: var(--asphalt);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 6px 18px rgba(0,0,0,0.18);
  border-bottom: 3px solid var(--yellow);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 13px;
  padding-bottom: 13px;
}
.brand {
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.brand svg { flex-shrink: 0; }
.brand .dot { color: var(--yellow); }
.nav-search {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-search input {
  background: var(--asphalt-2);
  border: 1px solid #40464c;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.88rem;
  width: 200px;
  transition: width 0.2s ease, border-color 0.2s ease;
}
.nav-search input:focus { width: 240px; border-color: var(--yellow); outline: none; }
.nav-search input::placeholder { color: #8d939a; }

/* ---------- Category tabs ---------- */
.cat-tabs {
  background: var(--asphalt-2);
  border-bottom: 3px solid var(--asphalt-3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  position: sticky;
  top: 53px;
  z-index: 49;
}
.cat-tabs-inner {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding-top: 0;
  padding-bottom: 0;
}
.cat-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 11px 16px 9px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #cfd3d7;
  border-top: 3px solid var(--tab-color, transparent);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.cat-tab:hover { background: var(--asphalt-3); color: #fff; text-decoration: none; }
.cat-tab.active { background: var(--asphalt-3); color: #fff; }
.cat-tab-search { color: var(--yellow); border-top-color: transparent; margin-left: auto; }

@media (max-width: 780px) {
  .nav-search input { width: 140px; }
  .nav-search input:focus { width: 170px; }
  .cat-tabs { top: 50px; }
  .cat-tab { padding: 10px 13px 8px; font-size: 0.82rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: #eef2ea;
  background-image: radial-gradient(ellipse 800px 460px at 12% 0%, rgba(31,122,61,0.16), transparent),
                     radial-gradient(ellipse 600px 460px at 105% 20%, rgba(242,183,5,0.14), transparent);
  padding: 50px 0 44px;
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 30px;
}
.hero-copy h1 { color: var(--ink); }
.hero-copy p.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-art { border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-md); }
.hero-art img { aspect-ratio: 900/560; object-fit: contain; width: 100%; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
}

.tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--asphalt);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: 0; }
.section-head .see-all { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }

/* ---------- Grids & cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin: 22px 0 44px;
}
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; text-decoration: none; }
.card-media { position: relative; background: #fff; }
.card-media img { aspect-ratio: 16/10; object-fit: contain; width: 100%; }
.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.card-badge svg { width: 18px; height: 18px; }
.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 8px; font-size: 1.18rem; line-height: 1.25; }
.card p { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 10px; }
.card .meta { margin-top: auto; font-size: 0.76rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; padding-top: 6px; }
.card-cat {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}

/* Category header banner (categorias/*.html) */
.cat-banner { position: relative; border-radius: var(--radius); overflow: hidden; margin-top: 26px; box-shadow: var(--shadow-md); background: #fff; border: 1px solid var(--line); }
.cat-banner img { width: 100%; aspect-ratio: 640/400; object-fit: contain; max-height: 340px; margin: 0 auto; }
.cat-banner .cat-banner-copy {
  padding: 20px 26px 26px;
  border-top: 1px solid var(--line);
}
.cat-banner h1 { color: var(--ink); margin-bottom: 6px; }
.cat-banner p { color: var(--ink-soft); margin: 0; max-width: 56ch; }

/* ---------- Article ---------- */
.article-header { padding: 30px 0 8px; }
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 12px; }
.breadcrumb a { color: var(--ink-soft); }
.article-meta { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 22px; }
.article-body { max-width: 700px; }
.article-body img { margin: 22px 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); background: #fff; border: 1px solid var(--line); }
.article-body figcaption { font-size: 0.85rem; color: var(--ink-faint); margin-top: -14px; margin-bottom: 22px; }
.callout {
  background: var(--green-tint);
  border-left: 4px solid var(--green);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 22px 0;
}
.callout.warn { background: #fdf5e0; border-left-color: var(--yellow); }

.related { margin-top: 50px; padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.02rem;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--green-dark); text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--asphalt); color: var(--asphalt); }
.btn-outline:hover { background: var(--asphalt); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.35); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ---------- Search page ---------- */
#search-input { width: 100%; max-width: 480px; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 1rem; }
#search-input:focus { outline: none; border-color: var(--green); }
#search-results .card p.snippet { color: var(--ink-soft); }
.empty-note { color: var(--ink-soft); font-style: italic; margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--asphalt);
  color: #b9bec3;
  margin-top: 64px;
  padding: 40px 0 26px;
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 44px;
  justify-content: space-between;
}
.site-footer h4 { color: #fff; font-size: 1.02rem; margin: 0 0 12px; }
.site-footer a { color: #b9bec3; }
.site-footer a:hover { color: #fff; }
.site-footer .col { min-width: 170px; }
.site-footer .bottom {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #2e3339;
  font-size: 0.82rem;
  color: #7d8288;
}

.legal-body { max-width: 700px; margin: 34px auto 60px; }
