/* =========================================================
   SINGLE POST PAGE — FULL STYLESHEET (Updated)
   ========================================================= */

/* Google fonts (optional if enqueued via PHP already) */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght@300;400;600');

/* ========= Main wrapper ========= */
.sp-wrap {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

/* ========= Grid layout ========= */
.sp-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

/* ===== LEFT column ===== */
.sp-left {
  position: relative;
  --hero-card-inset: clamp(16px, 3vw, 32px);
}

/* Hero image */
.sp-hero { position: relative; }
.sp-hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .06);
}

/* Content card */
.sp-card {
  width: calc(100% - (var(--hero-card-inset) * 2));
  margin: -60px var(--hero-card-inset) 0 var(--hero-card-inset);
  background: #fff;
  border-radius: 5px;
  position: relative;
  z-index: 3;
  overflow: hidden;
}
.sp-card-head { padding: 22px 24px 0; }
.sp-title {
  margin: 0 0 8px;
  line-height: 1.2;
  font-family: "Nunito Sans", sans-serif;
  font-size: 24px;
  font-weight: 700;
}
.sp-meta {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 12px;
}
.sp-content { padding: 0 24px 24px; }

/* ===== RIGHT column ===== */
.sp-sidebar {}

/* Sidebar box */
.sp-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .06);
  padding: 20px;
  margin-bottom: 18px;
  text-align: left;
}
.sp-box-title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  margin: 0 0 12px;
}

/* Useful resources list */
.sp-list-bullets {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
}
.sp-list-bullets li { margin-bottom: 8px; text-align: left; }
.sp-list-bullets a {
  font-family: "Nunito Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #111;
  text-decoration: none;
}
.sp-list-bullets a:hover { color: #207A4E; text-decoration: underline; }

/* Popular posts */
.sp-popular { list-style: none; margin: 0; padding: 0; }
.sp-pop-item { border-bottom: 1px solid #f0f0f0; }
.sp-pop-item:last-child { border-bottom: 0; }
.sp-pop-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  text-decoration: none;
  color: #111;
}
.sp-pop-thumb img {
  width: 66px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}
.sp-pop-text {
  flex: 1;
  font-family: "Nunito Sans", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #207a4e;
}

/* Score badge */
.sp-badge {
  position: relative;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  z-index: 0;
}
.sp-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #207A4E;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.4,2.1-7.6,5.1C14.8,2.1,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.5,16,21.2,16,21.2s16-11.7,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 29.6"><path d="M23.6,0c-3.4,0-6.4,2.1-7.6,5.1C14.8,2.1,11.8,0,8.4,0C3.8,0,0,3.8,0,8.4c0,9.5,16,21.2,16,21.2s16-11.7,16-21.2C32,3.8,28.2,0,23.6,0z"/></svg>') center / contain no-repeat;
  z-index: -1;
}

/* Newsletter */
.sp-muted {
  color: #000;
  margin: 6px 0;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding-bottom: 15px;
}
.sp-newsletter { display: flex; }
.sp-newsletter input {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #207A4E;
  border-right: none;
  background: #F0F0F0;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}
.sp-newsletter button {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  background: #207A4E;
  color: #fff;
  border: 1px solid #207A4E;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
  cursor: pointer;
}
.sp-newsletter button:hover { background: #1b6d45; }

/* Sticky elements */
.sp-wrap,
.sp-grid,
.sp-sidebar { overflow: visible !important; }
.sp-sidebar {
  align-self: stretch;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.sp-sticky-end {
  position: sticky;
  top: 40px;
  z-index: 1;
}

/* TOC styles */
.custom-toc-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(0,0,0,.06);
  padding: 20px;
  margin: 24px 0;
  font-family: "Nunito Sans", system-ui, sans-serif;
}
.custom-toc-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: .3px;
}
.custom-toc-list { list-style: none; margin: 0; padding: 0; }
.custom-toc-list li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0 10px 48px;
  border-bottom: 1px solid #f1f1f1;
}
.custom-toc-list li:last-child { border-bottom: 0; }
.custom-toc-list li::before {
  content: "link";
  font-family: "Material Symbols Outlined";
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
  position: absolute;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #eaf3ee;
  color: #207A4E;
  font-size: 20px;
}
.custom-toc-list .mi { display: none !important; }
.custom-toc-list a {
  text-decoration: none;
  color: #000 !important;
  font-size: 16px;
  font-weight: 600;
}
.custom-toc-list a:hover { text-decoration: underline; }
.has-toc-anchor { scroll-margin-top: 90px; }

/* Related posts */
.related-post-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(0,0,0,.06);
  padding: 20px;
  margin: 28px 0;
  font-family: "Lora", serif;
}
.related-heading-wrapper { display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px; }
.green-bar-left { width: 6px; background: #207A4E; border-radius: 4px; }
.related-headings .related-title-green {
  color: #207A4E;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.related-headings .related-title-black {
  font-size: 24px;
  font-weight: 800;
  color: #181818;
}
.related-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  gap: 12px;
}
.related-item:last-child { border-bottom: 0; }
.related-thumb img {
  width: 85px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.related-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}
.related-post-title {
  font-weight: 700;
  color: #111;
  font-size: 16px;
  flex: 1;
  font-family: 'Nunito Sans';
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.related-post-title:hover { color: #207A4E; text-decoration: underline; }
.related-book-button {
  padding: 8px 14px;
  background: #207A4E;
  color: #fff;
  border-radius: 6px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  text-decoration: none;
}

/* Typography */
.single-post h1,
.single-post h2 {
  font-family: "Nunito Sans", sans-serif;
  font-size: 24px;
  font-weight: 700;
}
.single-post p {
  font-family: "Nunito Sans", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.65;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .sp-grid { grid-template-columns: 1fr; }
  .sp-card {
    width: calc(100% - 6%);
    margin: -40px auto 0;
  }
  .sp-sticky-end { position: static; top: auto; }
  .sp-badge { width: 48px; height: 48px; font-size: 13px; }
}

/* Mobile: hide sidebar on single posts */
@media (max-width: 768px) {
  .sp-grid {
    grid-template-columns: 1fr !important;
  }
  .sp-sidebar { display: none !important; }
  .sp-left { width: 100% !important; }
  .sp-title { font-size: 20px; }
  .single-post p { font-size: 16px; }
}

/* =========================================================
   MOBILE MENU (drawer) — add-on
   ========================================================= */

/* Show desktop nav only on desktop */
@media (min-width: 769px){
  .site-navigation .desktop-menu{ display:block; }
  .menu-toggle, .mobile-menu-panel{ display:none !important; }
}

/* Base: hide desktop menu on phones */
@media (max-width: 768px){
  .site-navigation .desktop-menu{ display:none; }
}

/* Panel is hidden by default */
.mobile-menu-panel{
  position: fixed; inset: 0; z-index: 1000;
  display: none;
  background: rgba(0,0,0,.45);
}

/* Shown when JS adds .show */
.mobile-menu-panel.show{ display: block; }

/* Drawer */
.mobile-menu-panel .main-menu{
  position: absolute; top: 0; right: 0;
  width: 82%; max-width: 320px; height: 100%;
  background: #fff; overflow-y: auto; padding: 20px 12px;
  box-shadow: -12px 0 24px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .28s ease;
}
.mobile-menu-panel.show .main-menu{ transform: translateX(0); }

/* Close button inside drawer */
.menu-close{
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; border: 1px solid #ddd; border-radius: 8px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  z-index: 1101;
}

/* Reset list look inside drawer */
.mobile-menu-panel .main-menu,
.mobile-menu-panel .main-menu ul{ list-style: none; margin: 0; padding: 0; }
.mobile-menu-panel .main-menu li{ margin: 0; }
.mobile-menu-panel .main-menu a{
  display: block; padding: 12px 14px; text-decoration: none;
  color: #111; font-weight: 500;
}

/* Toggle button */
.menu-toggle{
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid #ddd; border-radius: 8px;
  background: #fff; line-height: 1; cursor: pointer; z-index: 1100;
}

/* Prevent background scroll while menu is open (JS adds .no-scroll to <body>) */
.no-scroll{ overflow: hidden; }






/* ===== Mobile overrides (put LAST in the file) ===== */
@media screen and (max-width: 820px), (hover: none) and (pointer: coarse) {
  /* Card padding */
  .sp-card-head { padding: 22px 9px 0 !important; }
  .sp-content   { padding: 0 9px 24px !important; }

  /* TOC text */
  .custom-toc-list a {
    text-decoration: none;
    color: #000 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
  }

  /* Related section */
  .related-item {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #eee !important;
    gap: 12px !important;
  }
  .related-info {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 0 !important;
    flex: 1 !important;
    flex-direction: column !important;
  }
  .related-book-button {
    padding: 3px 10px !important;
    background: #207A4E !important;
    color: #fff !important;
    border-radius: 6px !important;
    font-family: "Poppins", sans-serif !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 12px !important;
  }
  .related-headings .related-title-black {
    font-size: 19px !important;
    font-weight: 800 !important;
    color: #181818 !important;
  }

  /* Section titles (make 28px win everywhere) */
  h2.section-title,
  .custom-second-wrapper h2.section-title {
    font-size: 28px !important;
  }

  .video-section-title {
    font-size: 23px !important;
    text-align: center !important;
  }

  .author-box-title {
    text-align: center !important;
  }

  .custom-second-wrapper h2.section-title {
    text-align: center !important;
    margin-bottom: 30px !important;
    font-family: 'EB Garamond', serif !important;
    font-weight: bold !important;
    color: #333333 !important;
  }

  .faq-section h2 {
    font-size: 22px !important;
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 30px !important;
    text-align: center !important;
  }
}

