:root {
  --primary: #2D1B69;
  --primary-light: #4A2F9A;
  --gold: #D4AF37;
  --gold-light: #E8C84A;
  --gold-glow: rgba(212, 175, 55, 0.3);
  --bg-midnight: #0D0221;
  --bg-surface: #1A1035;
  --bg-card: #1E1245;
  --bg-card-hover: #2A1F4A;
  --text-primary: #F0E6FF;
  --text-secondary: #B8A8D4;
  --text-muted: #8B7FA8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-midnight);
  color: var(--text-primary);
  line-height: 1.7;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
.container { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.nav {
  background: rgba(13, 2, 33, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.nav-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center; color: var(--bg-midnight); font-weight: 800;
}
.nav-links { display: flex; gap: 24px; list-style: none; align-items: center; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-midnight) !important;
  padding: 9px 20px; border-radius: 50px; font-weight: 600;
}

.post {
  padding: 60px 0 80px;
}
.post-header { margin-bottom: 40px; text-align: center; }
.post-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; letter-spacing: 0.5px; }
.post-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.2;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.post-excerpt { color: var(--text-secondary); font-size: 18px; max-width: 640px; margin: 0 auto; }

.post-cover { width: 100%; border-radius: 16px; margin-bottom: 40px; aspect-ratio: 16/9; object-fit: cover; }

.post-body { color: var(--text-primary); font-size: 17px; }
.post-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px; margin: 40px 0 16px;
  color: var(--gold);
}
.post-body h3 { font-size: 22px; margin: 28px 0 12px; color: var(--text-primary); }
.post-body p { margin-bottom: 18px; color: var(--text-secondary); }
.post-body strong { color: var(--text-primary); }
.post-body ul, .post-body ol { margin: 16px 0 18px 24px; color: var(--text-secondary); }
.post-body li { margin-bottom: 8px; }
.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 8px 18px;
  margin: 24px 0;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border-radius: 0 8px 8px 0;
}
.post-body code {
  background: var(--bg-surface); padding: 2px 6px; border-radius: 4px; font-size: 0.92em;
}

.video-embed {
  aspect-ratio: 16/9; width: 100%;
  margin: 36px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
}
.video-embed iframe { width: 100%; height: 100%; border: 0; }

.video-hint {
  margin: -22px 0 30px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.video-hint strong { color: var(--text-secondary); font-weight: 600; }

.video-summary {
  margin: 28px 0 36px;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
}
.video-summary h2 {
  margin: 0 0 14px;
  font-size: 19px;
  color: var(--gold);
  background: none; -webkit-text-fill-color: initial;
}
.video-summary ul { margin: 0; padding-left: 20px; }
.video-summary li {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}

.cta-card {
  margin: 48px 0;
  padding: 32px;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  text-align: center;
}
.cta-card h3 { font-family: 'Playfair Display', serif; color: var(--gold); font-size: 22px; margin-bottom: 8px; }
.cta-card p { color: var(--text-secondary); margin-bottom: 18px; }
.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-midnight) !important;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tag {
  background: var(--bg-surface);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--text-secondary);
  padding: 4px 12px; border-radius: 20px; font-size: 13px;
}

.footer {
  margin-top: 60px;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.blog-hero { text-align: center; padding: 80px 0 40px; }
.blog-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 6vw, 52px);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 12px;
}
.blog-hero p { color: var(--text-secondary); font-size: 18px; max-width: 600px; margin: 0 auto; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; padding: 24px 0 80px; }
.post-card {
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.post-card a { color: inherit; }
.post-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.post-card-body { padding: 20px; }
.post-card-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.post-card-title { font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 10px; color: var(--text-primary); }
.post-card-excerpt { color: var(--text-secondary); font-size: 14px; }

/* Related posts */
.related-posts { margin-top: 48px; padding-top: 40px; border-top: 1px solid rgba(212,175,55,0.2); }
.related-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 20px;
}
.related-grid { display: flex; flex-direction: column; gap: 10px; }
.related-card {
  background: var(--bg-card);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, border-color 0.25s;
  display: flex;
  align-items: center;
}
.related-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.related-cover { width: 88px; min-width: 88px; height: 60px; object-fit: cover; display: block; flex-shrink: 0; }
.related-info { padding: 8px 12px; flex: 1; min-width: 0; }
.related-date { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.related-heading { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 640px) {
  .nav-links li:not(:last-child) { display: none; }
  .post-title { font-size: 28px; }
}

/* ============================================================
   Blog newsletter pop-up (footer-ойролцоо slide-in, marketing)
   ============================================================ */
.blog-popup {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: linear-gradient(160deg, var(--bg-card) 0%, var(--bg-surface) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 40px var(--gold-glow);
  padding: 22px 22px 20px;
  /* Анхны төлөв: далд, доошоо болон бага зэрэг тунар */
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-popup.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.blog-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.blog-popup-close:hover { color: var(--gold); }
.blog-popup-icon {
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 6px;
}
.blog-popup-title {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 6px;
  padding-right: 16px;
}
.blog-popup-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.blog-popup-form {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.blog-popup-input {
  flex: 1;
  min-width: 0;
  background: rgba(13, 2, 33, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.blog-popup-input::placeholder { color: var(--text-muted); }
.blog-popup-input:focus { border-color: var(--gold); }
.blog-popup-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: #1A1035;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.blog-popup-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--gold-glow); }
.blog-popup-btn:disabled { opacity: 0.6; cursor: default; transform: none; box-shadow: none; }
.blog-popup-msg {
  font-size: 12.5px;
  min-height: 16px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}
.blog-popup-msg.is-error { color: #ff8b8b; }
.blog-popup-msg.is-ok { color: var(--gold-light); }
.blog-popup-secondary {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding-top: 12px;
  transition: color 0.2s;
}
.blog-popup-secondary:hover { color: var(--gold-light); }

@media (max-width: 640px) {
  .blog-popup { right: 12px; left: 12px; bottom: 12px; width: auto; padding: 18px 18px 16px; }
  .blog-popup-title { font-size: 17px; }
}

/* FAQ section (SEO FAQPage-тэй хамт) */
.faq-section { margin-top: 48px; padding-top: 40px; border-top: 1px solid rgba(212, 175, 55, 0.2); }
.faq-title { font-family: 'Playfair Display', serif; color: var(--gold); font-size: 24px; margin-bottom: 20px; }
.faq-item {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 600;
  color: var(--text-primary, #fff);
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 20px;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 18px 16px; color: var(--text-secondary); line-height: 1.7; margin: 0; }

/* mysticsync хувийн тайлангийн CTA (блог → тайлан funnel) */
.cta-report {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(147, 112, 219, 0.12), rgba(212, 175, 55, 0.10));
  border: 1px solid rgba(147, 112, 219, 0.35);
}
/* Хоёрдогч (тайлангийн доор орох) номын CTA — үндсэн тайлангийн картаас
   сулавтар харагдана: сонирхсон хүнд боломж үлдээх ч гол саналыг дарахгүй. */
.cta-secondary {
  background: rgba(147, 112, 219, 0.06);
  border-color: rgba(147, 112, 219, 0.20);
  margin-top: 12px;
}
.cta-secondary h3 { font-size: 19px; }
.cta-secondary .cta-btn {
  background: transparent;
  color: var(--gold-light, #e8c765);
  border: 1px solid rgba(212, 175, 55, 0.45);
}

.cta-report-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-light, #e8c765);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
