/* ============================================================
   InsureBuddy — Compare Page (Mobile-First, Clean Rewrite)
   ============================================================ */

/* ─── Hero ────────────────────────────────────────────────── */
.cmp-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 50%, #F0F9FF 100%);
  border-bottom: 1px solid var(--border);
}

/* ─── Policy Card ─────────────────────────────────────────── */
.cmp-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px 16px;
  border: 2px solid transparent;
  transition: box-shadow 0.2s ease;
}
.cmp-card:hover {
  box-shadow: 0 8px 32px rgba(59,130,246,0.1);
}

/* Card top row: identity + score badges */
.cmp-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.cmp-card-identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.cmp-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── Stats Grid: 2 col on mobile, 4 col on tablet+ ──────── */
.cmp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.cmp-stat-box {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 12px;
}
.cmp-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text2);
  margin-bottom: 4px;
}
.cmp-stat-val {
  font-size: 13px;
  font-weight: 700;
}

/* ─── Pros & Cons: stacked on mobile, side-by-side on tablet ─ */
.cmp-pros-cons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

/* ─── Actions: stacked on mobile ─────────────────────────── */
.cmp-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmp-actions a,
.cmp-actions button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  border-radius: 12px !important;
}

/* ═══════════════════════════════════════
   TABLET ≥ 768px
═══════════════════════════════════════ */
@media (min-width: 768px) {
  .cmp-card {
    padding: 28px;
    border-radius: 24px;
  }
  .cmp-card-top {
    align-items: center;
  }
  .cmp-card-badges {
    flex-direction: row;
    align-items: center;
  }
  .cmp-stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  .cmp-pros-cons {
    flex-direction: row;
  }
  .cmp-pros-cons > div {
    flex: 1;
  }
  .cmp-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cmp-actions a,
  .cmp-actions button {
    width: auto;
    border-radius: 100px !important;
  }
}

/* ── Fluid Responsive Sizing for Small Desktops ── */
@media(max-width: 1440px) {
  .ib-comp-header, .ib-comp-row { padding: 16px; }
  .ib-comp-plan-header { padding: 20px 16px; }
  .ib-comp-feat-item { font-size: 13px; gap: 6px; }
  .ib-comp-value { font-size: 13px; }
}

@media(max-width: 1250px) {
  .ib-comp-header, .ib-comp-row { padding: 12px; gap: 12px; }
  .ib-comp-plan-header { padding: 16px 12px; }
  .ib-comp-feat-item { font-size: 12px; }
  .ib-comp-value { font-size: 12px; }
  .ib-comp-title { font-size: 15px; }
  .ib-comp-insurer { font-size: 12px; }
}
