/* ============================================================
   COMPARADOR DE PÓLIZAS · Tool page styles
   ============================================================ */

/* Hero */
.cmp-hero {
  margin-top: 70px;
  padding: 80px 24px 56px;
  background: linear-gradient(135deg, #091930 0%, #0D2B4A 55%, #1A3A5C 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cmp-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 700px 460px at 12% 22%, rgba(42, 134, 199, 0.22), transparent 60%),
    radial-gradient(ellipse 540px 320px at 88% 78%, rgba(212, 168, 83, 0.16), transparent 60%);
  pointer-events: none;
}
.cmp-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.cmp-breadcrumb {
  display: inline-block;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.cmp-breadcrumb:hover { color: #fff; }
.cmp-hero-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--color-gold, #D4A853);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.cmp-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  max-width: 880px;
}
.cmp-hero h1 .accent {
  background: linear-gradient(90deg, #D4A853, #F0CE82);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cmp-hero-lede {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  max-width: 760px;
  margin: 0;
}

/* Stage */
.cmp-stage {
  background: #F7F9FC;
  padding: 40px 16px 64px;
  min-height: 600px;
}

/* Container inside React */
.cmp-wrap {
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Inter', system-ui, sans-serif;
  color: #0f172a;
}

/* Banners */
.cmp-banner {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #334155;
}
.cmp-banner-icon { flex-shrink: 0; margin-top: 2px; }
.cmp-banner strong { color: #091930; }
.cmp-banner-blue {
  background: #EBF4FB;
  border-color: #2A86C7;
}
.cmp-banner-blue .cmp-banner-icon { color: #2A86C7; }
.cmp-banner-gold {
  background: #FEF7E7;
  border: none;
  border-left: 4px solid #D4A853;
  border-radius: 8px;
}
.cmp-banner-gold .cmp-banner-icon { color: #D4A853; }

/* Info toggle */
.cmp-info-toggle {
  background: none;
  border: none;
  color: #2A86C7;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
  margin: 18px 0 6px;
}
.cmp-info-toggle:hover { text-decoration: underline; }

.cmp-info-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 22px;
  margin: 10px 0 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.cmp-info-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: #091930;
  margin: 0 0 8px;
}
.cmp-info-card p {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  margin: 0 0 8px;
}
.cmp-info-card .cmp-info-divider {
  border-top: 1px solid #E2E8F0;
  margin: 16px 0;
}
.cmp-info-card ul { margin: 8px 0 0 18px; padding: 0; }
.cmp-info-card li { font-size: 14px; color: #334155; margin: 4px 0; }
.cmp-info-note {
  background: #F1F5F9;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: #475569;
  margin-top: 10px;
}

/* Section card */
.cmp-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  margin-bottom: 20px;
}
.cmp-card-pad { padding: 22px; }
.cmp-card-head {
  padding: 14px 22px;
  border-bottom: 1px solid #E2E8F0;
  font-size: 13px;
  font-weight: 600;
  color: #091930;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 12px 12px 0 0;
}

/* Section heading */
.cmp-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #091930;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 16px;
}

/* Global params */
.cmp-global-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 720px) { .cmp-global-grid { grid-template-columns: 1fr; } }

.cmp-label {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.cmp-label-sm {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 5px;
  display: block;
}

/* Inputs */
.cmp-input-wrap {
  position: relative;
}
.cmp-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cmp-input:focus {
  outline: none;
  border-color: #2A86C7;
  box-shadow: 0 0 0 3px rgba(42,134,199,0.15);
}
.cmp-input.has-prefix { padding-left: 26px; }
.cmp-input.has-suffix { padding-right: 50px; }
.cmp-input-prefix,
.cmp-input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 13px;
  pointer-events: none;
}
.cmp-input-prefix { left: 12px; }
.cmp-input-suffix { right: 12px; }

select.cmp-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* Tooltip */
.cmp-tt { position: relative; display: inline-flex; margin-left: 6px; }
.cmp-tt-icon { width: 14px; height: 14px; color: #94a3b8; cursor: help; }
.cmp-tt-body {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  padding: 8px 10px;
  border-radius: 6px;
  width: 240px;
  z-index: 50;
  pointer-events: none;
  text-transform: none;
  letter-spacing: 0;
  transition: opacity 0.15s;
}
.cmp-tt:hover .cmp-tt-body { visibility: visible; opacity: 1; }

/* Toggle */
.cmp-toggle {
  background: none; border: none; padding: 0;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; width: 100%; text-align: left;
}
.cmp-toggle-track {
  position: relative;
  width: 36px; height: 20px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.cmp-toggle.is-on .cmp-toggle-track { background: #2A86C7; }
.cmp-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cmp-toggle.is-on .cmp-toggle-thumb { transform: translateX(16px); }
.cmp-toggle-label {
  font-size: 14px; font-weight: 600; color: #334155;
}

/* Policy grid */
.cmp-policy-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}
.cmp-policy-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cmp-policy-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cmp-policy-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1280px) { .cmp-policy-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) {
  .cmp-policy-grid.cols-2,
  .cmp-policy-grid.cols-3,
  .cmp-policy-grid.cols-4 { grid-template-columns: 1fr; }
}

.cmp-policy {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  overflow: hidden;
}
.cmp-policy-head {
  background: #091930;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}
.cmp-policy-body { padding: 18px 20px; }
.cmp-field { margin-bottom: 12px; }
.cmp-field:last-of-type { margin-bottom: 0; }

.cmp-optional {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
}
.cmp-optional-toggle {
  background: none; border: none; padding: 0;
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; cursor: pointer;
  font-size: 11px; font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.cmp-optional-toggle:hover { color: #091930; }
.cmp-optional-body { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }

.cmp-opt-block {
  padding: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
}
.cmp-opt-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin: 6px 0 0;
}
.cmp-opt-fields { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }

/* Results header */
.cmp-results-title {
  font-size: 22px;
  font-weight: 700;
  color: #091930;
  margin: 8px 0 18px;
  letter-spacing: -0.01em;
}

/* Scorecards */
.cmp-score-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}
.cmp-score-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cmp-score-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cmp-score-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1280px) { .cmp-score-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) {
  .cmp-score-grid.cols-2,
  .cmp-score-grid.cols-3,
  .cmp-score-grid.cols-4 { grid-template-columns: 1fr; }
}

.cmp-score {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  overflow: hidden;
}
.cmp-score-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #E2E8F0;
}
.cmp-score-name {
  font-size: 14px; font-weight: 600; color: #091930;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cmp-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.cmp-badge-best { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.cmp-badge-worst { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.cmp-badge-alt { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }

.cmp-score-body { padding: 18px 20px; }
.cmp-score-row {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; margin-top: 12px;
  border-top: 1px solid #F1F5F9;
}
.cmp-score-row:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.cmp-score-label {
  font-size: 11px; font-weight: 600;
  color: #64748b;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.cmp-npc {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.02em;
  color: #334155;
  line-height: 1.1;
  margin-top: 4px;
}
.cmp-npc.is-best { color: #059669; }
.cmp-npc.is-worst { color: #DC2626; }
.cmp-npc-note { font-size: 12px; color: #64748b; margin-top: 4px; }
.cmp-score-val { font-size: 14px; font-weight: 600; color: #334155; }
.cmp-score-val.is-good { color: #059669; }

.cmp-totals { margin-top: 12px; padding-top: 12px; border-top: 1px solid #F1F5F9; }
.cmp-totals-row {
  display: flex; justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
}
.cmp-totals-row span:first-child { color: #64748b; }
.cmp-totals-row span:last-child { color: #334155; font-weight: 500; }

/* Ranking table */
.cmp-table-wrap { overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp-table thead tr {
  background: #F7F9FC;
  border-bottom: 1px solid #E2E8F0;
}
.cmp-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px;
}
.cmp-table th.t-right { text-align: right; }
.cmp-table th.t-center { text-align: center; }
.cmp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
}
.cmp-table td.t-right { text-align: right; }
.cmp-table td.t-center { text-align: center; }
.cmp-table tr.is-first { background: #ECFDF5; }
.cmp-table tr:hover:not(.is-first) { background: #F8FAFC; }

.cmp-rank-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: #F1F5F9; color: #475569;
}
.cmp-rank-pill.is-first { background: #10B981; color: #fff; }

.cmp-cell-name { font-weight: 600; color: #091930; }
.cmp-cell-npc-best { color: #059669; font-weight: 700; }
.cmp-cell-npc-worst { color: #DC2626; font-weight: 700; }
.cmp-cell-npc { font-weight: 600; }

/* Decision guide */
.cmp-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 760px) { .cmp-guide { grid-template-columns: 1fr; } }
.cmp-guide-item {
  padding: 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
  border: 1px solid;
}
.cmp-guide-item strong { display: block; margin-bottom: 4px; }
.cmp-guide-green { background: #ECFDF5; border-color: #A7F3D0; }
.cmp-guide-green strong { color: #065F46; }
.cmp-guide-slate { background: #F8FAFC; border-color: #E2E8F0; }
.cmp-guide-slate strong { color: #334155; }
.cmp-guide-gold { background: #FEF7E7; border-color: #F0DCA8; }
.cmp-guide-gold strong { color: #091930; }
.cmp-guide-red { background: #FEF2F2; border-color: #FECACA; }
.cmp-guide-red strong { color: #991B1B; }

/* Footer note */
.cmp-tool-foot {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 24px;
  padding-bottom: 8px;
}

/* Final CTA */
.cmp-cta {
  background: #F7F9FC;
  padding: 48px 24px;
}
.cmp-cta-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(135deg, #091930, #1A3A5C);
  border-radius: 16px;
  padding: 40px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  color: #fff;
  flex-wrap: wrap;
}
.cmp-cta-inner h3 { color: #fff; font-size: 24px; margin: 0 0 8px; }
.cmp-cta-inner p { color: rgba(255,255,255,0.78); margin: 0; max-width: 560px; }
.cmp-cta-btn {
  background: #25D366;
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cmp-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
  color: #fff;
}
