/* ==========================================================================
   MarbleMap — Blog CSS (loaded LAST by _Layout, after Bexon main.css)
   --------------------------------------------------------------------------
   ONLY the gaps Bexon main.css does not already cover. The card grid
   (.blog-item.style-3 / .style-2), the .blog-date badge, the .tj-pagination
   pager, .tj-page-header hero and .sec-heading section header are all reused
   verbatim from main.css — nothing is duplicated here. This file adds the
   blog-only pieces (search box, category pills, featured eyebrow, sub-section
   heads, post-body prose, the sticky sidebar / TOC / CTA / newsletter cards,
   tag chips and empty states), all keyed off the theme's own --tj-* custom
   properties (indigo/violet, Mona Sans) so they inherit the palette.
   Namespaced .mm-* to avoid colliding with any Bexon/Crafto JS-bound classes.
   ========================================================================== */

/* ---- Blog search box (BlogList + BlogSearch hero) ---------------------- */
.mm-blog-search {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 30px auto 0;
  padding: 6px 6px 6px 22px;
  background: var(--tj-color-common-white);
  border: 1px solid var(--tj-color-theme-bg-2);
  border-radius: 40px;
  box-shadow: 0 12px 32px rgba(28, 25, 69, 0.07);
}
.mm-blog-search__icon {
  display: inline-flex;
  font-size: 18px;
  color: var(--tj-color-theme-primary);
}
.mm-blog-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 14px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--tj-ff-body);
  font-size: 16px;
  color: var(--tj-color-theme-dark);
}
.mm-blog-search__input::placeholder { color: var(--tj-color-text-body-2); }
.mm-blog-search__btn {
  flex: 0 0 auto;
  border: 0;
  border-radius: 30px;
  padding: 12px 28px;
  background: var(--tj-color-theme-primary);
  color: var(--tj-color-common-white);
  font-family: var(--tj-ff-body);
  font-size: 15px;
  font-weight: var(--tj-fw-sbold);
  cursor: pointer;
  transition: background 0.25s ease;
}
.mm-blog-search__btn:hover { background: var(--tj-color-theme-dark); }
@media (max-width: 575px) {
  .mm-blog-search { padding-left: 16px; }
  .mm-blog-search__btn { padding: 10px 18px; }
}

/* ---- Category pill nav ------------------------------------------------- */
.mm-cat-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}
.mm-cat-pill {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--tj-color-theme-bg-2);
  border-radius: 24px;
  background: var(--tj-color-common-white);
  font-size: 14px;
  font-weight: var(--tj-fw-sbold);
  line-height: 1.4;
  color: var(--tj-color-theme-dark);
  text-decoration: none;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.mm-cat-pill:hover {
  border-color: var(--tj-color-theme-primary);
  color: var(--tj-color-theme-primary);
}
.mm-cat-pill.is-active {
  background: var(--tj-color-theme-primary);
  border-color: var(--tj-color-theme-primary);
  color: var(--tj-color-common-white);
}

/* ---- Featured hero (Bexon .blog-item.style-2 + eyebrow/bigger title) --- */
.mm-featured { margin-top: 8px; }
.mm-featured-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: var(--tj-fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tj-color-theme-primary);
}
.mm-featured .title { font-size: 30px; line-height: 1.2; }
@media only screen and (min-width: 992px) and (max-width: 1199px) { .mm-featured .title { font-size: 26px; } }
@media (max-width: 575px) { .mm-featured .title { font-size: 24px; } }
.mm-featured .desc {
  margin-top: 14px;
  color: var(--tj-color-text-body);
  font-size: 16px;
  line-height: 1.7;
}

/* ---- Sub-section heads ("Latest posts" / "Featured posts" / related) --- */
.mm-section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 30px;
}
.mm-section-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--tj-color-theme-bg-2);
}
.mm-section-title {
  margin: 0;
  font-size: 26px;
  font-weight: var(--tj-fw-bold);
  color: var(--tj-color-theme-dark);
}
.mm-section-head.is-center { justify-content: center; }
.mm-section-head.is-center::after { display: none; }

/* ---- Post detail — meta line, category badge, cover ------------------- */
.mm-post-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.mm-post-cat-badge {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 20px;
  background: var(--tj-color-theme-primary);
  color: var(--tj-color-common-white);
  font-size: 13px;
  font-weight: var(--tj-fw-sbold);
  text-decoration: none;
  transition: background 0.25s ease;
}
.mm-post-cat-badge:hover { background: var(--tj-color-theme-dark); color: var(--tj-color-common-white); }
.mm-post-meta__date { font-size: 15px; color: var(--tj-color-text-body-3); }
.mm-post-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
}

/* ---- Post detail — two-column layout with sticky sidebar -------------- */
.mm-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 52px;
  align-items: start;
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
  .mm-post-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
}
@media (max-width: 991px) {
  .mm-post-layout { grid-template-columns: 1fr; gap: 44px; }
}
.mm-post-sidebar {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
@media (max-width: 991px) { .mm-post-sidebar { position: static; top: auto; } }

/* ---- Post body prose -------------------------------------------------- */
.mm-prose {
  font-size: 17px;
  line-height: 1.75;
  color: #3a3a4a;
}
.mm-prose > p { margin: 0 0 20px; }
.mm-prose > p:last-child { margin-bottom: 0; }
.mm-prose h2 {
  margin: 42px 0 16px;
  font-size: 28px;
  font-weight: var(--tj-fw-bold);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--tj-color-theme-dark);
  scroll-margin-top: 110px;
}
.mm-prose h3 {
  margin: 32px 0 12px;
  font-size: 22px;
  font-weight: var(--tj-fw-bold);
  line-height: 1.3;
  color: var(--tj-color-theme-dark);
  scroll-margin-top: 110px;
}
.mm-prose h2:first-child,
.mm-prose h3:first-child { margin-top: 0; }
.mm-prose a {
  color: var(--tj-color-theme-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mm-prose a:hover { color: var(--tj-color-theme-dark); }

/* ---- Tag chips -------------------------------------------------------- */
.mm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--tj-color-theme-bg-2);
}
.mm-tag {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 20px;
  background: var(--tj-color-theme-bg);
  color: var(--tj-color-theme-dark);
  font-size: 13px;
  font-weight: var(--tj-fw-sbold);
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.mm-tag:hover { background: var(--tj-color-theme-primary); color: var(--tj-color-common-white); }

/* ---- Sidebar cards (TOC / CTA / newsletter) --------------------------- */
.mm-side-card {
  padding: 26px 24px;
  background: var(--tj-color-common-white);
  border: 1px solid var(--tj-color-theme-bg-2);
  border-radius: 16px;
}
.mm-side-card__title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: var(--tj-fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tj-color-theme-primary);
}

/* table of contents */
.mm-toc { margin: 0; padding: 0; list-style: none; }
.mm-toc li { margin: 0 0 10px; }
.mm-toc li:last-child { margin-bottom: 0; }
.mm-toc a {
  display: block;
  padding-left: 16px;
  border-left: 2px solid var(--tj-color-theme-bg-2);
  color: var(--tj-color-text-body);
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.mm-toc a:hover { color: var(--tj-color-theme-primary); border-left-color: var(--tj-color-theme-primary); }

/* product-invite CTA card */
.mm-side-cta {
  border: 0;
  color: var(--tj-color-common-white);
  background: linear-gradient(155deg, var(--tj-color-theme-dark) 0%, var(--tj-color-theme-primary) 100%);
}
.mm-side-cta__heading {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: var(--tj-fw-bold);
  color: var(--tj-color-common-white);
}
.mm-side-cta__text {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}
.mm-side-cta__links { display: flex; flex-direction: column; gap: 10px; }
.mm-side-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tj-color-common-white);
  font-size: 15px;
  font-weight: var(--tj-fw-sbold);
  text-decoration: none;
}
.mm-side-cta__link i { transition: transform 0.2s ease; }
.mm-side-cta__link:hover { color: var(--tj-color-common-white); }
.mm-side-cta__link:hover i { transform: translateX(4px); }

/* newsletter card */
.mm-side-news__intro {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--tj-color-text-body);
}
.mm-side-news__field { display: flex; gap: 8px; }
.mm-side-news__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 18px;
  border: 1px solid var(--tj-color-theme-bg-2);
  border-radius: 30px;
  background: var(--tj-color-common-white);
  font-family: var(--tj-ff-body);
  font-size: 14px;
  color: var(--tj-color-theme-dark);
  outline: 0;
  transition: border-color 0.2s ease;
}
.mm-side-news__input:focus { border-color: var(--tj-color-theme-primary); }
.mm-side-news__btn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--tj-color-theme-primary);
  color: var(--tj-color-common-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}
.mm-side-news__btn:hover { background: var(--tj-color-theme-dark); }
.mm-side-news__consent {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tj-color-text-body-3);
}
.mm-side-news__consent input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--tj-color-theme-primary); }
.mm-side-news__consent label { margin: 0; }
.mm-side-news__result { margin-top: 12px; font-size: 13.5px; color: var(--tj-color-theme-primary); }

/* ---- Search results count + empty states ------------------------------ */
.mm-search-count {
  margin-bottom: 26px;
  font-size: 15px;
  color: var(--tj-color-text-body-3);
  text-align: center;
}
.mm-empty {
  padding: 30px 0 10px;
  font-size: 17px;
  color: var(--tj-color-text-body);
  text-align: center;
}

/* ---- Pagination centering (reuses Bexon .tj-pagination) --------------- */
.mm-pagination { margin-top: 20px; }
.mm-pagination ul { justify-content: center; }
