/* ====================================================================
   TallyWhatsApp blog — article styles
   Extends ../style.css. Loads after it. Uses the same brand tokens.
   ==================================================================== */

:root {
  --green: #25D366;
  --green-dark: #128C7E;
  --green-light: #dcfce7;
  --ink: #0a0f0d;
  --ink-2: #1a2420;
  --surface: #f8faf9;
  --surface-2: #f0f4f2;
  --muted: #6b7c77;
  --border: #e2ebe7;
  --radius: 12px;
  --radius-lg: 20px;
}

body {
  font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #ffffff !important; /* Solid white background matching landing page */
  background-image: none !important; /* Disable any inherited background grid pattern */
}

/* ── NAV BAR ────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--green);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-cta {
  display: flex;
  gap: 10px;
}

/* ── BUTTONS ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}
.btn:active {
  transform: scale(0.98);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
}
.btn-primary {
  background: var(--green);
  color: white;
}
.btn-primary:hover {
  background: var(--green-dark);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 10px;
}
.btn-xl {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: 12px;
}

/* ── Blog hub list ──────────────────────────────────────────────────── */
.blog-hero {
  padding: 80px 0 40px;
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(2rem, 3vw + 1.2rem, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--ink-primary);
}
.blog-hero p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--ink-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px 0 80px;
  max-width: 900px;
  margin: 0 auto;
}
.blog-card {
  display: flex;
  flex-direction: row;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-compact);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  width: 100%;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
  border-color: var(--tally-green);
}
.blog-card-image {
  flex: 0 0 320px;
  aspect-ratio: 16 / 10;
  background: var(--bg-sidebar);
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card-body {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-card-meta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--tally-green);
  margin: 0 0 10px;
}
.blog-card h2 {
  font-size: 1.4rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink-primary);
}
.blog-card p {
  margin: 0 0 20px;
  color: var(--ink-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
  flex: 1;
}
.blog-card-link {
  font-weight: 600;
  color: var(--tally-green);
  font-size: 0.95rem;
  text-decoration: none;
}
.blog-card-link::after {
  content: " →";
  transition: transform 0.2s;
}
.blog-card-link:hover::after {
  transform: translateX(4px);
}

/* ── Article page ───────────────────────────────────────────────────── */
.article-wrap {
  padding: 60px 0 100px;
}
.article {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink-primary);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0 0 20px;
}
.article-meta span + span::before {
  content: "·";
  margin-right: 12px;
  color: var(--line-strong);
}
.article h1 {
  font-size: clamp(2rem, 3.2vw + 1.2rem, 3.4rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  margin: 0 0 24px;
}
.article-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin: 0 0 40px;
}
.article-hero {
  margin: 0 0 48px;
}
.article-hero img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.article h2 {
  font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
  margin: 56px 0 20px;
}
.article h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin: 40px 0 16px;
}
.article p { margin: 0 0 20px; }
.article a {
  color: var(--tally-green);
  text-decoration: underline;
  text-decoration-color: rgba(37, 211, 102, 0.4);
  text-underline-offset: 3px;
  font-weight: 500;
}
.article a:hover {
  text-decoration-color: var(--tally-green);
}
.article ul, .article ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.article ul li, .article ol li {
  margin-bottom: 10px;
  color: var(--ink-primary);
}
.article code {
  background: var(--bg-sidebar);
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--ink-primary);
  font-family: 'JetBrains Mono', Consolas, monospace;
  border: 1px solid var(--line);
}
.article pre {
  background: var(--ink-primary);
  color: var(--bg-soft);
  padding: 24px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 28px;
  border: 1px solid var(--line);
}
.article pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  border: none;
}
.article blockquote {
  margin: 32px 0;
  padding: 16px 24px;
  border-left: 4px solid var(--tally-green);
  background: var(--tally-green-tint);
  color: var(--ink-primary);
  border-radius: var(--radius-sm);
}
.article blockquote p:last-child { margin: 0; }

.article-cta {
  margin: 56px 0 24px;
  padding: 36px;
  background: var(--tally-green-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.article-cta h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  color: var(--ink-primary);
}
.article-cta p {
  margin: 0 0 20px;
  color: var(--ink-secondary);
  font-size: 1.02rem;
  line-height: 1.6;
}
.article-cta .btn {
  margin-right: 12px;
}

.article-prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.article-prev-next a {
  color: var(--tally-green);
  font-weight: 600;
  text-decoration: none;
}

/* Step list used by how-to posts */
.how-to-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 32px 0;
}
.how-to-steps li {
  counter-increment: step;
  position: relative;
  padding: 20px 24px 20px 68px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow-compact);
}
.how-to-steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 32px;
  height: 32px;
  background: var(--tally-green);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* FAQ inside articles */
.article-faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  box-shadow: var(--shadow-compact);
}
.article-faq summary {
  font-weight: 600;
  color: var(--ink-primary);
  cursor: pointer;
  list-style: none;
}
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq details[open] summary { margin-bottom: 12px; }
.article-faq p { margin: 0; color: var(--ink-secondary); }

/* ── FOOTER ─────────────────────────────────────────────────────────── */
footer {
  background: var(--ink-2);
  color: rgba(255,255,255,0.5);
  padding: 48px 24px;
  width: 100%;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .logo {
  color: white;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 14px;
  max-width: 260px;
  line-height: 1.6;
  color: rgba(255,255,255,0.6);
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}
.footer-col ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover {
  color: white;
}
.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ── RESPONSIVE NAV/FOOTER ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-cta .btn-ghost {
    display: none;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
  .blog-card {
    flex-direction: column;
  }
  .blog-card-image {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .blog-card-body {
    padding: 24px;
  }
  .article-wrap {
    padding: 32px 0 64px;
  }
  .article {
    font-size: 1.02rem;
  }
  .article-cta {
    padding: 24px;
  }
  .how-to-steps li {
    padding: 16px 16px 16px 56px;
  }
  .how-to-steps li::before {
    left: 12px;
    top: 16px;
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
}
