/* =====================================================================
   blog-content.css — Single blog post / custom page typography
   ---------------------------------------------------------------------
   Used in 3 places:
     1. single.php  (blog post body)       → <div class="blog-content">
     2. page.php    (custom pages)         → <div class="blog-content">
     3. Admin rich-text editor (WYSIWYG)   → same class, so editor = site
   Everything is scoped to .blog-content, so nothing else is affected.
   CSS variables fall back to the site palette if frontend.css isn't loaded
   (e.g. inside the admin panel).
   ===================================================================== */

.blog-content{
  --bc-blue:var(--th-blue,#0b3d91);
  --bc-blue2:var(--th-blue2,#1558d6);
  --bc-sky:var(--th-sky,#eaf2ff);
  --bc-orange:var(--th-orange,#ff7a1a);
  --bc-green:var(--th-green,#16a34a);
  --bc-ink:var(--th-ink,#10213f);
  --bc-mute:var(--th-mute,#5b6b86);
  --bc-line:var(--th-line,#e3ebf8);
  --bc-head:var(--th-head,'Baloo 2','Noto Sans Devanagari',sans-serif);
  --bc-font:var(--th-font,'Noto Sans','Noto Sans Devanagari',system-ui,sans-serif);

  font-family:var(--bc-font);
  font-size:1.05rem;
  line-height:1.9;
  color:#26354f;
  overflow-wrap:break-word;
  word-wrap:break-word;
  hyphens:manual;
}
.blog-content > *:first-child{margin-top:0!important}
.blog-content > *:last-child{margin-bottom:0!important}
.blog-content *,.blog-content *::before,.blog-content *::after{box-sizing:border-box}

/* ── Paragraph ─────────────────────────────────────────── */
.blog-content p{margin:0 0 18px;color:inherit}
.blog-content p:empty{display:none}

/* ── Headings (H1 … H6) ────────────────────────────────── */
.blog-content h1,.blog-content h2,.blog-content h3,
.blog-content h4,.blog-content h5,.blog-content h6{
  font-family:var(--bc-head);
  font-weight:800;
  line-height:1.35;
  color:var(--bc-ink);
  scroll-margin-top:90px;
}
.blog-content h1{font-size:2rem;margin:34px 0 16px;color:var(--bc-blue);padding-bottom:10px;border-bottom:3px solid var(--bc-sky)}
.blog-content h2{
  font-size:1.55rem;margin:34px 0 16px;color:var(--bc-blue);
  padding:2px 0 2px 14px;border-left:5px solid var(--bc-blue2);
}
.blog-content h3{font-size:1.28rem;margin:28px 0 12px;color:var(--bc-ink);font-weight:700;position:relative;padding-bottom:6px}
.blog-content h3::after{content:'';position:absolute;left:0;bottom:0;width:42px;height:3px;border-radius:3px;background:var(--bc-orange)}
.blog-content h4{font-size:1.12rem;margin:24px 0 10px;color:var(--bc-blue2);font-weight:700}
.blog-content h5{font-size:1rem;margin:20px 0 8px;color:var(--bc-ink);font-weight:700;text-transform:uppercase;letter-spacing:.4px}
.blog-content h6{font-size:.92rem;margin:18px 0 8px;color:var(--bc-mute);font-weight:700;text-transform:uppercase;letter-spacing:.5px}

/* ── Inline text formatting ────────────────────────────── */
.blog-content strong,.blog-content b{font-weight:700;color:var(--bc-ink)}
.blog-content em,.blog-content i:not([class*="fa"]){font-style:italic}
.blog-content u{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:2px}
.blog-content s,.blog-content strike,.blog-content del{text-decoration:line-through;color:var(--bc-mute)}
.blog-content ins{text-decoration:none;background:#e7f9ed;padding:0 3px;border-radius:3px}
.blog-content mark{background:linear-gradient(transparent 55%,#ffe27a 55%);color:inherit;padding:0 2px}
.blog-content small{font-size:.84em;color:var(--bc-mute)}
.blog-content sup,.blog-content sub{font-size:.75em;line-height:0}
.blog-content abbr[title]{text-decoration:underline dotted;cursor:help}
.blog-content a{border-bottom:0;color:var(--bc-blue2);font-weight:600;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1.5px;transition:color .15s}
.blog-content a:hover{color:var(--bc-orange)}
.blog-content a.th-sc-btn,.blog-content a.th-sc-btn:hover{text-decoration:none}

/* ── Lists: bullets (dots), numbers, nested ────────────── */
.blog-content ul,.blog-content ol{margin:14px 0 22px;padding-left:28px;list-style-position:outside}
.blog-content ul{list-style-type:disc}
.blog-content ol{list-style-type:decimal}
.blog-content ul ul{list-style-type:circle}
.blog-content ul ul ul{list-style-type:square}
.blog-content ol ol{list-style-type:lower-alpha}
.blog-content ol ol ol{list-style-type:lower-roman}
.blog-content ul ul,.blog-content ol ol,.blog-content ul ol,.blog-content ol ul{margin:8px 0 6px}
.blog-content li{margin:0 0 8px;padding-left:4px;line-height:1.8}
.blog-content li > p{margin:0 0 6px}
.blog-content li::marker{color:var(--bc-blue2);font-weight:700}
.blog-content ol > li::marker{color:var(--bc-orange)}
.blog-content dl{margin:14px 0 22px}
.blog-content dt{font-weight:700;color:var(--bc-ink);margin-top:10px}
.blog-content dd{margin:2px 0 8px 22px;color:var(--bc-mute)}

/* ── Quote / code / rule ───────────────────────────────── */
.blog-content blockquote{
  position:relative;margin:24px 0;padding:18px 24px 18px 28px;
  border-left:5px solid var(--bc-orange);background:#fff8f0;
  border-radius:0 14px 14px 0;color:var(--bc-ink);font-style:italic;
}
.blog-content blockquote::before{content:'\201C';position:absolute;left:8px;top:-6px;font-size:3.4rem;line-height:1;color:rgba(255,122,26,.28);font-family:Georgia,serif}
.blog-content blockquote p:last-child{margin-bottom:0}
.blog-content blockquote cite{display:block;margin-top:8px;font-size:.86rem;font-style:normal;color:var(--bc-mute)}
.blog-content code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.88em;background:#eef3fb;color:#b4215c;padding:2px 7px;border-radius:6px}
.blog-content pre{margin:20px 0;padding:16px 18px;background:#0f1b33;color:#e6edf8;border-radius:14px;overflow-x:auto;font-size:.9rem;line-height:1.65}
.blog-content pre code{background:none;color:inherit;padding:0;font-size:inherit}
.blog-content kbd{font-family:ui-monospace,monospace;font-size:.85em;background:#fff;border:1px solid #cdd8ec;border-bottom-width:2px;border-radius:6px;padding:1px 7px}
.blog-content hr{border:0;height:2px;background:linear-gradient(90deg,transparent,var(--bc-line),transparent);margin:32px 0}

/* ── Images & figures ──────────────────────────────────── */
.blog-content img{max-width:100%;height:auto;border-radius:14px;margin:20px auto;display:block;border:1px solid var(--bc-line);box-shadow:0 6px 18px rgba(16,60,140,.08)}
.blog-content p > img:only-child{margin-top:6px;margin-bottom:6px}
.blog-content figure{margin:24px auto;max-width:100%;text-align:center}
.blog-content figure img{margin:0 auto}
.blog-content figcaption{margin-top:9px;font-size:.84rem;color:var(--bc-mute);font-style:italic;text-align:center}
/* alignment produced by the editor (inline styles / classes) */
.blog-content img[style*="float: left"],.blog-content img[style*="float:left"],.blog-content img.alignleft{float:left;margin:6px 24px 14px 0;max-width:48%}
.blog-content img[style*="float: right"],.blog-content img[style*="float:right"],.blog-content img.alignright{float:right;margin:6px 0 14px 24px;max-width:48%}
.blog-content img.aligncenter{margin-left:auto;margin-right:auto;float:none}
.blog-content::after{content:'';display:block;clear:both}
.blog-content h2,.blog-content h3,.blog-content h4,.blog-content blockquote,.blog-content table,.blog-content .th-sc-callout,.blog-content .th-sc-video{clear:both}

/* ── Tables ────────────────────────────────────────────── */
.blog-content table{width:100%;border-collapse:separate;border-spacing:0;margin:22px 0;font-size:.95rem;display:block;overflow-x:auto;border:1px solid var(--bc-line);border-radius:12px;-webkit-overflow-scrolling:touch}
.blog-content table tbody,.blog-content table thead{display:table;width:100%;min-width:480px}
.blog-content th{background:var(--bc-sky);color:var(--bc-blue);text-align:left;font-weight:700}
.blog-content th,.blog-content td{padding:11px 15px;border-bottom:1px solid var(--bc-line);border-right:1px solid var(--bc-line);vertical-align:top}
.blog-content tr:last-child td{border-bottom:0}
.blog-content th:last-child,.blog-content td:last-child{border-right:0}
.blog-content tbody tr:nth-child(even) td{background:#f9fbff}
.blog-content td p,.blog-content th p{margin:0}

/* ── Embeds ────────────────────────────────────────────── */
.blog-content iframe,.blog-content video{max-width:100%;border:0;border-radius:12px}
.blog-content video{display:block;margin:20px auto;background:#000}
.blog-content iframe{display:block;margin:20px auto;aspect-ratio:16/9;width:100%;height:auto}
.blog-content .th-sc-video{margin:26px 0}
.blog-content .th-sc-video-box{position:relative;width:100%;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#000;box-shadow:0 10px 28px rgba(16,60,140,.2)}
.blog-content .th-sc-video-box iframe{position:absolute;inset:0;width:100%;height:100%;margin:0;border-radius:0;aspect-ratio:auto}

/* ── Alignment helpers from editor ─────────────────────── */
.blog-content [style*="text-align: center"],.blog-content [style*="text-align:center"]{text-align:center}
.blog-content [style*="text-align: right"],.blog-content [style*="text-align:right"]{text-align:right}
.blog-content [style*="text-align: justify"],.blog-content [style*="text-align:justify"]{text-align:justify}

/* =====================================================================
   SHORTCODE COMPONENTS (rendered by includes/shortcodes.php)
   ===================================================================== */

/* ── Buttons  [button url=".." style=".." size=".." align=".."] ── */
.blog-content .th-sc-btnwrap{margin:20px 0;display:flex;flex-wrap:wrap;gap:12px}
.blog-content .th-sc-align-left{justify-content:flex-start}
.blog-content .th-sc-align-center{justify-content:center}
.blog-content .th-sc-align-right{justify-content:flex-end}
.blog-content .th-sc-align-full .th-sc-btn{width:100%;justify-content:center}
.blog-content .th-sc-btn{
  display:inline-flex;align-items:center;gap:8px;font-family:var(--bc-head);font-weight:700;line-height:1.2;
  padding:12px 24px;border-radius:12px;border:2px solid transparent;cursor:pointer;
  color:#fff;background:var(--bc-blue2);text-align:center;
  box-shadow:0 6px 16px rgba(21,88,214,.28);transition:transform .15s,box-shadow .15s,background .15s;
}
.blog-content .th-sc-btn:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(21,88,214,.34);color:#fff}
.blog-content .th-sc-btn:active{transform:translateY(0)}
.blog-content .th-sc-btn i{font-size:.95em}
.blog-content .th-sc-btn--sm{padding:8px 16px;font-size:.85rem;border-radius:10px}
.blog-content .th-sc-btn--md{font-size:1rem}
.blog-content .th-sc-btn--lg{padding:15px 32px;font-size:1.12rem;border-radius:14px}
.blog-content .th-sc-btn--primary{background:linear-gradient(135deg,#1558d6,#0b3d91)}
.blog-content .th-sc-btn--orange{background:linear-gradient(135deg,#ff8a2d,#f06400);box-shadow:0 6px 16px rgba(240,100,0,.3)}
.blog-content .th-sc-btn--orange:hover{box-shadow:0 10px 22px rgba(240,100,0,.38)}
.blog-content .th-sc-btn--green{background:linear-gradient(135deg,#22c55e,#15803d);box-shadow:0 6px 16px rgba(22,163,74,.3)}
.blog-content .th-sc-btn--green:hover{box-shadow:0 10px 22px rgba(22,163,74,.38)}
.blog-content .th-sc-btn--red{background:linear-gradient(135deg,#ef4444,#b91c1c);box-shadow:0 6px 16px rgba(220,38,38,.3)}
.blog-content .th-sc-btn--dark{background:linear-gradient(135deg,#1e293b,#0f172a);box-shadow:0 6px 16px rgba(15,23,42,.3)}
.blog-content .th-sc-btn--light{background:#fff;color:var(--bc-blue)!important;border-color:var(--bc-line);box-shadow:0 4px 12px rgba(16,60,140,.1)}
.blog-content .th-sc-btn--outline{background:transparent;color:var(--bc-blue2)!important;border-color:var(--bc-blue2);box-shadow:none}
.blog-content .th-sc-btn--outline:hover{background:var(--bc-blue2);color:#fff!important}

/* ── Callouts  [callout type="info|success|warning|danger|tip"] ── */
.blog-content .th-sc-callout{
  --c:#1558d6;--bg:#eef4ff;
  display:flex;gap:14px;align-items:flex-start;margin:24px 0;padding:16px 20px;
  background:var(--bg);border:1px solid color-mix(in srgb,var(--c) 28%,#fff);border-left:5px solid var(--c);border-radius:14px;
}
.blog-content .th-sc-callout-ic{color:var(--c);font-size:1.25rem;margin-top:3px;flex-shrink:0}
.blog-content .th-sc-callout-body{flex:1;min-width:0}
.blog-content .th-sc-callout-body > *:last-child{margin-bottom:0}
.blog-content .th-sc-callout-t{display:block;color:var(--c);font-family:var(--bc-head);font-size:1.05rem;margin-bottom:4px}
.blog-content .th-sc-callout--success{--c:#16a34a;--bg:#effbf3}
.blog-content .th-sc-callout--warning{--c:#d97706;--bg:#fff8eb}
.blog-content .th-sc-callout--danger{--c:#dc2626;--bg:#fff0f0}
.blog-content .th-sc-callout--tip{--c:#7c3aed;--bg:#f6f0ff}

/* ── Checklist  [checklist] ── */
.blog-content ul.th-sc-checklist{list-style:none;padding:0;margin:18px 0 24px}
.blog-content ul.th-sc-checklist li{position:relative;padding:3px 0 3px 36px;margin:0 0 6px}
.blog-content ul.th-sc-checklist li::before{
  content:'\f00c';font-family:'Font Awesome 6 Free';font-weight:900;position:absolute;left:0;top:5px;
  width:24px;height:24px;border-radius:50%;background:#dcfce7;color:#16a34a;font-size:.7rem;
  display:flex;align-items:center;justify-content:center;
}
.blog-content ul.th-sc-checklist li::marker{content:''}

/* ── Steps  [steps]  (numbered circles) ── */
.blog-content ol.th-sc-steps{list-style:none;counter-reset:scstep;padding:0;margin:22px 0 26px}
.blog-content ol.th-sc-steps li{counter-increment:scstep;position:relative;margin:0 0 14px;padding:4px 0 4px 54px;min-height:40px}
.blog-content ol.th-sc-steps li::before{
  content:counter(scstep);position:absolute;left:0;top:0;width:38px;height:38px;border-radius:50%;
  background:linear-gradient(135deg,#ff8a2d,#f06400);color:#fff;font-family:var(--bc-head);font-weight:800;font-size:1.05rem;
  display:flex;align-items:center;justify-content:center;box-shadow:0 4px 10px rgba(240,100,0,.3);
}
.blog-content ol.th-sc-steps li:not(:last-child)::after{content:'';position:absolute;left:18px;top:42px;bottom:-12px;width:2px;background:var(--bc-line)}
.blog-content ol.th-sc-steps li::marker{content:''}

/* ── Accordion  [accordion title=".."] ── */
.blog-content .th-sc-acc{margin:12px 0;border:1px solid var(--bc-line);border-radius:12px;background:#fff;overflow:hidden}
.blog-content .th-sc-acc summary{cursor:pointer;padding:14px 18px;font-weight:700;color:var(--bc-ink);list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px}
.blog-content .th-sc-acc summary::-webkit-details-marker{display:none}
.blog-content .th-sc-acc summary::after{content:'+';font-size:1.4rem;line-height:1;color:var(--bc-blue2);transition:transform .2s}
.blog-content .th-sc-acc[open] summary{background:var(--bc-sky);color:var(--bc-blue)}
.blog-content .th-sc-acc[open] summary::after{content:'\2212'}
.blog-content .th-sc-acc-body{padding:14px 18px 6px;border-top:1px solid var(--bc-line)}

/* ── Divider  [divider style="line|dots|gradient"] ── */
.blog-content hr.th-sc-divider--dots{height:auto;background:none;border:0;text-align:center;margin:30px 0;overflow:visible;line-height:1}
.blog-content hr.th-sc-divider--dots::after{content:'\2022  \2022  \2022';letter-spacing:10px;color:var(--bc-orange);font-size:1.3rem}
.blog-content hr.th-sc-divider--gradient{height:4px;border-radius:4px;background:linear-gradient(90deg,var(--bc-blue2),var(--bc-orange))}

/* ── Responsive ────────────────────────────────────────── */
@media(max-width:640px){
  .blog-content{font-size:1rem;line-height:1.85}
  .blog-content h1{font-size:1.65rem}
  .blog-content h2{font-size:1.32rem}
  .blog-content h3{font-size:1.15rem}
  .blog-content img[style*="float"],.blog-content img.alignleft,.blog-content img.alignright{float:none!important;margin:16px auto!important;max-width:100%!important}
  .blog-content ul,.blog-content ol{padding-left:22px}
  .blog-content .th-sc-btnwrap{flex-direction:column}
  .blog-content .th-sc-btn{width:100%;justify-content:center}
  .blog-content .th-sc-callout{padding:14px 14px;gap:10px}
}
@media print{
  .blog-content .th-sc-btnwrap,.blog-content .th-sc-video{display:none}
  .blog-content a::after{content:' (' attr(href) ')';font-size:.8em;color:#666}
}
