/* css/compare.css — the comparison pages (/compare and /compare/exambook-vs-…).
 *
 * Built on css/style.css's tokens so these pages look like the rest of the
 * site. Everything is a plain table or list on purpose: an answer engine reads
 * the DOM, and a real <table> with <th scope> is the form it extracts best.
 */

.cmp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ── hero ───────────────────────────────────────────────────────────────── */
.cmp-hero { padding: 120px 0 28px; position: relative; text-align: left; }
.cmp-hero::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 340px; pointer-events: none;
  background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(139,92,246,0.16), transparent 70%);
}
.cmp-crumbs { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; position: relative; }
.cmp-crumbs a { color: var(--text-secondary); }
.cmp-crumbs a:hover { color: var(--text-primary); }
.cmp-crumbs span { margin: 0 6px; opacity: 0.6; }
.cmp-hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); line-height: 1.18; margin: 12px 0 14px; position: relative; }
.cmp-hero .cmp-lead { color: var(--text-secondary); font-size: 1.04rem; line-height: 1.7; max-width: 760px; position: relative; }
.cmp-verified {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600;
  color: var(--green); background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.28);
  padding: 5px 12px; border-radius: 99px; position: relative;
}

/* ── the short answer — the block an assistant lifts ────────────────────── */
.cmp-answer {
  margin: 26px 0 8px; padding: 22px 24px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(139,92,246,0.12), rgba(192,38,211,0.06));
  border: 1px solid rgba(139,92,246,0.32);
}
.cmp-answer h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--purple-light); margin: 0 0 10px; }
.cmp-answer p { color: var(--text-primary); font-size: 1rem; line-height: 1.75; margin: 0; }
.cmp-answer p + p { margin-top: 10px; color: var(--text-secondary); font-size: 0.93rem; }

/* ── sections ───────────────────────────────────────────────────────────── */
.cmp-sec { padding: 44px 0 6px; }
.cmp-sec h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); margin: 0 0 8px; }
.cmp-sec .cmp-sub { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; max-width: 760px; margin: 0 0 22px; }
.cmp-sec h3 { font-size: 1.05rem; margin: 0 0 8px; }
.cmp-sec p, .cmp-sec li { color: var(--text-secondary); font-size: 0.94rem; line-height: 1.75; }
.cmp-sec ul { list-style: disc; padding-left: 22px; }
.cmp-sec li { margin-bottom: 7px; }
.cmp-sec a.cmp-link { color: var(--purple-light); border-bottom: 1px solid rgba(167,139,250,0.35); }
.cmp-sec a.cmp-link:hover { color: #fff; border-color: #fff; }

/* ── tables ─────────────────────────────────────────────────────────────── */
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border-light); border-radius: var(--radius-lg); background: var(--bg-card); }
.cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.86rem; min-width: 640px; table-layout: fixed; }
.cmp-table.hub { min-width: 1008px; }
.cmp-table th, .cmp-table td { padding: 13px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); line-height: 1.55; }
.cmp-table thead th {
  position: sticky; top: 0; background: #0f0d26; font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-secondary); white-space: nowrap; border-bottom: 1px solid var(--border-light);
}
.cmp-table tbody th { font-weight: 600; color: var(--text-primary); background: var(--bg-card); overflow-wrap: anywhere; }
.cmp-table td { color: var(--text-secondary); }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table .is-us { background: rgba(139,92,246,0.09); }
.cmp-table thead th.is-us { background: rgba(139,92,246,0.22); color: #fff; }
.cmp-table .name { color: var(--text-primary); font-weight: 700; white-space: nowrap; }
.cmp-table .name small { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.74rem; margin-top: 2px; white-space: normal; }
.cmp-yes { color: var(--green); font-weight: 600; }
.cmp-no { color: #fca5a5; font-weight: 600; }
.cmp-ns { color: var(--text-muted); font-style: italic; }
.cmp-star { color: #FBBF24; font-weight: 700; white-space: nowrap; }
.cmp-num { color: var(--text-muted); font-size: 0.78rem; display: block; }
/* first column stays put while the rest scrolls on a phone */
.cmp-table tbody th, .cmp-table thead th:first-child { position: sticky; left: 0; z-index: 2; }
.cmp-table thead th:first-child { z-index: 3; }
.cmp-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 10px; line-height: 1.6; }

/* ── why aspirants choose ExamBook ─────────────────────────────────────── */
.cmp-why { list-style: none !important; padding-left: 0 !important; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cmp-why li {
  position: relative; padding: 14px 16px 14px 46px; margin: 0 !important; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(139,92,246,0.10), rgba(12,11,30,1)); border: 1px solid rgba(139,92,246,0.3);
  color: var(--text-primary) !important; font-size: 0.92rem !important; line-height: 1.6 !important;
}
.cmp-why li::before {
  content: '✓'; position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; color: #fff; background: var(--grad);
}

/* ── "which app for which student" ─────────────────────────────────────── */
.cmp-needs { display: grid; gap: 12px; }
.cmp-need { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; padding: 16px 18px; border-radius: var(--radius); background: var(--bg-card); border: 1px solid var(--border-light); }
.cmp-need .q { color: var(--text-primary); font-weight: 600; font-size: 0.94rem; }
.cmp-need .pick { color: var(--purple-light); font-weight: 700; font-size: 0.9rem; }
.cmp-need .why { grid-column: 1 / -1; color: var(--text-secondary); font-size: 0.86rem; line-height: 1.65; }
@media (max-width: 640px) { .cmp-need { grid-template-columns: 1fr; } }

/* ── app cards on the hub ──────────────────────────────────────────────── */
.cmp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cmp-card { display: flex; flex-direction: column; padding: 20px; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border-light); transition: border-color var(--transition), transform var(--transition); }
.cmp-card:hover { border-color: rgba(139,92,246,0.55); transform: translateY(-3px); }
.cmp-card h3 { margin: 0 0 4px; font-size: 1.08rem; }
.cmp-card .meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 12px; }
.cmp-card p { font-size: 0.88rem; line-height: 1.65; margin: 0 0 12px; }
.cmp-card .best { color: var(--text-primary); font-size: 0.86rem; margin-bottom: 14px; }
.cmp-card .best b { color: var(--purple-light); }
.cmp-card .go { margin-top: auto; font-weight: 700; font-size: 0.88rem; color: var(--purple-light); }
.cmp-card .go:hover { color: #fff; }

/* ── choose-if columns ─────────────────────────────────────────────────── */
.cmp-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp-box { padding: 20px 22px; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border-light); }
.cmp-box.us { border-color: rgba(139,92,246,0.5); background: linear-gradient(160deg, rgba(139,92,246,0.11), rgba(12,11,30,1)); }
.cmp-box h3 { margin: 0 0 10px; }
.cmp-box p { margin: 0 0 10px; }
.cmp-box ul { margin: 0; }
@media (max-width: 760px) { .cmp-2col { grid-template-columns: 1fr; } }

/* ── method + parents ──────────────────────────────────────────────────── */
.cmp-method { padding: 22px 24px; border-radius: var(--radius-lg); border: 1px dashed var(--border-light); background: rgba(255,255,255,0.02); }
.cmp-method h3 { margin: 0 0 10px; }
.cmp-check { display: grid; gap: 10px; counter-reset: c; }
.cmp-check li { list-style: none; counter-increment: c; position: relative; padding-left: 38px; }
.cmp-check li::before {
  content: counter(c); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem;
  color: #fff; background: var(--grad);
}
.cmp-check { padding-left: 0 !important; }

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.cmp-faq details { border: 1px solid var(--border-light); border-radius: var(--radius); background: var(--bg-card); margin-bottom: 10px; }
.cmp-faq summary { cursor: pointer; padding: 15px 18px; font-weight: 600; color: var(--text-primary); font-size: 0.95rem; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.cmp-faq summary::-webkit-details-marker { display: none; }
.cmp-faq summary::after { content: '+'; color: var(--purple-light); font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.cmp-faq details[open] summary::after { content: '−'; }
.cmp-faq details p { padding: 0 18px 16px; margin: 0; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.75; }

/* ── Hindi summary ─────────────────────────────────────────────────────── */
.cmp-hi { padding: 22px 24px; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border-light); }
.cmp-hi h2 { margin-top: 0; }
.cmp-hi p, .cmp-hi li { font-size: 0.98rem; line-height: 1.9; }

/* ── sources + links ───────────────────────────────────────────────────── */
.cmp-sources li { font-size: 0.88rem; }
.cmp-others { display: flex; flex-wrap: wrap; gap: 10px; }
.cmp-others a { padding: 9px 16px; border-radius: 99px; font-size: 0.86rem; font-weight: 600; color: var(--text-secondary); border: 1px solid var(--border-light); background: var(--bg-card); }
.cmp-others a:hover { color: #fff; border-color: var(--purple); }

/* ── closing call to action ────────────────────────────────────────────── */
.cmp-cta { margin: 44px 0 70px; padding: 30px 26px; text-align: center; border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(124,58,237,0.22), rgba(192,38,211,0.12)); border: 1px solid rgba(139,92,246,0.4); }
.cmp-cta h2 { margin: 0 0 8px; font-size: 1.4rem; }
.cmp-cta p { color: var(--text-secondary); margin: 0 auto 18px; max-width: 560px; font-size: 0.95rem; }
.cmp-cta .row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cmp-disc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.7; padding-bottom: 40px; }

/* a phone: keep the first column narrow so the data columns get the room, and say
   the table scrolls — a half-cut column is the only hint otherwise */
.cmp-swipe { display: none; font-size: 0.74rem; color: var(--text-muted); margin: 0 0 8px; }
@media (max-width: 760px) {
  .cmp-swipe { display: block; }
  .cmp-table .name { white-space: normal; }
  .cmp-table .name small { display: none; }
}

@media (max-width: 640px) {
  .cmp-hero { padding-top: 96px; }
  .cmp-hero h1 { font-size: 1.62rem; }
  .cmp-answer { padding: 18px; }
  .cmp-table th, .cmp-table td { padding: 11px 12px; }
}

/* the footer's Play button — index.php styles it inline, so style.css has no rule for it */
.footer-playstore-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
  border: 1px solid var(--border-light); background: var(--bg-card);
}
.footer-playstore-btn:hover { border-color: var(--purple); color: #fff; }

/* Long app names wrap inside their cell instead of running into the next column. */
.cmp-table .name{white-space:normal;overflow-wrap:anywhere;word-break:normal}
.cmp-table th[scope=row]{overflow-wrap:anywhere}
