/* PaymentGateway.ca - Main Stylesheet */
:root {
  --green: #16a34a;
  --green-dark: #15803d;
  --green-light: #dcfce7;
  --green-bg: #f0fdf4;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --red: #dc2626;
  --blue: #2563eb;
  --yellow: #d97706;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--slate-800);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* HEADER */
header {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  border-top: 4px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-brand .logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
}

.nav-badge {
  display: inline-block;
  background: var(--green-bg);
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--green-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--green); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--slate-700);
  padding: 0.25rem;
}

.mobile-menu {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 1rem 1.5rem;
}

.mobile-menu.open { display: block; }

.mobile-menu a {
  display: block;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-100);
}

/* MAIN */
main { flex: 1; }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--slate-900) 0%, #1a3a2a 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  color: #4ade80;
  font-style: normal;
}

.hero p {
  font-size: 1.2rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: var(--white);
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  margin: 0.5rem;
}

.hero-cta:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  text-decoration: none;
}

.hero-cta.secondary {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white);
}

.hero-cta.secondary:hover {
  background: rgba(255,255,255,0.1);
}

/* STATS BAR */
.stats-bar {
  background: var(--green-bg);
  border-bottom: 1px solid var(--green-light);
  padding: 1.5rem;
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-dark);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--slate-600);
  margin-top: 0.1rem;
}

/* SECTIONS */
.section {
  padding: 4rem 1.5rem;
}

.section-alt { background: var(--slate-50); }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--slate-600);
  margin-bottom: 2.5rem;
  max-width: 700px;
}

/* CARDS */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.card-grid-2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green);
  text-decoration: none;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.5rem;
}

.card:hover .card-title { color: var(--green); }

.card-desc {
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green);
}

/* TABLE */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--slate-200);
  margin: 2rem 0;
  /* Prevent parent overflow:hidden from clipping scroll */
  position: relative;
}

/* Mobile scroll hint */
@media (max-width: 600px) {
  .table-wrap::after {
    content: '← scroll →';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--slate-400);
    padding: 0.4rem 0 0.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
}

table {
  width: 100%;
  min-width: 560px; /* forces scroll rather than squish on small screens */
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--slate-900);
  color: var(--white);
}

thead th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--slate-200);
  transition: background 0.1s;
}

tbody tr:hover { background: var(--slate-50); }

tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green { background: var(--green-light); color: var(--green-dark); }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: var(--slate-100); color: var(--slate-600); }

/* ARTICLE LAYOUT */
.article-hero {
  background: linear-gradient(135deg, var(--slate-900) 0%, #1a3a2a 100%);
  color: var(--white);
  padding: 3.5rem 1.5rem;
}

.article-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: #86efac; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #64748b; }

.article-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.article-hero .subtitle {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ARTICLE BODY */
.article-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.article-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--slate-900);
  margin: 2.5rem 0 1rem;
  padding-top: 0.5rem;
  border-top: 2px solid var(--slate-100);
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--slate-800);
  margin: 1.75rem 0 0.6rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: var(--slate-700);
  line-height: 1.75;
}

.article-body ul, .article-body ol {
  margin: 1rem 0 1.25rem 1.5rem;
  color: var(--slate-700);
  line-height: 1.75;
}

.article-body li { margin-bottom: 0.4rem; }

.article-body strong { color: var(--slate-900); }

.article-body a { color: var(--green); }

.callout {
  background: var(--green-bg);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.callout.warning {
  background: #fffbeb;
  border-color: var(--yellow);
}

.callout.info {
  background: #eff6ff;
  border-color: var(--blue);
}

.callout p { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: 0.4rem; }

/* PROS/CONS */
.pros-cons {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  margin: 1.75rem 0;
}

@media (max-width: 600px) {
  .pros-cons { grid-template-columns: 1fr; }
}

.pros, .cons {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.pros { border-top: 3px solid var(--green); }
.cons { border-top: 3px solid var(--red); }

.pros h4 { color: var(--green-dark); margin-bottom: 0.75rem; font-size: 0.95rem; }
.cons h4 { color: var(--red); margin-bottom: 0.75rem; font-size: 0.95rem; }

.pros li, .cons li {
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--slate-700);
}

/* RATING BOX */
.rating-box {
  background: var(--slate-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.rating-score {
  text-align: center;
  min-width: 100px;
}

.rating-score .score {
  font-size: 3.5rem;
  font-weight: 800;
  color: #4ade80;
  line-height: 1;
}

.rating-score .out-of {
  font-size: 0.8rem;
  color: #94a3b8;
}

.rating-details { flex: 1; }

.rating-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.rating-row span:first-child {
  width: 130px;
  color: #94a3b8;
  flex-shrink: 0;
}

.rating-bar-track {
  flex: 1;
  background: #334155;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.rating-bar {
  height: 100%;
  background: #4ade80;
  border-radius: 999px;
}

.rating-row .score-num {
  width: 30px;
  text-align: right;
  font-weight: 600;
}

/* VERDICT BOX */
.verdict {
  background: var(--green-bg);
  border: 1px solid var(--green-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2rem 0;
}

.verdict h3 {
  color: var(--green-dark);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

/* RELATED ARTICLES */
.related-articles {
  background: var(--slate-50);
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--slate-200);
}

.related-inner {
  max-width: 860px;
  margin: 0 auto;
}

.related-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  margin-top: 1.25rem;
}

.related-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.related-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.related-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 0.35rem;
}

.related-card:hover .related-card-title { color: var(--green); }

.related-card-desc {
  font-size: 0.8rem;
  color: var(--slate-500);
}

/* FOOTER */
footer {
  background: var(--slate-900);
  color: var(--slate-400);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: var(--slate-400);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--white); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--slate-700);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: gap;
  gap: 1rem;
  font-size: 0.8rem;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--slate-600);
  margin-top: 1rem;
  line-height: 1.5;
  max-width: 800px;
}

/* GLOSSARY */
.glossary-term {
  border-bottom: 1px solid var(--slate-200);
  padding: 1.25rem 0;
}

.glossary-term:last-child { border-bottom: none; }

.glossary-term dt {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.4rem;
}

.glossary-term dd {
  color: var(--slate-600);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-left: 0;
}

/* COMPARISON HIGHLIGHT */
.highlight-row td { background: var(--green-bg) !important; font-weight: 600; }
.highlight-row:hover td { background: #dcfce7 !important; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .hero { padding: 3.5rem 1.25rem; }
  .section { padding: 2.5rem 1.25rem; }
  .stats-inner { gap: 1.25rem; }
  .rating-box { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* UTILITY */
.text-center { text-align: center; }
.text-green { color: var(--green); }
.text-muted { color: var(--slate-500); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.check::before { content: "✓ "; color: var(--green); font-weight: 700; }
.cross::before { content: "✗ "; color: var(--red); font-weight: 700; }

/* CTA SECTION */
.cta-section {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
  padding: 4rem 1.5rem;
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-white {
  background: var(--white);
  color: var(--green-dark);
}

.btn-white:hover {
  background: var(--slate-100);
  text-decoration: none;
}

.btn-outline-white {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  color: var(--white);
  margin-left: 0.75rem;
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}
