:root {
  --sp-bg: #f5f6fa;
  --sp-bg-soft: #ffffff;
  --sp-border: #e1e4ec;
  --sp-border-soft: #f0f2f8;
  --sp-text-main: #111827;
  --sp-text-muted: #6b7280;
  --sp-text-soft: #9ca3af;
  --sp-accent: #0f9ad6;
  --sp-accent-soft: rgba(15, 154, 214, 0.08);
  --sp-accent-dark: #0b7fab;
  --sp-radius-lg: 18px;
  --sp-radius-md: 12px;
  --sp-radius-pill: 999px;
  --sp-shadow-soft: 0 18px 35px rgba(15, 23, 42, 0.08);
  --sp-shadow-subtle: 0 8px 18px rgba(15, 23, 42, 0.06);
}

body {
  background: var(--sp-bg);
}

/* WRAPPER UTAMA */
.single-post-page.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

@media (min-width: 1024px) {
  .single-post-page.container {
    padding: 3.5rem 0 5rem;
  }
}

.sp-article {
  background: var(--sp-bg-soft);
  border-radius: 24px;
  padding: 1.75rem 1.5rem 2.5rem;
  box-shadow: var(--sp-shadow-soft);
  border: 1px solid var(--sp-border-soft);
}

@media (min-width: 768px) {
  .sp-article {
    padding: 2.25rem 2.25rem 2.75rem;
  }
}

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--sp-text-soft);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--sp-text-muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 1px;
}

.breadcrumb a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--sp-accent);
  transition: width 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--sp-accent-dark);
}

.breadcrumb a:hover::after {
  width: 100%;
}

.breadcrumb span {
  color: var(--sp-text-main);
}

.breadcrumb .separator-icon {
  width: 14px;
}

/* TITLE */
.sp-article h1 {
  font-size: 1.8rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--sp-text-main);
}

@media (min-width: 768px) {
  .sp-article h1 {
    font-size: 2.1rem;
  }
}

/* META: AUTHOR & SHARE */
.author-share-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--sp-radius-md);
  background: #f9fafb;
  border: 1px solid var(--sp-border-soft);
  margin-bottom: 1.35rem;
}

@media (max-width: 640px) {
  .author-share-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

.author {
  font-size: 0.9rem;
  color: var(--sp-text-muted);
}

.author span a {
  font-weight: 600;
  color: var(--sp-accent-dark);
  text-decoration: none;
}

.author span a:hover {
  text-decoration: underline;
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.share-button-head {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.15);
}

.share-button-head svg {
  width: 17px;
  height: 17px;
}

.share-button-head.facebook {
  background: #1877f2;
}

.share-button-head.twitter {
  background: #111827;
}

.share-button-head.linkedin {
  background: #0a66c2;
}

.share-button-head.whatsapp {
  background: #22c55e;
}

.share-button-head:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.2);
  opacity: 0.95;
}

/* QUOTE / PARAGRAF PEMBUKA */
.paragraf-pembuka {
  position: relative;
  margin: 1.5rem 0 1.75rem;
  padding: 1rem 1.1rem 1rem 1.3rem;
  border-radius: var(--sp-radius-md);
  background: #f3f4f6;
  border-left: 4px solid var(--sp-accent);
}

.paragraf-pembuka p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--sp-text-muted);
  font-style: italic;
}

/* HERO IMAGE */
.post-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin: 1rem auto 1.9rem;
  box-shadow: var(--sp-shadow-subtle);
  border: 1px solid #e5e7eb;
  background: #e5e7eb;
}

.thumbnail-image {
  max-height: 320px;
  margin: 1.25rem 0;
  border-radius: 18px;
}

/* DAFTAR ISI */
#daftar-isi {
  margin: 0 auto 1.9rem;
}

#daftar-isi > div,
#daftar-isi nav,
#daftar-isi .toc-wrapper {
  background: #f9fafb;
  border-radius: var(--sp-radius-md);
  border: 1px solid var(--sp-border-soft);
  padding: 1rem 1.15rem;
}

#daftar-isi h2,
#daftar-isi h3 {
  margin-top: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--sp-text-main);
}

#daftar-isi ul {
  padding-left: 1.25rem;
  margin: 0.4rem 0 0;
}

#daftar-isi li {
  margin: 0.18rem 0;
  font-size: 0.9rem;
}

#daftar-isi a {
  color: var(--sp-accent-dark);
  text-decoration: none;
}

#daftar-isi a:hover {
  text-decoration: underline;
}

/* KONTEN PANJANG */
#long-description {
  margin-top: 2rem;
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--sp-text-main);
}

#long-description p {
  margin: 0 0 0.9rem;
}

#long-description h2,
#long-description h3,
#long-description h4,
#long-description h5,
#long-description h6 {
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
  color: var(--sp-text-main);
  letter-spacing: -0.01em;
}

#long-description h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

#long-description h3 {
  font-size: 1.18rem;
  font-weight: 700;
}

#long-description h4 {
  font-size: 1.03rem;
  font-weight: 600;
}

#long-description ul,
#long-description ol {
  padding-left: 1.3rem;
  margin: 0 0 1rem;
}

#long-description li {
  margin: 0.3rem 0;
}

/* READ MORE BUTTON */
#toggle-button {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--sp-radius-pill);
  border: none;
  cursor: pointer;
  background: #ff6b00; /* Ubah ke Orange */
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(255, 107, 0, 0.35); /* Shadow Orange */
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

#toggle-button:hover {
  background: #e65f00; /* Orange Gelap saat hover */
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(255, 107, 0, 0.42);
}

#toggle-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(15, 154, 214, 0.33);
}

/* CLAMP STATE */
#remaining-text {
  max-height: 260px;
  overflow: hidden;
  position: relative;
}

#remaining-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(249, 250, 251, 0),
    #f9fafb 60%,
    #f9fafb 100%
  );
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* state ketika dibuka (diubah via JS: remove max-height) */
#remaining-text.expanded {
  max-height: none;
}

#remaining-text.expanded::after {
  opacity: 0;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .sp-article {
    border-radius: 18px;
  }

  .sp-article h1 {
    font-size: 1.55rem;
  }

  .post-image {
    border-radius: 18px;
  }
}

/* ==============================
   SINGLE POST LAYOUT + SIDEBAR
   ============================== */

.single-layout {
  display: flex;
  align-items: flex-start;
  gap: 2.25rem;
}

/* Kolom konten utama */
.single-main {
  flex: 1 1 auto;
  min-width: 0; /* penting agar flex item bisa shrink */
}

/* Sidebar kanan */
.single-sidebar {
  flex: 0 0 290px;
  max-width: 320px;
  position: sticky;
  top: 32px; /* sesuaikan dengan tinggi nav/hero */
  align-self: flex-start;
}

/* Widget generik */
.sidebar-widget {
  background-color: #ffffff;
  border-radius: 0.9rem;
  border: 1px solid #e5e7eb;
  padding: 1rem 1.05rem 1.05rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  margin-bottom: 1rem;
}

.sidebar-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.55rem;
}

/* Teks kecil di widget */
.sidebar-text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: #4b5563;
  margin: 0 0 0.9rem;
}

/* CTA button */
.sidebar-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  background: #16a34a;
  border: 1px solid #16a34a;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.35);
  transition: all 0.18s ease-out;
}

.sidebar-cta-button:hover {
  background: #15803d;
  border-color: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.45);
}

/* List artikel terbaru */
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list li + li {
  margin-top: 0.45rem;
}

.sidebar-link {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #111827;
  text-decoration: none;
  display: inline-block;
}

.sidebar-link:hover {
  color: #0f766e;
  text-decoration: underline;
}

/* Tag / topik */
.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sidebar-tag {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background-color: #f3f4f6;
  color: #4b5563;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  transition: all 0.16s ease-out;
}

.sidebar-tag:hover {
  background-color: #e5f3ff;
  border-color: #38bdf8;
  color: #0f172a;
}

/* ==============================
   RESPONSIVE
   ============================== */

@media (max-width: 960px) {
  .single-layout {
    flex-direction: column;
    gap: 1.5rem;
  }

  .single-sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
  }
}

/* Banner CTA */
.sidebar-cta-banner {
    margin: 0 auto 2rem;
}

.sidebar-cta-banner .cta-banner-link {
    display: block;
    width: 100%;
}

.sidebar-cta-banner .cta-banner-image {
    width: 100%;
    border-radius: 12px;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sidebar-cta-banner .cta-banner-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}
