/* ═══════════════════════════════════════════════════
   COMPARISON PAGE STYLES — TechStackToday
   Typography scale (mobile-first, 16px base):
     xs  = 0.75rem  / 12px
     sm  = 0.875rem / 14px
     base= 1rem     / 16px
     md  = 1.0625rem/ 17px
     lg  = 1.125rem / 18px
═══════════════════════════════════════════════════ */

/* ── COMPARISON HERO ── */
.tst-page-hero {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 48px 0 38px; text-align: center; width: 100%; overflow-x: hidden;
}
.tst-page-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
  color: var(--sky-mid); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 16px;
}
.tst-page-hero h1 {
  font-size: clamp(1.5rem, 5vw, 2.6rem); font-weight: 800; color: white;
  margin-bottom: 14px; padding: 0 8px; line-height: 1.2;
}
.tst-page-hero p {
  color: rgba(255,255,255,0.75); font-size: 1rem;
  max-width: 560px; margin: 0 auto 20px; line-height: 1.75;
}
.tst-page-hero-meta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.tst-page-hero-meta span {
  display: flex; align-items: center; gap: 5px;
  color: rgba(255,255,255,0.5); font-size: 0.8rem;
}

/* ── JUMP NAV ── */
.tst-jumpnav {
  background: #fff; border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 64px; z-index: 90; width: 100%; overflow: hidden;
}
.tst-jnav-row { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tst-jnav-row::-webkit-scrollbar { display: none; }
.tst-jlnk {
  flex-shrink: 0; padding: 13px 16px; font-size: 0.9rem; font-weight: 600;
  color: var(--gray-500); border-bottom: 2px solid transparent;
  white-space: nowrap; cursor: pointer; transition: all 0.18s;
}
.tst-jlnk:hover, .tst-jlnk.on { color: var(--blue); border-bottom-color: var(--blue); }

/* ── PAGE LAYOUT ── */
.tst-pg { padding: 24px 0 56px; width: 100%; }
.tst-two-col { display: block; }
@media (min-width: 960px) {
  .tst-two-col { display: grid; grid-template-columns: 1fr 268px; gap: 28px; align-items: start; }
}
.tst-main-col { min-width: 0; width: 100%; }
.tst-side-col { display: none; }
@media (min-width: 960px) { .tst-side-col { display: block; position: sticky; top: 120px; } }
@media (max-width: 959px) { .tst-main-col { padding-left: 2px; padding-right: 2px; } }

/* ── EDITORIAL ── */
.tst-editorial {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 32px 20px 24px; margin-top: 24px; margin-bottom: 20px;
  position: relative; width: 100%;
}
@media (min-width: 480px) { .tst-editorial { padding: 32px 28px 26px; } }
.tst-ed-pill {
  position: absolute; top: -13px; left: 18px; background: var(--blue); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 14px; border-radius: 100px;
  box-shadow: 0 2px 8px rgba(26,86,219,.25); white-space: nowrap;
}
.tst-editorial p { color: var(--gray-600); font-size: 1rem; line-height: 1.8; margin-bottom: 12px; }
.tst-editorial p:last-child { margin-bottom: 0; }
.tst-editorial strong { color: var(--navy); }

/* ── FILTER BAR ── */
.tst-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; width: 100%; }
.tst-f-lbl { font-size: 0.875rem; font-weight: 600; color: var(--gray-500); }
.tst-fb {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: 8px;
  padding: 7px 15px; font-size: 0.875rem; font-weight: 600; color: var(--gray-600);
  cursor: pointer; transition: all 0.18s; font-family: 'DM Sans', sans-serif;
}
.tst-fb:hover, .tst-fb.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ══════════════════════════════════════════
   SERVICE CARDS — New 3-zone design
   Mobile: Identity → Chips → Single CTA → Expand
   Desktop: 3-col header → Chips → Expand
══════════════════════════════════════════ */
.tst-stack { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; width: 100%; }

/* ── Card wrapper ── */
.tst-card {
  background: #fff; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
  position: relative; width: 100%; max-width: 100%;
}
.tst-card:hover { box-shadow: 0 6px 32px rgba(11,29,58,.1); }
.tst-card.tst-win {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,.12), 0 6px 28px rgba(26,86,219,.1);
}

/* ── Ribbon — full-width top bar ── */
.tst-ribbon {
  font-family: 'Sora', sans-serif; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: white; text-align: center; padding: 7px 14px;
  width: 100%;
}

/* ── ZONE 1: Identity ── */
.tst-z1 {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 10px;
}
.tst-svc-logo {
  width: 48px; height: 48px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 900; font-size: 1.2rem;
  flex-shrink: 0;
}
.tst-card-info { flex: 1; min-width: 0; }
.tst-svc-name {
  font-family: 'Sora', sans-serif; font-size: 1.05rem; font-weight: 800;
  color: var(--navy); display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px; margin-bottom: 2px; line-height: 1.2;
}
.tst-svc-tag { color: var(--gray-500); font-size: 0.8rem; margin-bottom: 5px; line-height: 1.4; }
.tst-stars-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tst-stars  { color: var(--amber); font-size: 0.88rem; letter-spacing: 1px; }
.tst-score  { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 0.9rem; color: var(--navy); }
.tst-rev-ct { font-size: 0.75rem; color: var(--gray-400); }

/* ── ZONE 2: Chips ── */
.tst-z2 {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 0 16px 12px;
}
.tst-chips  { display: flex; gap: 5px; flex-wrap: wrap; }
.tst-chip   { font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.tst-chip-b { background: var(--sky); color: var(--blue); }
.tst-chip-g { background: var(--accent-bg); color: var(--accent-dark); }
.tst-chip-o { background: #fff7ed; color: #c2410c; }
.tst-chip-p { background: #f5f3ff; color: #7c3aed; }

/* ── ZONE 3: Single Primary CTA ── */
.tst-z3 { padding: 0 16px 6px; }
.tst-primary-cta {
  display: block; width: 100%;
  background: var(--accent); color: #fff !important;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1rem;
  padding: 14px 20px; border-radius: 12px; border: none;
  text-align: center; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 14px rgba(6,201,122,.28);
  transition: background 0.18s, transform 0.18s;
}
.tst-primary-cta:hover { background: var(--accent-dark); transform: translateY(-1px); color: #fff !important; }
.tst-primary-cta.alt {
  background: transparent; color: var(--blue) !important;
  border: 1.5px solid var(--blue); box-shadow: none;
}
.tst-primary-cta.alt:hover { background: var(--blue); color: #fff !important; transform: none; }
.tst-cta-note {
  text-align: center; font-size: 0.7rem; color: var(--gray-400);
  padding: 5px 16px 10px; line-height: 1.4;
}

/* ── Expand toggle button ── */
.tst-xbtn {
  width: 100%; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gray-50); border: none; border-top: 1px solid var(--gray-100);
  font-size: 0.78rem; font-weight: 600; color: var(--gray-600);
  cursor: pointer; transition: background 0.18s, color 0.18s;
  font-family: 'DM Sans', sans-serif;
}
.tst-xbtn:hover { background: var(--blue-pale); color: var(--blue); }
.tst-xi { transition: transform 0.25s; font-size: 0.68rem; color: var(--blue); }
.tst-xbtn.open .tst-xi { transform: rotate(180deg); }

/* ── Expandable details panel ── */
.tst-xpanel {
  display: none; padding: 16px 16px 20px;
  border-top: 1px solid var(--gray-100); background: #fff;
}
.tst-xpanel.open { display: block; }

/* Summary */
.tst-summary {
  font-size: 0.875rem; line-height: 1.7; color: var(--gray-600); margin-bottom: 14px;
}
.tst-summary strong { color: var(--navy); }

/* Metrics */
.tst-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.tst-met {
  background: var(--gray-50); border-radius: 10px; padding: 11px;
  text-align: center; border: 1px solid var(--gray-100);
}
.tst-met-val { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--navy); display: block; }
.tst-met-lbl { font-size: 0.7rem; color: var(--gray-500); }

/* Pros / Cons */
.tst-pc-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tst-pc-ttl {
  font-size: 0.7rem; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 7px;
}
.tst-pc-list { list-style: none; }
.tst-pc-list li { font-size: 0.78rem; color: var(--gray-600); padding: 2px 0; line-height: 1.45; }
.tst-pros .tst-pc-list li::before { content: '✓ '; color: var(--accent); font-weight: 700; }
.tst-cons .tst-pc-list li::before { content: '✗ '; color: #ef4444; font-weight: 700; }

/* Feature grid */
.tst-feat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 12px;
}
.tst-feat { font-size: 0.76rem; color: var(--gray-500); padding: 3px 0; }
.tst-feat.y { color: var(--accent-dark); }
.tst-best-for {
  font-size: 0.82rem; color: var(--gray-600); line-height: 1.55;
  padding: 10px 12px; background: var(--blue-pale); border-radius: 8px;
  border-left: 3px solid var(--blue);
}

/* ── DESKTOP overrides (≥ 960px) ── */
@media (min-width: 960px) {
  /* Zone 1 becomes 3-col grid: logo | info | CTA */
  .tst-z1 {
    display: grid; grid-template-columns: 68px 1fr 185px;
    gap: 0; padding: 22px 24px 0; align-items: center;
  }
  .tst-svc-logo { width: 54px; height: 54px; border-radius: 13px; font-size: 1.3rem; }
  .tst-card-info { padding: 0 18px; }
  .tst-svc-name { font-size: 1.1rem; }
  .tst-svc-tag  { font-size: 0.84rem; }
  .tst-stars    { font-size: 0.92rem; }
  .tst-score    { font-size: 0.95rem; }

  /* CTA column replaces Zone 3 on desktop */
  .tst-desk-cta { display: flex !important; flex-direction: column; gap: 6px; align-items: stretch; }
  .tst-primary-cta { font-size: 0.88rem; padding: 13px 16px; border-radius: 10px; }
  .tst-cta-note { text-align: center; font-size: 0.7rem; padding: 0; }

  /* Zone 2 chips */
  .tst-z2 { padding: 12px 24px 0; }

  /* Zone 3 hidden on desktop — CTA is in the z1 grid */
  .tst-z3 { display: none; }

  /* Expand button */
  .tst-xbtn { padding: 11px 24px; }

  /* Details panel — 3-col grid on desktop */
  .tst-xpanel { padding: 18px 24px 24px; }
  .tst-pc-wrap { grid-template-columns: 1fr 1fr 1fr; }
  .tst-feat-grid { grid-template-columns: 1fr 1fr 1fr; }
  .tst-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* Hide the old card elements we no longer use */
.tst-mob-card-head, .tst-card-top-desk, .tst-card-body, .tst-card-foot { display: none !important; }
.tst-desk-go-btn.alt:hover { background: var(--blue); color: #fff; }
.tst-cta-note { font-size: 0.75rem; color: var(--gray-400); text-align: center; }


/* ══════════════════════════════════════════
   COMPARISON TABLE
══════════════════════════════════════════ */
.tst-tbl-sec { margin-bottom: 48px; width: 100%; }
.tst-tbl-hint {
  font-size: 0.8rem; color: var(--gray-400); margin-bottom: 8px;
  display: flex; align-items: center; gap: 4px;
}
@media (min-width: 700px) { .tst-tbl-hint { display: none; } }
.tst-tbl-wrap {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg);
  overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; max-width: 100%;
}
.tst-tbl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 520px; }
.tst-tbl thead tr { background: var(--navy); }
.tst-tbl th {
  padding: 14px 12px; font-family: 'Sora', sans-serif; font-size: 0.8rem;
  font-weight: 700; color: rgba(255,255,255,0.6); text-align: left;
  white-space: nowrap; vertical-align: middle;
}
.tst-tbl th.tst-wc { color: #fff; }
/* Logo + name in header cell */
.tst-tbl thead th > div { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 80px; padding: 2px 0; }
.tst-tbl thead th span  { display: block; font-size: 0.78rem; text-align: center; }
.tst-tbl td {
  padding: 12px 12px; border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem; color: var(--gray-600); vertical-align: middle;
}
.tst-tbl tr:last-child td { border-bottom: none; }
.tst-tbl tr:nth-child(even) td { background: var(--gray-50); }
.tst-tbl .tst-rl {
  font-weight: 700; color: var(--navy); background: var(--gray-50) !important;
  font-size: 0.875rem; white-space: nowrap;
}
.tst-tbl .tst-wc { background: rgba(26,86,219,.04) !important; }
.tst-tick { color: var(--accent); font-weight: 700; }
.tst-cross { color: var(--red); }
.tst-part  { color: var(--amber); }
.tst-tc {
  font-size: 0.8rem; padding: 8px 14px; border-radius: 8px; color: #fff;
  font-weight: 700; display: inline-block; white-space: nowrap; transition: opacity 0.18s;
}
.tst-tc:hover { opacity: 0.85; }
/* Sticky first column on mobile */
@media (max-width: 699px) {
  .tst-tbl-wrap { position: relative; }
  .tst-tbl .tst-rl {
    position: sticky; left: 0; z-index: 2;
    background: var(--gray-50) !important; border-right: 2px solid var(--gray-200);
    min-width: 110px; max-width: 110px;
  }
  .tst-tbl thead tr th:first-child {
    position: sticky; left: 0; z-index: 3;
    background: var(--navy); border-right: 2px solid rgba(255,255,255,.15); min-width: 110px;
  }
  .tst-tbl tr:nth-child(even) td.tst-rl { background: var(--gray-100) !important; }
}

/* ── TRUST BADGES ── */
.tst-badges { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin: 32px 0; width: 100%; }
@media (max-width: 460px) { .tst-badges { grid-template-columns: 1fr; } }
.tst-badge {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 18px 14px; text-align: center;
}
.tst-badge-ico { font-size: 1.6rem; margin-bottom: 8px; display: block; }
.tst-badge h4  { font-size: 0.9rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.tst-badge p   { font-size: 0.85rem; color: var(--gray-500); line-height: 1.5; }

/* ── FAQ ── */
.tst-comp-faq-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.tst-comp-faq {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; transition: border-color 0.18s; width: 100%; overflow: hidden;
}
.tst-comp-faq:hover { border-color: var(--blue-light); }
.tst-comp-faq-q {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  font-weight: 700; font-size: 0.9375rem; color: var(--navy); line-height: 1.4;
}
.tst-comp-faq-ico {
  width: 24px; height: 24px; border-radius: 50%; background: var(--sky); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
  flex-shrink: 0; transition: transform 0.2s; margin-top: 1px;
}
.tst-comp-faq-a {
  font-size: 0.9375rem; color: var(--gray-600); line-height: 1.7; margin-top: 10px; display: none;
}
.tst-comp-faq.open .tst-comp-faq-a { display: block; }
.tst-comp-faq.open .tst-comp-faq-ico { transform: rotate(45deg); }

/* ── SIDEBAR ── */
.tst-side-card {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 16px;
}
.tst-side-card h4 {
  font-size: 0.875rem; font-weight: 800; color: var(--navy);
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-100);
}
.tst-mpick {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--gray-100); transition: opacity 0.15s; text-decoration: none;
}
.tst-mpick:last-child { border-bottom: none; }
.tst-mpick:hover { opacity: 0.7; }
.tst-mlogo {
  width: 34px; height: 34px; border-radius: 7px; display: flex; align-items: center;
  justify-content: center; font-family: 'Sora', sans-serif; font-weight: 800;
  font-size: 0.875rem; flex-shrink: 0;
}
.tst-mname { font-size: 0.875rem; font-weight: 700; color: var(--navy); }
.tst-msub  { font-size: 0.75rem; color: var(--gray-400); }
.tst-msc { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 0.9rem; color: var(--blue); margin-left: auto; }
.tst-toc { list-style: none; }
.tst-toc li { margin-bottom: 7px; }
.tst-toc a { font-size: 0.875rem; color: var(--gray-500); display: flex; align-items: center; gap: 4px; transition: color 0.18s; }
.tst-toc a:hover { color: var(--blue); }
.tst-sb-btn {
  display: block; background: var(--blue); color: #fff; text-align: center;
  padding: 12px; border-radius: 10px; font-family: 'Sora', sans-serif;
  font-weight: 700; font-size: 0.9rem; transition: background 0.18s; margin-top: 12px;
}
.tst-sb-btn:hover { background: var(--navy); color: #fff; }

/* ── MOBILE STICKY BAR — disabled ── */
.tst-mob-bar { display: none !important; }
body.tst-comparison-page { padding-bottom: 0; }

/* ── SECTION HEADINGS (comparison page) ── */
.tst-section-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.tst-section-sub   { font-size: 1rem; color: var(--gray-500); margin-bottom: 20px; line-height: 1.65; }
.tst-section-label {
  display: inline-block; background: var(--sky); color: var(--blue);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px; margin-bottom: 8px;
}

/* Global mobile containment */
@media (max-width: 959px) {
  .tst-tbl-sec, .tst-badges, .tst-comp-faq-list, .tst-editorial { width: 100%; max-width: 100%; }
  .tst-svc-name, .tst-svc-tag, .tst-summary, .tst-best-for, .tst-foot-txt {
    word-break: break-word; overflow-wrap: break-word;
  }
}
