/* VuelveSeguro — CSS unificado */

:root {
  --white: #ffffff;
  --bg: #f5f6f8;
  --bg-card: #ffffff;
  --border: #e2e4e9;
  --border-light: #eef0f3;
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --accent: #111827;

  --green: #16a34a;
  --green-light: #f0fdf4;
  --green-border: #bbf7d0;
  --yellow: #ca8a04;
  --yellow-light: #fefce8;
  --yellow-border: #fef08a;
  --orange: #ea580c;
  --orange-light: #fff7ed;
  --orange-border: #fed7aa;
  --red: #dc2626;
  --red-light: #fef2f2;
  --red-border: #fecaca;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 2px 8px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-w: 1140px;
}

/* Modo oscuro */
[data-theme="dark"] {
  --white: #181825;
  --bg: #11111b;
  --bg-card: #1e1e2e;
  --border: #313244;
  --border-light: #272738;
  --text: #cdd6f4;
  --text-secondary: #a6adc8;
  --text-muted: #6c7086;
  --accent: #cdd6f4;
  --green-light: #0d2818;
  --green-border: #1a4a2e;
  --yellow-light: #28220a;
  --yellow-border: #4a3a10;
  --orange-light: #28180a;
  --orange-border: #4a2a10;
  --red-light: #280a0a;
  --red-border: #4a1010;
  --shadow: 0 2px 8px rgba(0,0,0,.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

/* ============ HEADER ============ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.03em;
}
.logo span { color: var(--green); }
.header-nav {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.header-source {
  font-size: .82rem;
  color: var(--text-muted);
}
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .35rem .5rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-secondary);
  transition: border-color .15s, background .15s;
}
.theme-toggle:hover { border-color: var(--text-secondary); background: var(--bg); }
.breadcrumb {
  font-size: .88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* ============ HERO (Homepage) ============ */
.hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
  margin-bottom: .6rem;
}
.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 1.75rem;
  line-height: 1.5;
}

/* ============ SEARCH ============ */
.search-form {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.search-form input {
  width: 100%;
  padding: .75rem 1rem .75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.search-form input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .95rem;
  pointer-events: none;
}

/* Dropdown de autocompletado */
.search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 12px 32px rgba(0,0,0,.08);
  z-index: 200;
  overflow: hidden;
}
.search-item {
  display: block;
  padding: .65rem 1rem;
  font-size: .95rem;
  color: var(--text);
  text-decoration: none;
  transition: background .1s;
}
.search-item:hover,
.search-item-active {
  background: var(--bg);
}
.search-item + .search-item {
  border-top: 1px solid var(--border-light);
}

/* ============ STATS ============ */
.stats {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-light);
  background: var(--white);
}
.stat {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .9rem;
  color: var(--text-secondary);
}
.stat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stat strong { color: var(--text); font-weight: 700; }

/* ============ MAPA ============ */
.mapa-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}
.mapa-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mapa-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}
.mapa-titulo {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.mapa-leyenda {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
}
.leyenda-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  color: var(--text-secondary);
}
.leyenda-color {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}
#mapChart {
  width: 100%;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mapa-card-footer {
  padding: .6rem 1.25rem;
  border-top: 1px solid var(--border-light);
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
}
@media (max-width: 768px) {
  #mapChart { min-height: 260px; }
  .mapa-card-header { flex-direction: column; align-items: flex-start; }
}

/* ============ FILTERS ============ */
.filters {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-btn {
  padding: .4rem .85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: .88rem;
  font-family: var(--font);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.filter-btn:hover { border-color: var(--text-secondary); color: var(--text); }
.filter-btn.active {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}
.filter-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  align-self: center;
  margin: 0 .15rem;
}
.filter-nivel {
  padding: .4rem .75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  font-size: .82rem;
  font-family: var(--font);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.filter-nivel:hover,
.filter-nivel:focus-visible { border-color: var(--text-secondary); }
.filter-nivel .stat-dot { width: 7px; height: 7px; }
.filter-nivel.active {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}
.filter-nivel.active .dot-green,
.filter-nivel.active .dot-yellow,
.filter-nivel.active .dot-orange,
.filter-nivel.active .dot-red { background: var(--white); }

/* ============ SECTION (grupos por nivel) ============ */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}
.section-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}
.section-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.section-title {
  font-size: .88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-secondary);
}
.section-count {
  font-size: .8rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: .15rem .55rem;
  border-radius: 10px;
}

/* ============ COUNTRY GRID ============ */
.pais-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem;
  margin-bottom: 2rem;
}
.pais-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.pais-card:hover {
  border-color: var(--text-secondary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.pais-card:active {
  transform: translateY(0);
}
.pais-emoji { flex-shrink: 0; line-height: 0; }
.pais-emoji img { border-radius: 3px; vertical-align: middle; }
.pais-info { min-width: 0; }
.pais-nombre {
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pais-nivel-text { font-size: .82rem; margin-top: .15rem; }

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 20px;
  line-height: 1.3;
}
.badge-green  { background: var(--green-light);  color: var(--green);  border: 1px solid var(--green-border); }
.badge-yellow { background: var(--yellow-light); color: var(--yellow); border: 1px solid var(--yellow-border); }
.badge-orange { background: var(--orange-light); color: var(--orange); border: 1px solid var(--orange-border); }
.badge-red    { background: var(--red-light);    color: var(--red);    border: 1px solid var(--red-border); }

.text-green  { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-orange { color: var(--orange); }
.text-red    { color: var(--red); }

.dot-green  { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-orange { background: var(--orange); }
.dot-red    { background: var(--red); }

.bar-green  { background: var(--green); }
.bar-yellow { background: var(--yellow); }
.bar-orange { background: var(--orange); }
.bar-red    { background: var(--red); }

/* ============ INFO BOX (Homepage) ============ */
.info-box {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.info-box-inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}
.info-box-item h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .4rem;
  font-weight: 700;
}
.info-box-item p { font-size: .95rem; color: var(--text-secondary); line-height: 1.5; }
.info-box-item a { color: var(--green); text-decoration: none; }
.info-box-item a:hover { text-decoration: underline; }

/* ============ COUNTRY PAGE ============ */
.pais-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 1.5rem;
}
.pais-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.pais-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.pais-flag { flex-shrink: 0; line-height: 0; }
.pais-flag img { border-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.pais-header-info { flex: 1; }
.pais-header-info h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-bottom: .5rem;
}
.pais-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-bottom: .7rem;
}
.meta-chip {
  background: var(--bg);
  padding: .2rem .65rem;
  border-radius: 6px;
  font-size: .82rem;
  color: var(--text-secondary);
}
.pais-resumen {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: .25rem;
}

/* Alerta box */
.alerta-box {
  border-radius: var(--radius);
  padding: 1.15rem 1.5rem;
  border-left: 4px solid;
}
.alerta-box.nivel-1 { background: var(--green-light); border-color: var(--green); }
.alerta-box.nivel-2 { background: var(--yellow-light); border-color: var(--yellow); }
.alerta-box.nivel-3 { background: var(--orange-light); border-color: var(--orange); }
.alerta-box.nivel-4 { background: var(--red-light); border-color: var(--red); }
.alerta-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
}
.alerta-box.nivel-1 .alerta-label { color: var(--green); }
.alerta-box.nivel-2 .alerta-label { color: var(--yellow); }
.alerta-box.nivel-3 .alerta-label { color: var(--orange); }
.alerta-box.nivel-4 .alerta-label { color: var(--red); }
.alerta-text {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.65;
}
.alerta-date {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .6rem;
}

/* Content grid */
.content-grid {
  max-width: var(--max-w);
  margin: 1.75rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.75rem;
  align-items: start;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.15rem;
}
.card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: .45rem;
  letter-spacing: -.01em;
}
.card-icon { font-size: 1.05rem; }
.card-text {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  white-space: pre-line;
}
.card-text-truncated {
  max-height: 220px;
  overflow: hidden;
  position: relative;
  transition: max-height .4s ease;
}
.card-text-truncated::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(transparent, var(--bg-card));
}
.card-expand {
  display: block;
  margin-top: .6rem;
  font-size: .9rem;
  color: var(--green);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
  font-weight: 500;
  padding: 0;
}
.card-expand:hover,
.card-expand:focus-visible { text-decoration: underline; }

/* Sidebar */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: .85rem;
}
.sidebar-card h3 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .65rem;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .4rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .9rem;
  gap: .75rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); flex-shrink: 0; }
.info-value { color: var(--text); text-align: right; font-weight: 500; }

/* CTA seguro */
.seguro-cta {
  background: var(--green-light);
  border: 1px solid var(--green-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}
.seguro-cta h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .35rem;
}
.seguro-cta p { font-size: .88rem; color: var(--text-secondary); margin-bottom: .85rem; }
.btn-primary {
  display: block;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  padding: .6rem 1.15rem;
  border-radius: var(--radius);
  transition: opacity .15s;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}
.btn-primary:hover { opacity: .9; }
.btn-secondary {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .88rem;
  padding: .55rem 1rem;
  border-radius: var(--radius);
  margin-top: .5rem;
  transition: border-color .15s;
  text-align: center;
}
.btn-secondary:hover,
.btn-secondary:focus-visible { border-color: var(--text-secondary); color: var(--text); }

/* Otros destinos */
.otros-section {
  max-width: var(--max-w);
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}
.otros-section h3 {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: .85rem;
}
.otros-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.otro-chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .35rem .8rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: border-color .2s, color .2s, transform .15s;
}
.otro-chip:hover,
.otro-chip:focus-visible { border-color: var(--text-secondary); color: var(--text); transform: translateY(-1px); }
.otro-chip img { border-radius: 2px; vertical-align: middle; }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
  margin-top: 2rem;
  line-height: 1.6;
}
.site-footer a { color: var(--green); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ============ 404 ============ */
.page-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}
.page-404 h1 { font-size: 1.75rem; margin-bottom: .6rem; }
.page-404 p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1rem; }

/* ============ ACERCA / COMPARAR ============ */
.acerca-page,
.comparar-page {
  max-width: 740px;
  margin: 0 auto;
  padding: 2.25rem 1.5rem;
}
.acerca-inner h1,
.comparar-page h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -.03em;
}
.acerca-inner .card-text a { color: var(--green); text-decoration: none; }
.acerca-inner .card-text a:hover { text-decoration: underline; }

/* Comparador */
.comparar-selector {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.comparar-select {
  flex: 1;
  min-width: 180px;
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .92rem;
  font-family: var(--font);
  background: var(--bg-card);
  color: var(--text);
}
.comparar-btn {
  padding: .6rem 1.4rem;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: .92rem;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.comparar-btn:hover { opacity: .9; }
.comparar-grid {
  display: grid;
  gap: 1.15rem;
}
.comparar-grid[data-cols="2"] { grid-template-columns: 1fr 1fr; }
.comparar-grid[data-cols="3"] { grid-template-columns: 1fr 1fr 1fr; }
.comparar-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}
.comparar-col-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .85rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--border-light);
}
.comparar-col-header h3 { font-size: 1.05rem; font-weight: 700; }
.comparar-row {
  display: flex;
  justify-content: space-between;
  padding: .4rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .9rem;
  gap: .5rem;
}
.comparar-row:last-child { border-bottom: none; }
.comparar-row .info-label { color: var(--text-muted); flex-shrink: 0; }
.comparar-row .info-value { text-align: right; font-weight: 500; }
@media (max-width: 768px) {
  .comparar-grid[data-cols="2"],
  .comparar-grid[data-cols="3"] { grid-template-columns: 1fr; }
}

/* ============ NO RESULTS ============ */
.no-results {
  color: var(--text-muted);
  font-size: .95rem;
  padding: 1.25rem 0;
}

/* ============ SHARE BAR ============ */
.share-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.15rem;
  padding-top: .85rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.share-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-right: .15rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .3rem .7rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  line-height: 1.3;
}
.share-btn:hover,
.share-btn:focus-visible {
  border-color: var(--text-secondary);
  color: var(--text);
}
.share-twitter:hover { border-color: #1da1f2; color: #1da1f2; }
.share-whatsapp:hover { border-color: #25d366; color: #25d366; }
.share-facebook:hover { border-color: #1877f2; color: #1877f2; }
.share-copy:hover { border-color: var(--green); color: var(--green); }

/* ============ SEGURO PROVIDERS ============ */
.seguro-providers {
  display: flex;
  justify-content: center;
  gap: .75rem;
  margin-top: .6rem;
}
.seguro-providers a {
  font-size: .75rem;
  color: var(--text-muted);
  text-decoration: none;
}
.seguro-providers a:hover { color: var(--green); text-decoration: underline; }

/* ============ FOCUS & ACCESSIBILITY ============ */
*:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.pais-card:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
  border-color: var(--green);
}
.filter-btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.search-form input:focus-visible {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22,163,74,.12);
}

/* ============ SKELETON / LOADING ============ */
@keyframes skeleton-pulse {
  0%, 100% { opacity: .35; }
  50% { opacity: .12; }
}
.mapa-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  min-height: 400px;
  color: var(--text-muted);
  font-size: .9rem;
}
.mapa-skeleton {
  width: 85%;
  max-width: 600px;
  aspect-ratio: 2 / 1;
  background: var(--border-light);
  border-radius: var(--radius);
  animation: skeleton-pulse 1.8s ease-in-out infinite;
}

/* ============ CARD ANIMATIONS ============ */
@keyframes card-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.pais-grid .pais-card {
  animation: card-enter .3s ease both;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) and (min-width: 769px) {
  .content-grid { grid-template-columns: 1fr 280px; gap: 1.25rem; }
  .comparar-grid[data-cols="3"] { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }
  .pais-header-info h1 { font-size: 1.55rem; }
  .mapa-section, .section, .info-box { padding-left: 1.25rem; padding-right: 1.25rem; }
  .filters { padding-left: 1.25rem; padding-right: 1.25rem; }
}
@media (max-width: 768px) {
  .content-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.65rem; }
  .hero p { font-size: .95rem; }
  .pais-header-info h1 { font-size: 1.4rem; }
  .pais-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .stats { gap: 1rem; }
  .pais-header { gap: .85rem; }
  .pais-flag img { width: 48px; height: 36px; }
  .sidebar-col { order: 2; }
  .seguro-cta { margin-top: .5rem; }
  .alerta-box { padding: 1rem 1.15rem; }
  .mapa-loading { min-height: 240px; }
  .mapa-skeleton { width: 70%; }
  .acerca-page, .comparar-page { padding: 1.5rem 1.25rem; }
}
@media (max-width: 480px) {
  .hero { padding: 2.5rem 1.25rem 2rem; }
  .hero h1 { font-size: 1.5rem; }
  .pais-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .pais-card { padding: .7rem .8rem; }
  .pais-nombre { font-size: .88rem; }
  .pais-nivel-text { font-size: .78rem; }
  .header-source { display: none; }
  .pais-hero { padding: 1.5rem 1.15rem; }
  .pais-header { flex-direction: column; gap: .6rem; align-items: flex-start; }
  .pais-meta { gap: .35rem; }
  .meta-chip { font-size: .78rem; }
  .content-grid { padding: 0 1.15rem; gap: 1.15rem; }
  .otros-section { padding: 0 1.15rem; }
  .stats { padding: 1rem 1.15rem; gap: .85rem; justify-content: center; }
  .filters { padding: .85rem 1.15rem; }
  .card { padding: 1.25rem; }
  .card h2 { font-size: .95rem; }
  .card-text { font-size: .9rem; }
}

/* ============ PRINT ============ */
@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .theme-toggle, .search-form, .search-dropdown,
  .mapa-section, .filters, .share-bar, .seguro-cta, .seguro-providers,
  .card-expand, .btn-primary, .btn-secondary, .otros-section,
  .ad-banner, .filter-btn, .filter-nivel { display: none !important; }
  .content-grid { grid-template-columns: 1fr !important; }
  .card, .sidebar-card, .alerta-box { break-inside: avoid; border: 1px solid #ccc; }
  .card-text-truncated { max-height: none !important; overflow: visible !important; }
  .card-text-truncated::after { display: none; }
  .badge { border: 1px solid currentColor; }
  a { color: #000; text-decoration: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: .8em; color: #666; }
  a[href^="#"]::after, a[href^="javascript"]::after { content: none; }
  .pais-hero { border-bottom: 2px solid #000; padding: 1rem 0; }
  .stats { border: 1px solid #ccc; padding: .5rem; }
}
