/* ==========================================================================
   VoiceSpend Subpages & Blog Stylesheet
   Matches VoiceSpend Official Visual Identity (Inter / Manrope / Plus Jakarta Sans)
   ========================================================================== */

/* --- SUBPAGE BASE SCROLLING (Smooth, uninterrupted reading without snap jumping) --- */
html, body {
  scroll-snap-type: none !important;
}
main > section,
.subpage-hero,
.legal-page-body,
.legal-layout,
.legal-card,
.legal-section,
footer {
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
}

/* --- SUBPAGE HERO (Compact, elegant cover section - NOT full screen) --- */
.subpage-hero,
main > section.subpage-hero {
  position: relative;
  background: var(--night, #0F0F1A);
  color: white;
  min-height: auto !important;
  height: auto !important;
  padding: 32px 0 24px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
}
.subpage-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.22) 0%, rgba(0, 206, 201, 0.08) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(35px);
}
.subpage-hero .wrap {
  position: relative;
  z-index: 1;
}
.subpage-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #a5a1b8;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.subpage-breadcrumbs a {
  color: #a5a1b8;
  transition: color 0.2s;
}
.subpage-breadcrumbs a:hover {
  color: var(--teal, #00CEC9);
}
.subpage-breadcrumbs .lucide {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}
.subpage-hero h1 {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 800;
  color: white;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.subpage-hero h1 span {
  color: var(--teal, #00CEC9);
}
.subpage-lead {
  font-size: 13.5px;
  line-height: 1.55;
  color: #b7b4c7;
  max-width: 680px;
  margin: 0;
}
.subpage-meta {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  margin-top: 12px;
  font-size: 11px;
  color: #928ea8;
  flex-wrap: wrap;
}
.subpage-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}
.subpage-meta .lucide {
  width: 13px;
  height: 13px;
  color: var(--teal, #00CEC9);
}

/* --- LEGAL PAGES LAYOUT (Privacy & Terms) --- */
.legal-page-body {
  background: var(--surface, #FBFBFE);
  padding: 32px 0 70px;
}
.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}
.legal-toc-wrapper {
  position: sticky;
  top: 96px;
  background: white;
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(15, 15, 26, 0.03);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.legal-toc-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink, #2D2E34);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.legal-toc-title .lucide {
  width: 14px;
  height: 14px;
  color: var(--primary, #6C5CE7);
}
.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal-toc-list a {
  font-size: 12px;
  color: var(--secondary, #76767D);
  padding: 6px 10px;
  border-radius: 6px;
  display: block;
  line-height: 1.4;
  transition: all 0.2s;
  text-decoration: none;
}
.legal-toc-list a:hover {
  color: var(--primary, #6C5CE7);
  background: var(--container, #F5F5FC);
}
.legal-toc-list a.active {
  color: var(--primary, #6C5CE7);
  background: rgba(108, 92, 231, 0.08);
  font-weight: 700;
  border-left: 2px solid var(--primary, #6C5CE7);
  padding-left: 8px;
}

.legal-card {
  background: white;
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 12px;
  padding: 44px 48px;
  box-shadow: 0 10px 30px rgba(15, 15, 26, 0.04);
}
.legal-meta-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px;
  background: var(--container, #F5F5FC);
  border-radius: 8px;
  margin-bottom: 36px;
  border: 1px solid var(--line, #e4e3ed);
  font-size: 12px;
}
.legal-meta-summary strong {
  display: block;
  color: var(--ink, #2D2E34);
  margin-bottom: 2px;
}
.legal-section {
  scroll-margin-top: 110px;
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line, #e4e3ed);
}
.legal-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.legal-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink, #2D2E34);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-section h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(108, 92, 231, 0.12);
  color: var(--primary, #6C5CE7);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.legal-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #2D2E34);
  margin: 22px 0 10px;
}
.legal-section p {
  font-size: 14px;
  line-height: 1.8;
  color: #4a4a54;
  margin: 0 0 14px;
}
.legal-section ul, .legal-section ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.legal-section li {
  font-size: 14px;
  line-height: 1.75;
  color: #4a4a54;
  margin-bottom: 8px;
}
.legal-section a {
  color: var(--primary, #6C5CE7);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-section a:hover {
  color: var(--primary-dim, #4935C3);
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 8px;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.legal-table th, .legal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line, #e4e3ed);
}
.legal-table th {
  background: var(--container, #F5F5FC);
  font-weight: 800;
  color: var(--ink, #2D2E34);
}
.legal-table tr:last-child td {
  border-bottom: 0;
}

.callout-box {
  background: rgba(0, 206, 201, 0.08);
  border-left: 4px solid var(--teal, #00CEC9);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 13px;
  line-height: 1.7;
  color: #214342;
}
.callout-box.purple {
  background: rgba(108, 92, 231, 0.08);
  border-left-color: var(--primary, #6C5CE7);
  color: #2e265c;
}
.callout-box.alert {
  background: rgba(253, 203, 110, 0.15);
  border-left-color: var(--amber, #FDCB6E);
  color: #5c430a;
}

/* --- BLOG TEMPLATES (home.php / index.php / archive.php) --- */
.blog-listing-section {
  background: var(--surface, #FBFBFE);
  padding: 60px 0 90px;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.blog-card {
  background: white;
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s var(--ease, ease), box-shadow 0.3s var(--ease, ease), border-color 0.3s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(108, 92, 231, 0.1);
  border-color: rgba(108, 92, 231, 0.3);
}
.blog-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #191924;
}
.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease, ease);
}
.blog-card:hover .blog-card-media img {
  transform: scale(1.05);
}
.blog-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(8px);
  color: var(--primary-light, #A29BFE);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-meta {
  font-size: 11px;
  color: var(--secondary, #76767D);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--ink, #2D2E34);
}
.blog-card-title a {
  color: inherit;
  transition: color 0.2s;
}
.blog-card-title a:hover {
  color: var(--primary, #6C5CE7);
}
.blog-card-excerpt {
  font-size: 13px;
  line-height: 1.7;
  color: #63626e;
  margin: 0 0 18px;
  flex: 1;
}
.blog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line, #e4e3ed);
  padding-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary, #6C5CE7);
}
.blog-card-foot .lucide {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}
.blog-card:hover .blog-card-foot .lucide {
  transform: translateX(4px);
}

.blog-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 12px;
  max-width: 680px;
  margin: 0 auto;
}
.blog-empty-state .icon-tile {
  margin: 0 auto 18px;
  width: 56px;
  height: 56px;
}
.blog-empty-state h2 {
  font-size: 24px;
  margin-bottom: 10px;
}
.blog-empty-state p {
  font-size: 14px;
  color: var(--secondary, #76767D);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line, #e4e3ed);
  background: white;
  color: var(--ink, #2D2E34);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.pagination .page-numbers:hover, .pagination .page-numbers.current {
  background: var(--primary, #6C5CE7);
  color: white;
  border-color: var(--primary, #6C5CE7);
}

/* --- SINGLE BLOG ARTICLE (single.php) --- */
.single-article-section {
  background: var(--surface, #FBFBFE);
  padding: 50px 0 90px;
}
.single-article-container {
  max-width: 820px;
  margin: 0 auto;
}
.single-article-header {
  margin-bottom: 32px;
}
.single-article-category {
  display: inline-block;
  background: rgba(108, 92, 231, 0.1);
  color: var(--primary, #6C5CE7);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.single-article-title {
  font-size: 38px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--ink, #2D2E34);
  margin: 0 0 16px;
}
.single-article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--secondary, #76767D);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line, #e4e3ed);
  flex-wrap: wrap;
}
.single-article-meta-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.single-article-meta-bar .lucide {
  width: 14px;
  height: 14px;
  color: var(--primary, #6C5CE7);
}

.single-article-featured {
  margin-bottom: 36px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(15, 15, 26, 0.08);
}
.single-article-featured img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}

/* Article Prose Typography */
.prose {
  font-size: 16px;
  line-height: 1.85;
  color: #2D2E34;
}
.prose h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink, #2D2E34);
  margin: 40px 0 16px;
}
.prose h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink, #2D2E34);
  margin: 28px 0 12px;
}
.prose p {
  margin: 0 0 20px;
}
.prose ul, .prose ol {
  margin: 0 0 24px;
  padding-left: 28px;
}
.prose li {
  margin-bottom: 10px;
  line-height: 1.75;
}
.prose strong {
  color: #191924;
  font-weight: 700;
}
.prose a {
  color: var(--primary, #6C5CE7);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover {
  color: var(--primary-dim, #4935C3);
}
.prose blockquote {
  border-left: 4px solid var(--primary, #6C5CE7);
  background: var(--container, #F5F5FC);
  padding: 18px 24px;
  margin: 28px 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #494857;
}
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
}

/* Post Share & Author Bar */
.article-footer-meta {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line, #e4e3ed);
}
.article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.article-tags span {
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary, #76767D);
}
.article-tags a {
  background: var(--container, #F5F5FC);
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  color: var(--ink, #2D2E34);
  transition: all 0.2s;
}
.article-tags a:hover {
  background: var(--primary, #6C5CE7);
  color: white;
  border-color: var(--primary, #6C5CE7);
}

.article-author-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  background: white;
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 12px;
  margin-bottom: 36px;
}
.article-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--container, #F5F5FC);
}
.article-author-info strong {
  display: block;
  font-size: 15px;
  color: var(--ink, #2D2E34);
  margin-bottom: 4px;
}
.article-author-info p {
  font-size: 12px;
  color: var(--secondary, #76767D);
  margin: 0;
  line-height: 1.5;
}

/* Post Navigation (Prev / Next) */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 36px 0;
}
.post-nav-card {
  padding: 18px 22px;
  background: white;
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.post-nav-card:hover {
  border-color: var(--primary-light, #A29BFE);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.08);
}
.post-nav-card small {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary, #6C5CE7);
  margin-bottom: 6px;
}
.post-nav-card strong {
  font-size: 14px;
  color: var(--ink, #2D2E34);
  line-height: 1.4;
}

/* --- APP DOWNLOAD CONVERSION CTA BANNER --- */
.subpage-cta-banner {
  background: var(--night, #0F0F1A);
  color: white;
  padding: 56px 40px;
  border-radius: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 64px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(15, 15, 26, 0.2);
}
.subpage-cta-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 220px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.35) 0%, rgba(0, 206, 201, 0.15) 50%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}
.subpage-cta-banner h2 {
  font-size: 32px;
  color: white;
  margin-bottom: 12px;
  position: relative;
}
.subpage-cta-banner h2 span {
  color: var(--teal, #00CEC9);
}
.subpage-cta-banner p {
  color: #bcb8ce;
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.6;
  position: relative;
}
.subpage-cta-banner .stores {
  justify-content: center;
  position: relative;
}

/* --- GENERIC STANDARD PAGE (page.php) --- */
.standard-page-section {
  background: var(--surface, #FBFBFE);
  padding: 50px 0 90px;
}
.standard-page-card {
  background: white;
  border: 1px solid var(--line, #e4e3ed);
  border-radius: 12px;
  padding: 44px 48px;
  box-shadow: 0 10px 30px rgba(15, 15, 26, 0.04);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 992px) {
  .subpage-hero h1 { font-size: 26px; }
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc-wrapper { position: static; max-height: none; }
  .legal-card { padding: 32px 24px; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .single-article-title { font-size: 28px; }
}

@media (max-width: 640px) {
  .subpage-hero,
  main > section.subpage-hero { padding: 22px 0 18px !important; }
  .subpage-hero h1 { font-size: 22px; }
  .subpage-lead { font-size: 12.5px; }
  .legal-page-body { padding: 20px 0 50px; }
  .legal-card { padding: 22px 16px; }
  .legal-meta-summary { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .single-article-title { font-size: 22px; }
  .post-navigation { grid-template-columns: 1fr; }
  .subpage-cta-banner { padding: 30px 18px; }
  .subpage-cta-banner h2 { font-size: 22px; }
  .standard-page-card { padding: 22px 16px; }
}
