/* ═══════════════════════════════════════════
   ENGYNE CONTENT PAGES
   Shared components for guides, comparisons, and
   reference pages. Extracted from the per-page
   <style> blocks these used to be duplicated in.
═══════════════════════════════════════════ */

/* Nav labels must not wrap — the topbar is a fixed 64px and a wrapped
   label pushes the brand and actions out of alignment. */
.top-nav a { white-space: nowrap; }

/* ── Contact CTAs ──────────────────────────
   Replaced the WhatsApp buttons after that number was banned. Green is kept
   because it reads as "contact", not because it is WhatsApp branding.
──────────────────────────────────────────── */
.btn-call {
  background: var(--whatsapp);
  color: #05240F;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.3);
}
.btn-call:hover {
  background: var(--whatsapp-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}
.btn-call svg { flex-shrink: 0; }

.call-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px 0 16px;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #05240F;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.42);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.call-float:hover {
  background: var(--whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.5);
}
.call-float svg { width: 24px; height: 24px; flex-shrink: 0; }

.call-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(37, 211, 102, 0.6);
  animation: callPing 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes callPing {
  0%   { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.25); opacity: 0; }
}

@media (max-width: 560px) {
  .call-float span { display: none; }
  .call-float { padding: 0; width: 56px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .call-float::before { animation: none; display: none; }
}

/* Install CTA — Chrome Web Store */
.btn-cws-install {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(110, 94, 242, 0.35);
}
.btn-cws-install:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(110, 94, 242, 0.45);
}

/* The hero already carries its own bottom padding; the section that
   follows it does not need a full 80px on top as well. */
.page-hero + .section { padding-top: 48px; }

/* ── Page hero ─────────────────────────── */
.page-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
}

.page-hero.tall { padding: 72px 0 56px; }

.page-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .page-hero-grid { grid-template-columns: 1fr; }
}

/* ── Long-form prose ───────────────────── */
.prose { max-width: 760px; }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 32px; }
.prose p { margin-bottom: 16px; }
.prose ul,
.prose ol { margin: 0 0 16px 24px; color: var(--text-muted); line-height: 1.7; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text-main); }
.prose a { color: var(--primary-text); }
.prose a:hover { color: #fff; }

/* ── Quick answer ──────────────────────────
   The 40–60 word direct answer at the top of a
   page. Deliberately the first substantial text
   block after the H1 so extractors pick it up as
   the page's answer.
──────────────────────────────────────────── */
.quick-answer {
  background: linear-gradient(160deg, rgba(110, 94, 242, 0.16), rgba(110, 94, 242, 0.05));
  border: 1px solid var(--primary-line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin: 32px 0;
  max-width: 760px;
}

.quick-answer > .qa-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-text);
  margin-bottom: 10px;
}

.quick-answer p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-main);
  margin: 0;
}

.quick-answer p + p { margin-top: 12px; }

/* ── Key facts table ───────────────────────
   Spec-sheet style. Tables survive text chunking
   better than prose, so the load-bearing facts
   live here rather than in a paragraph.
──────────────────────────────────────────── */
.key-facts {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0;
  max-width: 760px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 0.95rem;
}

.key-facts caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

.key-facts th,
.key-facts td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
  vertical-align: top;
}

.key-facts th {
  width: 34%;
  color: var(--text-main);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

.key-facts td { color: var(--text-muted); }
.key-facts tr:last-child th,
.key-facts tr:last-child td { border-bottom: none; }

/* ── Comparison table ──────────────────── */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 40px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.5;
}

.compare-table thead th {
  background: var(--bg-hero);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.9rem;
}

.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td:first-child { color: var(--text-main); font-weight: 600; width: 24%; }
.compare-table td.good { color: var(--success-text); }
.compare-table td.bad { color: var(--danger-text); }
.compare-table td.mixed { color: var(--warning); }

/* Wide tables scroll inside their own box rather than
   pushing the page sideways on a phone. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 40px 0;
}
.table-scroll .compare-table { margin: 0; min-width: 560px; }

@media (max-width: 700px) {
  .compare-table { font-size: 0.85rem; }
  .compare-table th,
  .compare-table td { padding: 10px 12px; }
  .key-facts { font-size: 0.9rem; }
  .key-facts th,
  .key-facts td { padding: 10px 12px; }
  .key-facts th { width: 40%; }
}

/* ── Roundup cards ─────────────────────── */
.roundup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0;
  max-width: 760px;
}

.roundup-card.is-us {
  background: linear-gradient(160deg, rgba(110, 94, 242, 0.14), rgba(110, 94, 242, 0.04));
  border-color: var(--primary-line);
}

.roundup-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.roundup-head h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.roundup-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.roundup-best {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-text);
}

.roundup-card > p { color: var(--text-muted); line-height: 1.65; margin: 12px 0; }

.pro-con {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 18px;
}

.pro-con > div > strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pro-con .pros > strong { color: var(--success-text); }
.pro-con .cons > strong { color: var(--danger-text); }

.pro-con ul {
  margin: 0 0 0 18px;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.pro-con li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .pro-con { grid-template-columns: 1fr; gap: 14px; }
}

/* ── Verdict box ───────────────────────── */
.verdict-box {
  background: var(--bg-hero);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 32px 0;
  max-width: 760px;
}

.verdict-box > strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-text);
  margin-bottom: 10px;
}

.verdict-box p { color: var(--text-main); line-height: 1.65; margin: 0; }
.verdict-box p + p { margin-top: 10px; }

/* ── Honest limitations ────────────────── */
.limits-list {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  max-width: 760px;
  display: grid;
  gap: 12px;
}

.limits-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

.limits-list li strong { color: var(--text-main); }

/* ── On-page table of contents ─────────── */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 32px 0;
  max-width: 760px;
}

.toc > strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 12px;
}

.toc ol { margin: 0 0 0 18px; padding: 0; }
.toc li { margin-bottom: 7px; color: var(--text-muted); font-size: 0.95rem; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--primary-text); }

/* ── Q&A blocks (FAQ hub) ──────────────── */
.qa-block { max-width: 760px; margin-bottom: 40px; }

.qa-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 28px 0 10px;
  line-height: 1.4;
}

.qa-block h3:first-of-type { margin-top: 0; }
.qa-block p { color: var(--text-muted); line-height: 1.65; margin-bottom: 12px; }
.qa-block strong { color: var(--text-main); }

/* ── Glossary ──────────────────────────── */
.glossary-list {
  max-width: 760px;
  margin: 32px 0;
  display: grid;
  gap: 16px;
}

.glossary-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.glossary-item dt {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-text);
  margin-bottom: 8px;
}

.glossary-item dd {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.glossary-item dd + dd { margin-top: 8px; }

/* ── Keyword / country chips ───────────── */
.kw-example,
.country-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

.kw-example span,
.country-chips span {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.kw-example span {
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  color: var(--primary-text);
}

.kw-example span.blocked {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.28);
  color: var(--danger-text);
  text-decoration: line-through;
}

.country-chips span {
  background: var(--success-soft);
  border: 1px solid var(--success-line);
  color: var(--success-text);
}

.country-chips span.off {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text-light);
}

.guide-visual { margin: 32px 0; display: flex; justify-content: center; }

/* ── Case studies ──────────────────────── */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.case-card:hover { border-color: var(--primary-line); background: var(--bg-muted); }
.case-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.case-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; flex: 1; }

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.case-meta span {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text-light);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
  max-width: 760px;
}

.metric {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.metric b {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary-text);
  margin-bottom: 6px;
}

.metric span { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }

@media (max-width: 768px) {
  .case-grid { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 1fr; }
}

/* The fixed WhatsApp button sits bottom-right; keep the last footer row
   clear of it so the disambiguation note stays readable. */
.footer { padding-bottom: 96px; }
.footer .footer-inner { gap: 8px 24px; }
.footer .footer-inner > :last-child { max-width: 60ch; }

/* ── Column footer ─────────────────────── */
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.footer-col > strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--primary-text); }

.footer-about p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 14px;
  max-width: 280px;
}

@media (max-width: 980px) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
}
