/* ═══════════════════════════════════════════════════════════════════
   PROMOX — Trámites de viaje (prefijo tram-, comparte estructura con
   el diccionario de geografía; paleta propia por continente y por
   tipo de trámite)
   Orden de carga: styles.css → promox-ui.css → tramites-v1.css
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --c-amer: #2F7D4F; --c-amer-bg: rgba(47,125,79,.10);
  --c-eur:  #1D6FA5; --c-eur-bg:  rgba(29,111,165,.09);
  --c-afr:  #C2680C; --c-afr-bg:  rgba(194,104,12,.10);
  --c-asia: #B52124; --c-asia-bg: rgba(181,33,36,.09);
  --c-oce:  #6B46A6; --c-oce-bg:  rgba(107,70,166,.09);

  --b-sinvisa:   #2F7D4F; --b-sinvisa-bg:   rgba(47,125,79,.12);
  --b-libre:     #0F7F7C; --b-libre-bg:     rgba(15,127,124,.12);
  --b-evisa:     #1D6FA5; --b-evisa-bg:     rgba(29,111,165,.12);
  --b-arrival:   #C2680C; --b-arrival-bg:   rgba(194,104,12,.12);
  --b-eta:       #3B82D6; --b-eta-bg:       rgba(59,130,214,.12);
  --b-requerida: #B52124; --b-requerida-bg: rgba(181,33,36,.12);
}

/* ─── Hero ─────────────────────────────────────────────────────────── */
.hero--tram .hero__subtitle { max-width: 68ch; }

/* ─── Hoja de ruta (4 pasos) ──────────────────────────────────────── */
.tram-intro { padding: var(--section-y) 0; }
.tram-steps {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: 1040px; margin: 0 auto;
}
@media (min-width: 720px) { .tram-steps { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1040px) { .tram-steps { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.tram-steps__card {
  background: var(--white); border: 1px solid var(--pz-line); border-radius: var(--pz-radius);
  box-shadow: var(--pz-shadow); padding: clamp(18px, 2.2vw, 22px);
}
.tram-steps__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; background: var(--crimson-faint);
  color: var(--crimson); font-weight: 800; font-size: 1rem; margin-bottom: 12px;
}
.tram-steps__card h3 { font-size: 1.02rem; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -.01em; }
.tram-steps__card p { font-size: var(--fs-sm); line-height: var(--lh-relaxed); color: var(--grey-dark); }

/* ─── Tipos de trámite ────────────────────────────────────────────── */
.tram-tipos { padding: var(--section-y) 0; }
.tram-tipos__grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: 1100px; margin: 0 auto 20px;
}
@media (min-width: 720px) { .tram-tipos__grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1040px) { .tram-tipos__grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.tram-tipos__card {
  background: var(--white); border: 1px solid var(--pz-line); border-radius: var(--pz-radius);
  box-shadow: var(--pz-shadow); padding: clamp(18px, 2.4vw, 24px);
}
.tram-tipos__card .tram-card__badge { margin-bottom: 12px; }
.tram-tipos__card p { font-family: var(--font-serif); font-size: 1rem; line-height: var(--lh-relaxed); color: var(--grey-dark); }
.tram-disclaimer {
  max-width: 760px; margin: 0 auto; text-align: center; font-size: var(--fs-sm);
  color: var(--grey); line-height: var(--lh-relaxed); font-style: italic;
}

/* ─── Badges de estado (reutilizado en tarjetas y en "tipos") ───────── */
.tram-card__badge {
  display: inline-flex; align-items: center; font-size: .75rem; font-weight: 700;
  letter-spacing: .02em; padding: 4px 10px; border-radius: var(--radius-pill);
}
.tram-card__badge[data-badge="sinvisa"]   { color: var(--b-sinvisa);   background: var(--b-sinvisa-bg); }
.tram-card__badge[data-badge="libre"]     { color: var(--b-libre);     background: var(--b-libre-bg); }
.tram-card__badge[data-badge="evisa"]     { color: var(--b-evisa);     background: var(--b-evisa-bg); }
.tram-card__badge[data-badge="arrival"]   { color: var(--b-arrival);   background: var(--b-arrival-bg); }
.tram-card__badge[data-badge="eta"]       { color: var(--b-eta);       background: var(--b-eta-bg); }
.tram-card__badge[data-badge="requerida"] { color: var(--b-requerida); background: var(--b-requerida-bg); }

/* ─── Salud / fiebre amarilla ────────────────────────────────────── */
.tram-salud { padding: var(--section-y) 0; }
.tram-salud__grid {
  display: grid; grid-template-columns: 1fr; gap: 18px;
  max-width: 1040px; margin: 0 auto 22px;
}
@media (min-width: 860px) { .tram-salud__grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.tram-salud__card {
  background: var(--white); border: 1px solid var(--pz-line); border-radius: var(--pz-radius);
  box-shadow: var(--pz-shadow); padding: clamp(20px, 2.6vw, 26px);
}
.tram-salud__card h3 { font-size: 1.02rem; font-weight: 800; color: var(--text); margin-bottom: 10px; letter-spacing: -.01em; }
.tram-salud__card p { font-size: var(--fs-sm); line-height: var(--lh-relaxed); color: var(--grey-dark); }
.tram-links { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: center; max-width: 900px; margin: 0 auto; }
.tram-links__item { font-size: var(--fs-sm); font-weight: 700; color: var(--crimson); text-decoration: underline; text-underline-offset: 3px; }

/* ─── Otros trámites ──────────────────────────────────────────────── */
.tram-otros { padding: var(--section-y) 0; }
.tram-otros__grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: 1100px; margin: 0 auto;
}
@media (min-width: 720px) { .tram-otros__grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1040px) { .tram-otros__grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.tram-otros__card {
  background: var(--white); border: 1px solid var(--pz-line); border-radius: var(--pz-radius);
  box-shadow: var(--pz-shadow); padding: clamp(18px, 2.2vw, 22px); display: flex; flex-direction: column;
}
.tram-otros__card h3 { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -.01em; }
.tram-otros__card p { font-size: var(--fs-sm); line-height: var(--lh-relaxed); color: var(--grey-dark); flex: 1; margin-bottom: 12px; }
.tram-otros__card a { font-size: var(--fs-sm); font-weight: 700; color: var(--crimson); text-decoration: underline; text-underline-offset: 3px; }

/* ─── Buscador ────────────────────────────────────────────────────── */
.tram-buscador { padding: var(--section-y) 0 clamp(20px, 3vw, 28px); }
.tram-panel {
  max-width: 980px; margin: 0 auto;
  background: var(--white); border: 1px solid var(--pz-line);
  border-radius: var(--pz-radius-lg); box-shadow: var(--pz-shadow-lift);
  padding: clamp(20px, 3vw, 30px) clamp(20px, 3.4vw, 34px);
}
.tram-search { position: relative; display: flex; align-items: center; margin-bottom: 18px; }
.tram-search__icon { position: absolute; left: 16px; color: var(--grey); pointer-events: none; }
.tram-search__input {
  width: 100%; min-height: 56px; padding: 14px 48px 14px 48px;
  background: var(--off-white); border: 1.5px solid var(--pz-line); border-radius: var(--radius);
  font-family: inherit; font-size: 1.0625rem; color: var(--text);
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.tram-search__input::placeholder { color: var(--grey); }
.tram-search__input:focus-visible {
  outline: none; border-color: var(--crimson); background: var(--white);
  box-shadow: 0 0 0 4px rgba(193,39,45,.12);
}
.tram-search__clear {
  position: absolute; right: 10px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; color: var(--grey);
  transition: background var(--t), color var(--t);
}
.tram-search__clear:hover { background: var(--off-white); color: var(--text); }

.tram-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tram-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: var(--radius-pill);
  background: var(--off-white); border: 1.5px solid var(--pz-line);
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--grey-dark);
  transition: background var(--t), border-color var(--t), color var(--t);
}
.tram-chip__n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: rgba(23,34,51,.07); font-size: .75rem; font-weight: 700; color: var(--grey-dark);
}
.tram-chip:hover { border-color: #c5cfdb; color: var(--text); }
.tram-chip.is-active { background: #14181D; border-color: #14181D; color: #fff; }
.tram-chip.is-active .tram-chip__n { background: rgba(255,255,255,.18); color: #fff; }
.tram-chip:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; }
.tram-chip[data-cont="amer"].is-active { background: var(--c-amer); border-color: var(--c-amer); }
.tram-chip[data-cont="eur"].is-active  { background: var(--c-eur);  border-color: var(--c-eur); }
.tram-chip[data-cont="afr"].is-active  { background: var(--c-afr);  border-color: var(--c-afr); }
.tram-chip[data-cont="asia"].is-active { background: var(--c-asia); border-color: var(--c-asia); }
.tram-chip[data-cont="oce"].is-active  { background: var(--c-oce);  border-color: var(--c-oce); }

.tram-count { max-width: 980px; margin: 16px auto 0; text-align: center; font-size: var(--fs-sm); color: var(--grey); }
.tram-count strong { color: var(--text); font-weight: 700; }

/* ─── Grid de países ──────────────────────────────────────────────── */
.tram-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: 1100px; margin: 24px auto 0; list-style: none; padding: 0;
}
@media (min-width: 720px) { .tram-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 20px; } }
@media (min-width: 1100px) { .tram-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }

.tram-card {
  list-style: none; background: var(--white); border: 1px solid var(--pz-line);
  border-radius: var(--pz-radius); box-shadow: var(--pz-shadow);
  padding: clamp(18px, 2.2vw, 22px); scroll-margin-top: calc(var(--nav-h) + 20px);
  transition: box-shadow .25s ease, border-color .25s ease, background-color .6s ease;
}
.tram-card:hover { box-shadow: var(--pz-shadow-lift); }
.tram-card.is-target { border-color: var(--crimson); background: var(--crimson-faint); }
.tram-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.tram-card__link {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; color: var(--grey); transition: background var(--t), color var(--t);
}
.tram-card__link:hover { background: var(--off-white); color: var(--crimson); }
.tram-card__term { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; color: var(--text); margin-bottom: 6px; line-height: var(--lh-snug); }
.tram-card__stay { font-size: var(--fs-sm); color: var(--grey-dark); margin-bottom: 6px; }
.tram-card__stay strong { color: var(--text); }
.tram-card__nota { font-family: var(--font-serif); font-size: .92rem; line-height: var(--lh-relaxed); color: var(--grey-dark); margin-bottom: 8px; }
.tram-card__yf {
  display: flex; align-items: flex-start; gap: 6px; font-size: .78rem; font-weight: 600;
  color: #9A5B00; background: rgba(194,104,12,.08); border-radius: 8px; padding: 6px 9px; margin-bottom: 8px;
  line-height: 1.35;
}
.tram-card__yf svg { flex: none; margin-top: 2px; }
.tram-card__src { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--grey); text-decoration: underline; text-underline-offset: 3px; }
.tram-card__src:hover { color: var(--crimson); }

.tram-empty { max-width: 560px; margin: 40px auto 0; text-align: center; font-size: 1.05rem; color: var(--grey-dark); line-height: var(--lh-relaxed); }
.tram-empty__reset { color: var(--crimson); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ─── FAQ ─────────────────────────────────────────────────────────── */
.tram-faq { padding: var(--section-y) 0; }
.tram-faq__list { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.tram-faq__item {
  background: var(--white); border: 1px solid var(--pz-line); border-radius: 12px;
  padding: 18px 22px;
}
.tram-faq__q { font-size: 1rem; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -.01em; }
.tram-faq__a { font-family: var(--font-serif); font-size: .96rem; line-height: var(--lh-relaxed); color: var(--grey-dark); }

@media print {
  .tram-buscador, .back-to-top, .wa-float { display: none !important; }
}
