/* ==========================================================
   Content pages — shared CMS template (page.blade.php)
   and single blog post (blog.blade.php). Prefix: ct-
   ========================================================== */
.ct-page {
  --ct-purple: #5a1fd3;
  --ct-purple-2: #7b19cb;
  --ct-ink: #1f1640;
  --ct-muted: #6b6785;
  --ct-line: #ece9f6;
  --ct-soft: #f6f4fd;
  --ct-orange-1: #fc9715;
  --ct-orange-2: #e45b2d;
  background: linear-gradient(180deg, #f7f5ff 0%, #ffffff 60%);
}

.ct-panel.main-area {
  position: relative;
  margin-top: -70px;
  padding: 48px 48px 40px;
  border: 1px solid var(--ct-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(60, 30, 140, 0.12);
}
.ct-panel--reading {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- reading body (on top of global .fm-prose) ---------- */
.ct-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.85;
  color: #4f4a6b;
}
.ct-body::after {
  content: "";
  display: table;
  clear: both;
}
/* editor HTML often carries its own fonts, colours and sizes */
.ct-body span,
.ct-body font {
  font-family: inherit !important;
  line-height: inherit !important;
}
.ct-body p,
.ct-body div {
  line-height: 1.85 !important;
}
.ct-body [style*="white-space: pre"],
.ct-body [style*="white-space:pre"] {
  white-space: normal !important;
}
.ct-body [style*="font-size"] {
  font-size: inherit !important;
}
.ct-body h1 [style*="font-size"],
.ct-body h2 [style*="font-size"],
.ct-body h3 [style*="font-size"],
.ct-body h4 [style*="font-size"] {
  font-size: inherit !important;
}
/* blocks pasted with fixed pixel widths (e.g. Elementor) squeeze the text */
.ct-body div[style*="width"],
.ct-body p[style*="width"],
.ct-body section[style*="width"],
.ct-body article[style*="width"],
.ct-body span[style*="width"] {
  width: auto !important;
}
.ct-body [style*="background-color"] {
  background-color: transparent !important;
}
.ct-body [style*="margin-left"],
.ct-body [style*="padding-left"] {
  margin-left: 0 !important;
}
/* theme heading font has no bold weight — use the body font so headings read as headings */
.ct-body h1, .ct-body h2, .ct-body h3,
.ct-body h4, .ct-body h5, .ct-body h6 {
  font-family: inherit !important;
  font-weight: 700 !important;
}
.ct-body .ct-empty {
  display: none !important;
}
.ct-body strong,
.ct-body b {
  color: var(--ct-ink);
}
.ct-body img {
  display: block;
  margin: 22px auto;
  float: none !important;
}
.ct-body iframe,
.ct-body video {
  display: block;
  width: 100%;
  margin: 22px 0;
  border: 0;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
  height: auto;
}
.ct-body hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--ct-line);
}
.ct-body table {
  overflow-x: auto;
  border-radius: 12px;
}
.ct-body th {
  color: var(--ct-ink);
  background: var(--ct-soft);
}
/* empty editor paragraphs (<p><br></p>) leave big gaps */
.ct-body p:empty,
.ct-body p:has(> br:only-child),
.ct-body > p:empty,
.ct-body > br + br {
  display: none;
}

/* ---------- help band (CMS pages) ---------- */
.ct-help {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 760px;
  margin: 40px auto 0;
  padding: 20px 22px;
  border: 1px solid var(--ct-line);
  border-radius: 18px;
  background: var(--ct-soft);
}
.ct-help__icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--ct-purple-2), var(--ct-purple));
}
.ct-help__text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ct-muted);
}
.ct-help__text strong {
  font-size: 17px;
  color: var(--ct-ink);
}

/* ---------- button ---------- */
.ct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, var(--ct-orange-1), var(--ct-orange-2));
  box-shadow: 0 10px 22px rgba(228, 91, 45, 0.3);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.ct-btn i {
  transition: transform 0.2s ease;
}
.ct-btn:hover,
.ct-btn:focus {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(228, 91, 45, 0.42);
}
.ct-btn:hover i {
  transform: translateX(4px);
}

/* ==========================================================
   Single blog post
   ========================================================== */
.ct-article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 44px;
  align-items: start;
}
.ct-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ct-purple);
}
.ct-back i {
  transition: transform 0.2s ease;
}
.ct-back:hover {
  color: var(--ct-purple-2);
}
.ct-back:hover i {
  transform: translateX(-4px);
}
.ct-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ct-purple);
  background: rgba(90, 31, 211, 0.08);
}
.ct-article__title {
  margin: 14px 0 16px;
  font-size: 34px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ct-ink);
  text-transform: none;
  overflow-wrap: anywhere;
}
.ct-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-bottom: 26px;
  font-size: 14px;
  color: var(--ct-muted);
}
.ct-meta i {
  margin-right: 5px;
  color: var(--ct-purple);
}
.ct-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ct-author img {
  width: 40px;
  height: 40px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(60, 30, 140, 0.18);
}
.ct-author strong {
  font-weight: 700;
  color: var(--ct-ink);
}
.ct-cover {
  margin: 0 0 32px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--ct-soft);
}
.ct-cover img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}
.ct-article .ct-body {
  max-width: none;
}

.ct-article__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--ct-line);
}
.ct-foot-label {
  margin-right: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ct-ink);
}
.ct-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ct-chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ct-muted);
  background: var(--ct-soft);
}
.ct-share {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-share #social-links ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ct-share #social-links li {
  margin: 0;
  padding: 0;
}
.ct-share #social-links li::before {
  display: none;
}
.ct-share .social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 17px;
  color: var(--ct-purple);
  background: rgba(90, 31, 211, 0.08);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.ct-share .social-button:hover {
  transform: translateY(-3px);
  color: #fff;
  background: linear-gradient(135deg, var(--ct-purple-2), var(--ct-purple));
}

/* ---------- sidebar ---------- */
.ct-sidebar {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ct-widget {
  padding: 22px;
  border: 1px solid var(--ct-line);
  border-radius: 20px;
  background: #fff;
}
.ct-widget__title {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ct-ink);
}
.ct-cat-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ct-cat-list li + li {
  margin-top: 6px;
}
.ct-cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ct-ink);
  transition: background 0.2s ease, color 0.2s ease;
}
.ct-cat-list a:hover {
  color: var(--ct-purple);
  background: var(--ct-soft);
}
.ct-cat-list a span {
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ct-purple);
  background: rgba(90, 31, 211, 0.08);
}
.ct-widget--cta {
  border: 0;
  background: linear-gradient(135deg, #f3eeff, #fdf3ec);
}
.ct-widget--cta p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ct-muted);
}
.ct-widget--cta .ct-btn {
  width: 100%;
}

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .ct-article-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .ct-sidebar {
    position: static;
  }
  .ct-article__title {
    font-size: 30px;
  }
}
@media (max-width: 767px) {
  .ct-panel.main-area {
    padding: 26px 18px;
    border-radius: 18px;
  }
  .ct-body {
    font-size: 15.5px;
    line-height: 1.8;
  }
  .ct-article__title {
    font-size: 25px;
  }
  .ct-cover {
    margin-bottom: 24px;
    border-radius: 14px;
  }
  .ct-help {
    flex-wrap: wrap;
    margin-top: 30px;
    padding: 18px;
  }
  .ct-help .ct-btn {
    width: 100%;
  }
  .ct-article__foot {
    flex-direction: column;
    align-items: flex-start;
  }
}
