/* ==========================================================================
   VPSHosting.blog — Professional Side-by-Side Comparison Engine CSS
   ========================================================================== */

:root {
  --cmp-primary: #059669;
  --cmp-primary-dark: #047857;
  --cmp-primary-light: #ecfdf5;
  --cmp-primary-border: #a7f3d0;
  --cmp-card-bg: #ffffff;
  --cmp-card-border: #e2e8f0;
  --cmp-header-bg: #f8fafc;
  --cmp-stripe-bg: #f8fafc;
  --cmp-text-muted: #64748b;
  --cmp-text-dark: #0f172a;
  --cmp-winner-bg: #dcfce7;
  --cmp-winner-text: #15803d;
  --cmp-winner-border: #86efac;
}

[data-theme="dark"] {
  --cmp-primary: #10b981;
  --cmp-primary-dark: #059669;
  --cmp-primary-light: rgba(16, 185, 129, 0.12);
  --cmp-primary-border: rgba(16, 185, 129, 0.28);
  --cmp-card-bg: #0d1527;
  --cmp-card-border: #1e293b;
  --cmp-header-bg: #111d33;
  --cmp-stripe-bg: #0f172a;
  --cmp-text-muted: #94a3b8;
  --cmp-text-dark: #f1f5f9;
  --cmp-winner-bg: rgba(16, 185, 129, 0.18);
  --cmp-winner-text: #34d399;
  --cmp-winner-border: rgba(52, 211, 153, 0.35);
}

/* Hero Section */
.cmp-hero {
  position: relative;
  background: radial-gradient(1000px 400px at 50% -10%, rgba(16, 185, 129, 0.15), transparent 70%),
              radial-gradient(800px 300px at 90% 20%, rgba(59, 130, 246, 0.12), transparent 60%),
              linear-gradient(180deg, #090e17 0%, #0f172a 100%);
  color: #fff;
  padding: 18px 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.cmp-hero .badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.cmp-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 14px;
}

.cmp-hero h1 span.gradient-text {
  background: linear-gradient(135deg, #34d399 0%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cmp-hero p.lead {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Preset Comparisons Strip */
.cmp-presets-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cmp-presets-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cmp-preset-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cmp-preset-pill:hover,
.cmp-preset-pill.active {
  background: var(--cmp-primary);
  border-color: var(--cmp-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Action Bar */
.cmp-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  background: var(--cmp-card-bg);
  border: 1px solid var(--cmp-card-border);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cmp-action-bar .left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cmp-text-muted);
  font-size: 0.92rem;
}

.cmp-action-bar .right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Compare Matrix Table */
.cmp-table-container {
  background: var(--cmp-card-bg);
  border: 1px solid var(--cmp-card-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
}

.cmp-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cmp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
  margin-bottom: 0;
}

/* Sticky First Column for Specs */
.cmp-table th.col-spec,
.cmp-table td.col-spec {
  position: sticky;
  left: 0;
  z-index: 10;
  width: 220px;
  min-width: 200px;
  max-width: 240px;
  background: var(--cmp-card-bg);
  border-right: 2px solid var(--cmp-card-border);
  box-shadow: 4px 0 10px -2px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .cmp-table th.col-spec,
[data-theme="dark"] .cmp-table td.col-spec {
  background: #0d1527;
  box-shadow: 4px 0 10px -2px rgba(0, 0, 0, 0.35);
}

.cmp-table tr:nth-child(even) td.col-spec {
  background: var(--cmp-stripe-bg);
}

/* Header Columns */
.cmp-table thead th {
  background: var(--cmp-header-bg);
  padding: 24px 20px;
  vertical-align: top;
  border-bottom: 2px solid var(--cmp-card-border);
  border-right: 1px solid var(--cmp-card-border);
  text-align: center;
}

.cmp-table thead th:last-child {
  border-right: none;
}

.cmp-table thead th.col-spec {
  text-align: left;
  vertical-align: middle;
  padding: 20px;
  background: var(--cmp-header-bg);
}

.cmp-header-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  position: relative;
}

.cmp-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cmp-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cmp-provider-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--cmp-text-dark);
  margin-bottom: 2px;
  text-decoration: none;
}

.cmp-provider-title:hover {
  color: var(--cmp-primary);
}

.cmp-plan-subtitle {
  font-size: 0.86rem;
  color: var(--cmp-text-muted);
  font-weight: 600;
}

.cmp-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
}

[data-theme="dark"] .cmp-rating-badge {
  color: #fbbf24;
}

.cmp-badge-recommend {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--cmp-winner-bg);
  color: var(--cmp-winner-text);
  border: 1px solid var(--cmp-winner-border);
}

.cmp-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.cmp-btn-swap {
  background: none;
  border: 1px solid var(--cmp-card-border);
  color: var(--cmp-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cmp-btn-swap:hover {
  background: var(--cmp-header-bg);
  color: var(--cmp-text-dark);
  border-color: var(--cmp-primary);
}

.cmp-btn-remove {
  background: none;
  border: 1px solid transparent;
  color: #ef4444;
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cmp-btn-remove:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Empty Column Card */
.cmp-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 20px;
  border: 2px dashed var(--cmp-card-border);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.01);
  transition: all 0.2s ease;
}

.cmp-empty-card:hover {
  border-color: var(--cmp-primary);
  background: var(--cmp-primary-light);
}

.cmp-empty-card i {
  font-size: 2.2rem;
  color: var(--cmp-primary);
}

.cmp-empty-card span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cmp-text-dark);
}

/* Section Group Rows */
.cmp-table tr.group-header th {
  background: #0f172a;
  color: #38bdf8;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 12px 20px;
  border-top: 1px solid var(--cmp-card-border);
  border-bottom: 1px solid var(--cmp-card-border);
}

.cmp-table tr.group-header th i {
  margin-right: 6px;
  color: #34d399;
}

/* Table Cells */
.cmp-table tbody td {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid var(--cmp-card-border);
  border-right: 1px solid var(--cmp-card-border);
  text-align: center;
  font-size: 0.95rem;
  color: var(--cmp-text-dark);
}

.cmp-table tbody td:last-child {
  border-right: none;
}

.cmp-table tbody td.col-spec {
  text-align: left;
  font-weight: 700;
  color: var(--cmp-text-dark);
  font-size: 0.92rem;
}

.cmp-table tbody td.col-spec small {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--cmp-text-muted);
  margin-top: 2px;
}

.cmp-table tbody tr:nth-child(even) td {
  background: var(--cmp-stripe-bg);
}

/* Winner & Highlights */
.spec-winner {
  position: relative;
  background: var(--cmp-winner-bg) !important;
  color: var(--cmp-winner-text) !important;
  font-weight: 700;
}

.spec-winner-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--cmp-winner-text);
  color: #ffffff;
  margin-left: 6px;
}

.cmp-price-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #059669;
}

[data-theme="dark"] .cmp-price-value {
  color: #34d399;
}

.cmp-price-unit {
  font-size: 0.85rem;
  color: var(--cmp-text-muted);
  font-weight: 500;
}

/* CTA Deploy Button */
.cmp-btn-deploy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
  padding: 12px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.cmp-btn-deploy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
  color: #ffffff !important;
}

/* Feature checklist */
.cmp-check {
  color: #10b981;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.cmp-cross {
  color: #94a3b8;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Educational Content Section */
.cmp-guide-section {
  margin-top: 50px;
  margin-bottom: 40px;
}

.cmp-guide-card {
  background: var(--cmp-card-bg);
  border: 1px solid var(--cmp-card-border);
  border-radius: 14px;
  padding: 26px 24px;
  height: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease;
}

.cmp-guide-card:hover {
  transform: translateY(-3px);
  border-color: var(--cmp-primary);
}

.cmp-guide-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cmp-primary-light);
  color: var(--cmp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.cmp-guide-card h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--cmp-text-dark);
}

.cmp-guide-card p {
  font-size: 0.92rem;
  color: var(--cmp-text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* FAQ Accordion */
.cmp-faq-section {
  margin-top: 40px;
  margin-bottom: 50px;
}

.cmp-accordion .accordion-item {
  background: var(--cmp-card-bg);
  border: 1px solid var(--cmp-card-border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.cmp-accordion .accordion-button {
  background: var(--cmp-card-bg);
  color: var(--cmp-text-dark);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 18px 22px;
  box-shadow: none;
}

.cmp-accordion .accordion-button:not(.collapsed) {
  background: var(--cmp-header-bg);
  color: var(--cmp-primary);
}

.cmp-accordion .accordion-body {
  color: var(--cmp-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  padding: 20px 24px;
  background: var(--cmp-card-bg);
}

/* Search Modal */
.cmp-modal-search {
  position: relative;
  margin-bottom: 20px;
}

.cmp-modal-search input {
  padding-left: 42px;
  border-radius: 10px;
  border: 1px solid var(--cmp-card-border);
  height: 48px;
  font-size: 0.98rem;
}

.cmp-modal-search i {
  position: absolute;
  left: 14px;
  top: 15px;
  color: var(--cmp-text-muted);
  font-size: 1.1rem;
}

.cmp-provider-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--cmp-card-border);
  margin-bottom: 8px;
  background: var(--cmp-card-bg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmp-provider-list-item:hover {
  background: var(--cmp-header-bg);
  border-color: var(--cmp-primary);
  transform: translateX(3px);
}

.cmp-provider-list-item .meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmp-provider-list-item img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: 3px;
}

/* Toast Notice */
.cmp-toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #0f172a;
  color: #fff;
  border: 1px solid #10b981;
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.cmp-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .cmp-hero h1 { font-size: 2rem; }
  .cmp-hero { padding: 22px 0 24px; }
  .cmp-table th.col-spec, .cmp-table td.col-spec {
    width: 170px;
    min-width: 160px;
  }
}

@media (max-width: 768px) {
  .cmp-hero h1 { font-size: 1.75rem; }
  .cmp-hero p.lead { font-size: 0.98rem; }
  .cmp-presets-wrap { flex-direction: column; align-items: flex-start; }
  .cmp-table th.col-spec, .cmp-table td.col-spec {
    width: 140px;
    min-width: 130px;
    font-size: 0.84rem;
    padding: 12px 10px;
  }
  .cmp-table thead th { padding: 16px 12px; }
  .cmp-table tbody td { padding: 12px 10px; font-size: 0.88rem; }
  .cmp-logo-wrap { width: 48px; height: 48px; }
  .cmp-provider-title { font-size: 1.05rem; }
  .cmp-price-value { font-size: 1.3rem; }
}
