/* ============================================================================
   Ledgr country variant pages — shared stylesheet
   /ae/, /qa/, /sa/, /us/, /uk/, /global/
============================================================================ */

:root {
  --bg: #0B1120;
  --bg-card: #111827;
  --bg-card-hover: #162032;
  --border: #1E293B;
  --border-hover: #334155;
  --text: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --accent: #0D9488;
  --accent-hover: #059669;
  --accent-glow: rgba(13, 148, 136, 0.15);
  --accent-soft: rgba(13, 148, 136, 0.08);
  --green: #22C55E;
  --radius: 12px;
  --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; overflow-x: hidden; max-width: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  overflow-x: hidden; max-width: 100%; width: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; overflow-x: hidden; }
.muted { color: var(--text-muted); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.brand img { height: 32px; width: auto; }
.brand span { font-weight: 800; font-size: 1.25rem; color: var(--text); }
.nav-links { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* Mobile hamburger for country pages */
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; padding: 0.25rem; line-height: 1; }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-inner { position: relative; }
  .nav-links {
    display: none; flex-direction: column; width: 100%; gap: 0.5rem;
    padding: 1rem 0 0.5rem; border-top: 1px solid var(--border);
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.4rem 0; }
  .nav-links .btn { width: 100%; text-align: center; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem 1rem; border-radius: 8px;
  font-weight: 600; font-size: 0.875rem;
  text-decoration: none; transition: all 0.2s; cursor: pointer; border: 0;
}
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); color: white; }
.btn-secondary { background: var(--bg-card); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { color: var(--text); border-color: var(--border-hover); }
.btn-whatsapp { background: #25D366; color: white; }
.btn-whatsapp:hover { background: #1da851; color: white; }
.btn-large { padding: 0.85rem 1.4rem; font-size: 0.95rem; }

/* ---- Hero ---- */
.hero { padding: 5rem 1.5rem 4rem; text-align: center; max-width: 900px; }
.hero-tag {
  display: inline-block;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.8rem; font-weight: 600; margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem;
}
.hero h1 strong { color: var(--accent); }
.hero p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }
.badge-row { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.badge {
  padding: 0.35rem 0.8rem; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 0.75rem; color: var(--text-secondary);
}

@media (max-width: 640px) {
  .hero { padding: 3rem 1rem 2rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 0.95rem; }
  .hero-buttons .btn { width: 100%; max-width: 300px; }
}

/* ---- MOBILE (≤ 768px) ---- */
@media (max-width: 768px) {
  .nav-inner { padding: 0.75rem 1rem; }
  .hero h1 { font-size: 1.85rem; }
  .hero-tag { font-size: 0.75rem; }
  .compliance-section { padding: 3rem 1rem 2rem; }
  .compliance-section h2 { font-size: 1.5rem; }
  .compliance-card { padding: 1.25rem; }
  .compliance-card h3 { font-size: 0.95rem; }
  .compliance-card p { font-size: 0.8rem; }
  .cta-section h2 { font-size: 1.4rem; }
  .pricing-section h2 { font-size: 1.5rem; }
  .faq h2 { font-size: 1.4rem; }
  .faq-item h4 { font-size: 0.875rem; }
  .faq-item p { font-size: 0.8rem; }
  .final-cta h2 { font-size: 1.4rem; }
  .final-cta { padding: 2.5rem 1rem; }
}

/* ---- ULTRA-SMALL (phones ≤ 400px) ---- */
@media (max-width: 400px) {
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 0.875rem; }
  .hero-tag { font-size: 0.7rem; }
  .compliance-section h2 { font-size: 1.25rem; }
  .cta-section h2 { font-size: 1.2rem; }
  .pricing-section h2 { font-size: 1.25rem; }
  .price-card { padding: 1.25rem 1rem; }
  .price-amount { font-size: 1.5rem; }
  .compliance-emoji { font-size: 1.5rem; }
  .whatsapp-fab { width: 48px; height: 48px; bottom: 1rem; right: 1rem; }
  .whatsapp-fab svg { width: 24px; height: 24px; }
}

/* ---- Compliance grid ---- */
.compliance-section { padding: 4rem 1.5rem 2rem; max-width: 100%; box-sizing: border-box; }
.compliance-section h2 {
  font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 2.5rem;
}
.compliance-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; min-width: 0;
}
.compliance-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .compliance-grid { grid-template-columns: repeat(2, 1fr); }
  .compliance-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .compliance-grid, .compliance-grid.cols-4 { grid-template-columns: 1fr; }
}
.compliance-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
  min-width: 0; max-width: 100%; box-sizing: border-box; overflow-wrap: break-word;
}
.compliance-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}
.compliance-emoji { font-size: 2rem; line-height: 1; margin-bottom: 0.6rem; }
.compliance-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.compliance-card p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }

/* Mobile compliance cards: emoji + title side-by-side */
@media (max-width: 640px) {
  .compliance-card {
    display: flex; flex-direction: column; gap: 0.5rem;
    padding: 1.25rem;
  }
  .compliance-card .compliance-emoji { margin-bottom: 0; }
  .compliance-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
  .compliance-card p { font-size: 0.825rem; line-height: 1.55; }
}

/* ---- Niche pills CTA strip ---- */
.cta-section { padding: 4rem 1.5rem; background: linear-gradient(135deg, var(--bg-card) 0%, rgba(13,148,136,0.05) 100%); text-align: center; }
.cta-section h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.cta-section > .container > p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.niche-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.niche-pill {
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 0.875rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
}
.niche-pill:hover {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
  transform: translateY(-1px);
}

/* ---- Pricing ---- */
.pricing-section { padding: 4rem 1.5rem 2rem; text-align: center; }
.pricing-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.pricing-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-top: 2rem; max-width: 900px; margin-left: auto; margin-right: auto;
}
@media (max-width: 768px) { .pricing-cards { grid-template-columns: 1fr; } }
.price-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem 1.5rem;
  text-align: left; position: relative;
  transition: transform 0.2s;
}
.price-card.featured {
  border-color: var(--accent);
  transform: scale(1.02);
  box-shadow: 0 12px 40px var(--accent-glow);
}
.popular-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: white;
  padding: 0.25rem 0.75rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
}
.price-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.price-amount {
  font-size: 2rem; font-weight: 800; color: var(--accent);
  margin: 0.5rem 0 1rem;
}
.price-amount span {
  font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}
.price-card ul { list-style: none; margin-bottom: 1rem; }
.price-card ul li {
  padding: 0.3rem 0; padding-left: 1.2rem; position: relative;
  font-size: 0.85rem; color: var(--text-secondary);
}
.price-card ul li::before {
  content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}
.price-machines {
  font-size: 0.75rem; color: var(--text-muted);
  margin-bottom: 1rem; padding-top: 0.5rem; border-top: 1px solid var(--border);
}
.loading { color: var(--text-muted); padding: 2rem; }

/* ---- FAQ ---- */
.faq { padding: 4rem 1.5rem 2rem; }
.faq h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1.5rem; text-align: center; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 0.75rem;
  max-width: 800px; margin-left: auto; margin-right: auto;
}
.faq-item h4 { font-size: 0.95rem; margin-bottom: 0.4rem; color: var(--text); }
.faq-item p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }
.faq-item p a { color: var(--accent); }

/* ---- Final CTA ---- */
.final-cta {
  padding: 4rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--accent-soft) 100%);
  border-radius: var(--radius-lg); margin: 2rem auto; max-width: 900px;
}
.final-cta h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.final-cta > p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---- Footer ---- */
.footer {
  padding: 2rem 1.5rem; border-top: 1px solid var(--border);
  text-align: center; margin-top: 2rem;
}
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.footer-brand img { height: 28px; width: auto; }
.footer-brand span { font-size: 1.1rem; font-weight: 800; }
.footer-links {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 0.75rem 0;
}
.footer-links a { color: var(--text-muted); font-size: 0.8rem; }
.footer-links a:hover { color: var(--text-secondary); }
.footer-copy { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.75rem; }

/* ---- WhatsApp FAB ---- */
.whatsapp-fab {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: transform 0.2s;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 28px; height: 28px; fill: white; }

/* Mobile WhatsApp FAB: pill with label, safe-area aware */
@media (max-width: 768px) {
  .whatsapp-fab {
    border-radius: 50px; width: auto; min-width: 56px; height: 48px;
    padding: 0 1rem; gap: 0.5rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
  }
  .whatsapp-fab svg { width: 24px; height: 24px; flex-shrink: 0; }
  .whatsapp-fab .whatsapp-fab-label {
    display: inline !important; color: white; font-size: 0.8rem; font-weight: 600; white-space: nowrap;
    max-width: 80px; overflow: hidden; text-overflow: ellipsis;
  }
}
