/* ================================
   NM Blog Show – Clean v3 (Mobile Safe + Fast)
   Scope: .nm-blog-show
   ================================ */

.nm-blog-show{
  --nm-bg: #f6f7f9;
  --nm-surface: #ffffff;
  --nm-border: rgba(0,0,0,.08);
  --nm-text: #111827;
  --nm-muted: rgba(17,24,39,.62);
  --nm-accent: #16a34a;
  --nm-radius-lg: 20px;
  --nm-radius-md: 16px;
  --nm-shadow: 0 10px 22px rgba(17,24,39,.08);
  background: var(--nm-bg);
  color: var(--nm-text);
}

/* Prevent “cut off” on mobile */
.nm-blog-show-page{
  width: 100%;
  overflow-x: hidden;
}

/* Base */
.nm-blog-show *{ box-sizing: border-box; }
.nm-blog-show img{ max-width: 100%; height: auto; display: block; }

.nm-container{
  width: min(1200px, calc(100% - 24px));
  margin-inline: auto;
}

/* Simple spacing */
.nm-mt-15{ margin-top: 15px; }
.nm-mt-20{ margin-top: 20px; }
.nm-mt-30{ margin-top: 30px; }
.nm-mt-40{ margin-top: 40px; }
.nm-mt-50{ margin-top: 50px; }

/* --- Hero --- */
.nm-blog-hero{
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 420px at 50% 0%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(700px 380px at 12% 30%, rgba(22,163,74,.26), transparent 60%),
    radial-gradient(700px 380px at 88% 30%, rgba(14,165,233,.18), transparent 60%),
    linear-gradient(135deg, #0b3b2a 0%, #0f172a 100%);
  padding: clamp(22px, 4.2vw, 54px) 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.nm-hero-inner{
  width: min(860px, 100%);
  margin-inline: auto;
  text-align: center;
}

.nm-blog-title{
  font-size: clamp(22px, 2.2vw, 34px);
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -0.2px;
  margin: 0;
  color: #fff;
}

.nm-blog-hero-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.92);
}

.nm-meta-link,
.nm-meta-text{
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nm-meta-link:hover{ opacity: .92; text-decoration: underline; }

.nm-meta-dot{
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
}

.nm-hero-chips{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.nm-chip{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
  color: rgba(255,255,255,.95);
}

.nm-share-btn{
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.95);
}

.nm-share-btn:hover{ background: rgba(255,255,255,.14); }

/* JS hook class (just to keep it “known”) */
.js-share-blog{}

/* AI snippet */
.nm-hero-ai{
  margin: 18px auto 0;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--nm-radius-lg);
  padding: 14px 16px;
  text-align: start;
  color: rgba(255,255,255,.96);
}

.nm-hero-ai-title{
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 6px;
}

.nm-hero-ai-text{
  font-size: 14px;
  line-height: 2;
  opacity: .95;
}

/* --- Layout --- */
.nm-blog-main{
  padding: 18px 0 34px;
}

.nm-blog-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

@media (min-width: 992px){
  .nm-blog-layout{
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

/* --- Article --- */
.nm-article{
  background: var(--nm-surface);
  border: 1px solid var(--nm-border);
  border-radius: 24px;
  box-shadow: var(--nm-shadow);
  overflow: hidden;
}

.nm-cover{
  margin: 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: linear-gradient(180deg, rgba(0,0,0,.04), transparent);
}

.nm-cover img{
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.nm-article-inner{
  padding: clamp(16px, 2vw, 24px);
}

/* ---- The BIG mobile fix: content overflow control ---- */
.nm-blog-content{
  width: 100%;
  overflow-wrap: anywhere;
  line-height: 2.05;
}

/* Prevent tables/codes from breaking the viewport */
.nm-blog-content table{
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nm-blog-content pre,
.nm-blog-content code{
  max-width: 100%;
  overflow-x: auto;
}

/* --- Blocks (links / cta) --- */
.nm-block{
  background: var(--nm-surface);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-lg);
  box-shadow: var(--nm-shadow);
  padding: 16px;
}

.nm-block-title{
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.2px;
  margin: 0 0 10px;
}

.nm-links-list{
  margin: 0;
  padding-inline-start: 18px;
}

.nm-links-list li{ margin-bottom: 8px; }

.nm-links-list a{
  color: var(--nm-text);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,0,0,.22);
}

.nm-links-list a:hover{ border-bottom-style: solid; }

.nm-cta{
  background:
    radial-gradient(700px 220px at 15% 10%, rgba(22,163,74,.16), transparent 60%),
    radial-gradient(700px 220px at 85% 10%, rgba(14,165,233,.10), transparent 60%),
    rgba(255,255,255,.92);
}

.nm-cta-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nm-cta-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none;
  color: var(--nm-text);
  box-shadow: 0 8px 18px rgba(17,24,39,.06);
}

.nm-cta-btn:hover{ transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce){
  .nm-cta-btn:hover{ transform: none; }
}

/* --- FAQ (no bootstrap collapse) --- */
.nm-faqs{ margin-top: 12px; }

.nm-faq{
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-md);
  background: #fff;
  box-shadow: 0 10px 20px rgba(17,24,39,.06);
  overflow: hidden;
  margin-bottom: 10px;
}

.nm-faq-q{
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 950;
  list-style: none;
}

.nm-faq-q::-webkit-details-marker{ display: none; }

.nm-faq-a{
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(0,0,0,.06);
  line-height: 2;
  color: rgba(17,24,39,.82);
}

/* --- Related --- */
.nm-related-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 768px){
  .nm-related-grid{ grid-template-columns: 1fr 1fr; }
}

.nm-related-card{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  text-decoration: none;
  color: var(--nm-text);
  background: #fff;
  border: 1px solid var(--nm-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(17,24,39,.06);
}

.nm-related-img img{
  width: 100%;
  height: 100%;
  min-height: 96px;
  object-fit: cover;
}

.nm-related-body{
  padding: 12px 12px 12px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nm-related-title{
  font-weight: 900;
  line-height: 1.6;
}

.nm-related-date{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(17,24,39,.62);
}

/* --- Sidebar --- */
.nm-aside{ position: relative; }

@media (min-width: 992px){
  .nm-aside{
    position: sticky;
    top: 92px;
  }
}

.nm-aside-card{
  background: var(--nm-surface);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-lg);
  box-shadow: var(--nm-shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.nm-aside-title{
  font-size: 16px;
  font-weight: 950;
  margin: 0 0 10px;
}

.nm-side-link{
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(0,0,0,.02);
  display: block;
  color: var(--nm-text);
  font-weight: 850;
  line-height: 1.7;
  margin-top: 10px;
}

.nm-side-link:hover{ background: rgba(0,0,0,.03); }

/* Author card */
.nm-author-card{
  text-align: center;
}

.nm-author-avatar{
  width: 96px;
  height: 96px;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto;
  border: 4px solid rgba(255,255,255,.75);
  box-shadow: 0 10px 22px rgba(17,24,39,.10);
}

.nm-author-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nm-author-name{
  margin-top: 12px;
  font-weight: 950;
  font-size: 18px;
}

.nm-author-role{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(17,24,39,.62);
}

/* Cats */
.nm-cats-link{
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.02);
  border: 1px solid rgba(0,0,0,.06);
  color: var(--nm-text);
  text-decoration: none;
  font-weight: 800;
}

.nm-cats-link:hover{ background: rgba(0,0,0,.03); }

/* Recent posts */
.nm-recent-item{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: var(--nm-text);
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.nm-recent-item:last-of-type{ border-bottom: none; }

.nm-recent-img{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}

.nm-recent-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nm-recent-title{
  font-weight: 900;
  line-height: 1.6;
  font-size: 13px;
}

.nm-recent-date{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(17,24,39,.62);
}

/* Buttons */
.nm-btn{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.10);
  text-decoration: none;
  font-weight: 950;
  background: #fff;
  color: var(--nm-text);
}

.nm-btn-primary{
  background: var(--nm-accent);
  border-color: rgba(0,0,0,.10);
  color: #fff;
}

.nm-btn-primary:hover{ filter: brightness(.98); }
