/* Javan Bartar Post Page Widget — scoped styles */

.jbsp-post-widget .jbsp-single,
.jbsp-post-widget .jbsp-single * {
  box-sizing: border-box;
}

/* Full-width breakout wrapper */
.jbsp-post-widget--fullwidth {
  position: relative !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  overflow: visible !important;
}

.jbsp-post-widget--fullwidth:not(.jbsp-breakout-ready) {
  opacity: 0;
}

.jbsp-post-widget--fullwidth.jbsp-breakout-ready {
  opacity: 1;
}

.jbsp-post-widget--fullwidth .jbsp-single {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.jbsp-post-widget .jbsp-single {
  --bg: #07020a;
  --bg2: #15071d;
  --text: #fff7fb;
  --muted: rgba(255, 247, 251, 0.7);
  --soft: rgba(255, 247, 251, 0.48);
  --line: rgba(255, 255, 255, 0.1);
  --pink: #ff2f8d;
  --pink2: #d80b63;
  --violet: #a76cff;
  --cream: #ffe2ef;
  --hero-g1: #ffffff;
  --hero-g2: #ffe2ef;
  --hero-g3: #ff2f8d;
  --hero-g4: #a76cff;
  --hero-bg-word: "ARTICLE";
  --hero-title-line1: #ffffff;
  --progress-g1: var(--pink2);
  --progress-g2: var(--pink);
  --progress-g3: var(--violet);

  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  direction: rtl;
  color: var(--text);
  font-family: "IRANSansX", "Vazirmatn", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 80% 4%, rgba(255, 47, 141, 0.2), transparent 32%),
    radial-gradient(circle at 12% 48%, rgba(167, 108, 255, 0.14), transparent 36%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 42%, var(--bg) 100%);
  overflow: visible;
  isolation: isolate;
}

.jbsp-post-widget .jbsp-single a {
  color: inherit;
  text-decoration: none;
}

.jbsp-post-widget .jbsp-single [hidden] {
  display: none !important;
}

/* Progress bar */
.jbsp-post-widget .jbsp-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 0%;
  height: 4px;
  z-index: 99999;
  background: linear-gradient(90deg, var(--progress-g1), var(--progress-g2), var(--progress-g3));
  box-shadow: 0 0 22px rgba(255, 47, 141, 0.7);
  pointer-events: none;
}

/* Skeleton loader */
.jbsp-post-widget .jbsp-loader {
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: 18px;
  width: min(920px, calc(100% - 40px));
  margin-inline: auto;
}

.jbsp-post-widget .jbsp-loader__hero,
.jbsp-post-widget .jbsp-loader__line {
  border-radius: 34px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  background-size: 220% 100%;
  border: 1px solid var(--line);
  animation: jbspSkeleton 1.2s ease-in-out infinite;
}

.jbsp-post-widget .jbsp-loader__hero {
  height: 360px;
}

.jbsp-post-widget .jbsp-loader__line {
  height: 34px;
}

.jbsp-post-widget .jbsp-loader__line.short {
  width: 62%;
}

@keyframes jbspSkeleton {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

/* Layout container */
.jbsp-post-widget .jbsp-container {
  width: min(1220px, calc(100% - 40px));
  margin-inline: auto;
}

/* Hero */
.jbsp-post-widget .jbsp-hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  align-items: center;
  padding: 90px 0 70px;
  overflow: hidden;
}

@media (min-width: 1181px) {
  .jbsp-post-widget .jbsp-hero {
    overflow: visible;
  }
}

.jbsp-post-widget .jbsp-hero::before {
  content: var(--hero-bg-word, "ARTICLE");
  position: absolute;
  right: 50%;
  top: 50%;
  transform: translate(50%, -50%);
  color: rgba(255, 255, 255, 0.024);
  font-size: clamp(90px, 18vw, 260px);
  font-weight: 950;
  letter-spacing: -10px;
  white-space: nowrap;
  pointer-events: none;
}

.jbsp-post-widget .jbsp-hero__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.22;
  filter: blur(18px) saturate(1.2);
  transform: scale(1.08);
  pointer-events: none;
}

.jbsp-post-widget .jbsp-hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 55% 35%, rgba(255, 47, 141, 0.2), transparent 34%),
    linear-gradient(90deg, rgba(7, 2, 10, 0.95), rgba(7, 2, 10, 0.5), rgba(7, 2, 10, 0.92)),
    linear-gradient(180deg, rgba(7, 2, 10, 0.12), rgba(7, 2, 10, 0.96) 92%, var(--bg) 100%);
  pointer-events: none;
}

.jbsp-post-widget .jbsp-hero__grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.82fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
}

.jbsp-post-widget .jbsp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(255, 247, 251, 0.54);
  font-size: 13px;
  margin-bottom: 22px;
}

.jbsp-post-widget .jbsp-breadcrumb a {
  transition: color 0.2s ease;
}

.jbsp-post-widget .jbsp-breadcrumb a:hover {
  color: #fff;
}

.jbsp-post-widget .jbsp-breadcrumb b {
  color: var(--cream);
  font-weight: 900;
}

.jbsp-post-widget .jbsp-catline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.jbsp-post-widget .jbsp-catline a,
.jbsp-post-widget .jbsp-catline span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 47, 141, 0.16);
  border: 1px solid rgba(255, 47, 141, 0.3);
}

.jbsp-post-widget .jbsp-catline a {
  transition: background 0.2s ease, border-color 0.2s ease;
}

.jbsp-post-widget .jbsp-catline a:hover {
  background: rgba(255, 47, 141, 0.24);
  border-color: rgba(255, 47, 141, 0.42);
}

.jbsp-post-widget .jbsp-hero h1 {
  margin: 0;
  color: var(--hero-title-line1, #fff);
  font-size: clamp(42px, 6.6vw, 96px);
  line-height: 1.06;
  letter-spacing: -3px;
  font-weight: 950;
  text-wrap: balance;
}

.jbsp-post-widget .jbsp-hero h1 em {
  font-style: normal;
  background: linear-gradient(
    135deg,
    var(--hero-g1) 0%,
    var(--hero-g2) 24%,
    var(--hero-g3) 62%,
    var(--hero-g4) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.jbsp-post-widget .jbsp-hero p {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 2.05;
}

.jbsp-post-widget .jbsp-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.jbsp-post-widget .jbsp-meta div {
  padding: 17px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.jbsp-post-widget .jbsp-meta span,
.jbsp-post-widget .jbsp-meta b {
  display: block;
}

.jbsp-post-widget .jbsp-meta span {
  color: var(--soft);
  font-size: 12px;
  margin-bottom: 7px;
}

.jbsp-post-widget .jbsp-meta b {
  color: #fff;
  font-size: 13px;
}

.jbsp-post-widget .jbsp-hero__card {
  position: relative;
  min-height: 570px;
  border-radius: 46px;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 47, 141, 0.16), transparent 38%),
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.36);
}

.jbsp-post-widget .jbsp-hero__image {
  position: absolute;
  inset: 18px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 47, 141, 0.2), transparent 38%),
    linear-gradient(135deg, #17071f, var(--bg));
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.jbsp-post-widget .jbsp-hero__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 2, 10, 0.05), rgba(7, 2, 10, 0.68)),
    radial-gradient(circle at 50% 10%, rgba(255, 47, 141, 0.16), transparent 42%);
  pointer-events: none;
}

.jbsp-post-widget .jbsp-hero__badge {
  position: absolute;
  right: 38px;
  bottom: 38px;
  left: 38px;
  z-index: 2;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 26px;
  background: rgba(7, 2, 10, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.jbsp-post-widget .jbsp-hero__badge svg {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  fill: none;
  stroke: var(--cream);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 18px rgba(255, 47, 141, 0.45));
}

.jbsp-post-widget .jbsp-hero__badge span {
  color: #fff;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jbsp-post-widget .jbsp-hero__badge--has-image svg {
  display: none;
}

.jbsp-post-widget .jbsp-hero__badge--has-image img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  max-width: 42px;
  max-height: 42px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 18px rgba(255, 47, 141, 0.45));
  pointer-events: none;
}

/* Body layout */
.jbsp-post-widget .jbsp-body-wrap {
  position: relative;
  padding: 70px 0 120px;
}

.jbsp-post-widget .jbsp-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.jbsp-post-widget .jbsp-sidebar {
  display: grid;
  gap: 16px;
}

@media (min-width: 1081px) {
  .jbsp-post-widget .jbsp-body-wrap,
  .jbsp-post-widget .jbsp-layout,
  .jbsp-post-widget .jbsp-container {
    overflow: visible;
  }

  .jbsp-post-widget .jbsp-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: var(--sidebar-sticky-top, 24px);
    align-self: start;
    z-index: 4;
    max-height: calc(100svh - var(--sidebar-sticky-top, 24px) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 47, 141, 0.45) rgba(255, 255, 255, 0.06);
  }

  .jbsp-post-widget .jbsp-sidebar::-webkit-scrollbar {
    width: 6px;
  }

  .jbsp-post-widget .jbsp-sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 47, 141, 0.45);
  }
}

.jbsp-post-widget .jbsp-sidebox {
  padding: 18px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 47, 141, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}

.jbsp-post-widget .jbsp-side-kicker {
  color: var(--cream);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jbsp-post-widget .jbsp-sidebox h2 {
  margin: 7px 0 14px;
  color: #fff;
  font-size: 19px;
  line-height: 1.35;
}

.jbsp-post-widget .jbsp-sidebox p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

.jbsp-post-widget .jbsp-tocbox nav {
  display: grid;
  gap: 7px;
  max-height: 440px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 47, 141, 0.35) rgba(255, 255, 255, 0.06);
}

.jbsp-post-widget .jbsp-tocbox nav::-webkit-scrollbar {
  width: 6px;
}

.jbsp-post-widget .jbsp-tocbox nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.jbsp-post-widget .jbsp-tocbox nav::-webkit-scrollbar-thumb {
  background: rgba(255, 47, 141, 0.35);
  border-radius: 999px;
}

.jbsp-post-widget .jbsp-tocbox a {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255, 247, 251, 0.68);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.6;
  transition: 0.2s ease;
}

.jbsp-post-widget .jbsp-tocbox a:hover,
.jbsp-post-widget .jbsp-tocbox a.is-active {
  color: #fff;
  background: rgba(255, 47, 141, 0.12);
  border-color: rgba(255, 47, 141, 0.28);
}

.jbsp-post-widget .jbsp-tocbox a.is-h3 {
  margin-right: 14px;
  font-size: 12.5px;
  opacity: 0.88;
}

.jbsp-post-widget .jbsp-share {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.jbsp-post-widget .jbsp-share button,
.jbsp-post-widget .jbsp-share a {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: rgba(255, 247, 251, 0.78);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.jbsp-post-widget .jbsp-share button:hover,
.jbsp-post-widget .jbsp-share a:hover {
  color: #fff;
  background: rgba(255, 47, 141, 0.13);
  border-color: rgba(255, 47, 141, 0.32);
}

.jbsp-post-widget .jbsp-share button:focus-visible,
.jbsp-post-widget .jbsp-share a:focus-visible {
  outline: 2px solid rgba(255, 47, 141, 0.55);
  outline-offset: 2px;
}

.jbsp-post-widget .jbsp-copy-message {
  display: none;
  margin-top: 10px !important;
  color: var(--cream) !important;
}

.jbsp-post-widget .jbsp-copy-message.is-show {
  display: block;
}

.jbsp-post-widget .jbsp-coachbox {
  background:
    radial-gradient(circle at 90% 0%, rgba(167, 108, 255, 0.14), transparent 36%),
    radial-gradient(circle at 10% 100%, rgba(255, 47, 141, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.06);
}

/* Main content */
.jbsp-post-widget .jbsp-main {
  min-width: 0;
}

.jbsp-post-widget .jbsp-content {
  position: relative;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 38px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 47, 141, 0.09), transparent 30%),
    rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}

.jbsp-post-widget .jbsp-content,
.jbsp-post-widget .jbsp-content p,
.jbsp-post-widget .jbsp-content li {
  color: rgba(255, 247, 251, 0.8);
  font-size: 17px;
  line-height: 2.15;
}

.jbsp-post-widget .jbsp-content > *:first-child {
  margin-top: 0 !important;
}

.jbsp-post-widget .jbsp-content > *:last-child {
  margin-bottom: 0 !important;
}

.jbsp-post-widget .jbsp-content h2,
.jbsp-post-widget .jbsp-content h3,
.jbsp-post-widget .jbsp-content h4 {
  color: #fff;
  line-height: 1.35;
  letter-spacing: -0.6px;
  scroll-margin-top: 90px;
}

.jbsp-post-widget .jbsp-content h2 {
  margin: 46px 0 18px;
  font-size: clamp(28px, 4vw, 46px);
  background: linear-gradient(
    135deg,
    var(--hero-g1) 0%,
    var(--hero-g2) 35%,
    var(--hero-g3) 78%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.jbsp-post-widget .jbsp-content h3 {
  margin: 34px 0 14px;
  font-size: clamp(23px, 3vw, 32px);
}

.jbsp-post-widget .jbsp-content h4 {
  margin: 28px 0 12px;
  font-size: 21px;
}

.jbsp-post-widget .jbsp-content p {
  margin: 0 0 22px;
}

.jbsp-post-widget .jbsp-content strong,
.jbsp-post-widget .jbsp-content b {
  color: #fff;
  font-weight: 900;
}

.jbsp-post-widget .jbsp-content a {
  color: var(--cream);
  border-bottom: 1px solid rgba(255, 47, 141, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.jbsp-post-widget .jbsp-content a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 47, 141, 0.72);
}

.jbsp-post-widget .jbsp-content ul,
.jbsp-post-widget .jbsp-content ol {
  margin: 20px 0;
  padding-right: 24px;
}

.jbsp-post-widget .jbsp-content li {
  margin: 8px 0;
}

.jbsp-post-widget .jbsp-content li::marker {
  color: var(--pink);
}

.jbsp-post-widget .jbsp-content blockquote {
  position: relative;
  margin: 34px 0;
  padding: 24px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 47, 141, 0.15), transparent 38%),
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 47, 141, 0.22);
}

.jbsp-post-widget .jbsp-content blockquote p {
  color: #fff;
  font-size: 18px;
  line-height: 2;
  margin: 0;
}

.jbsp-post-widget .jbsp-content hr {
  border: 0;
  height: 1px;
  margin: 34px 0;
  background: linear-gradient(90deg, transparent, rgba(255, 47, 141, 0.35), transparent);
}

.jbsp-post-widget .jbsp-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 30px;
  margin: 34px auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.jbsp-post-widget .jbsp-content figure {
  margin: 34px 0;
}

.jbsp-post-widget .jbsp-content figcaption {
  margin-top: 10px;
  color: var(--soft);
  font-size: 13px;
  text-align: center;
}

.jbsp-post-widget .jbsp-content iframe,
.jbsp-post-widget .jbsp-content video {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 24px;
  margin: 34px 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.jbsp-post-widget .jbsp-content pre {
  margin: 28px 0;
  padding: 20px;
  overflow: auto;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  line-height: 1.8;
  direction: ltr;
  text-align: left;
}

.jbsp-post-widget .jbsp-content code {
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(255, 47, 141, 0.12);
  border: 1px solid rgba(255, 47, 141, 0.22);
  color: var(--cream);
  font-size: 0.92em;
}

.jbsp-post-widget .jbsp-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.jbsp-post-widget .jbsp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 34px 0;
  overflow: hidden;
  border-radius: 22px;
  display: block;
  overflow-x: auto;
}

.jbsp-post-widget .jbsp-content th,
.jbsp-post-widget .jbsp-content td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px;
  color: rgba(255, 247, 251, 0.78);
  text-align: right;
}

.jbsp-post-widget .jbsp-content th {
  color: #fff;
  background: rgba(255, 47, 141, 0.13);
}

.jbsp-post-widget .jbsp-content .wp-block-image,
.jbsp-post-widget .jbsp-content .aligncenter {
  text-align: center;
}

.jbsp-post-widget .jbsp-content .alignwide,
.jbsp-post-widget .jbsp-content .alignfull {
  width: 100%;
  max-width: 100%;
}

/* Tags */
.jbsp-post-widget .jbsp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.jbsp-post-widget .jbsp-tags a,
.jbsp-post-widget .jbsp-tags span {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255, 247, 251, 0.75);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 12px;
  transition: 0.2s ease;
}

.jbsp-post-widget .jbsp-tags a:hover {
  color: #fff;
  background: rgba(255, 47, 141, 0.13);
  border-color: rgba(255, 47, 141, 0.32);
}

/* Author box */
.jbsp-post-widget .jbsp-author {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 32px;
  padding: 24px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 90% 0%, rgba(167, 108, 255, 0.14), transparent 36%),
    radial-gradient(circle at 10% 100%, rgba(255, 47, 141, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}

.jbsp-post-widget .jbsp-author__icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: rgba(255, 47, 141, 0.13);
  border: 1px solid rgba(255, 47, 141, 0.28);
  overflow: hidden;
}

.jbsp-post-widget .jbsp-author__icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: var(--cream);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jbsp-post-widget .jbsp-author__icon--has-image svg {
  display: none;
}

.jbsp-post-widget .jbsp-author__icon--has-image img,
.jbsp-post-widget .jbsp-author__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jbsp-post-widget .jbsp-author span {
  color: var(--cream);
  font-size: 12px;
  font-weight: 950;
}

.jbsp-post-widget .jbsp-author h2 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.35;
}

.jbsp-post-widget .jbsp-author p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

/* Related articles */
.jbsp-post-widget .jbsp-related {
  margin-top: 58px;
}

.jbsp-post-widget .jbsp-section-head {
  margin-bottom: 20px;
}

.jbsp-post-widget .jbsp-section-head span {
  color: var(--cream);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jbsp-post-widget .jbsp-section-head h2 {
  margin: 8px 0 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.2;
  letter-spacing: -1.4px;
}

.jbsp-post-widget .jbsp-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.jbsp-post-widget .jbsp-related-card {
  display: block;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  transition: 0.25s ease;
}

.jbsp-post-widget .jbsp-related-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 47, 141, 0.32);
  background: rgba(255, 255, 255, 0.075);
}

.jbsp-post-widget .jbsp-related-card__media {
  height: 170px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 47, 141, 0.2), transparent 38%),
    linear-gradient(135deg, #17071f, var(--bg));
  background-position: center;
  background-size: cover;
}

.jbsp-post-widget .jbsp-related-card__body {
  padding: 16px;
}

.jbsp-post-widget .jbsp-related-card small {
  color: var(--cream);
  font-size: 11px;
  font-weight: 900;
}

.jbsp-post-widget .jbsp-related-card h3 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.6;
}

/* Mini skeleton & error states */
.jbsp-post-widget .jbsp-mini-skeleton {
  min-height: 270px;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04));
  background-size: 220% 100%;
  border: 1px solid var(--line);
  animation: jbspSkeleton 1.2s ease-in-out infinite;
}

.jbsp-post-widget .jbsp-toc-empty,
.jbsp-post-widget .jbsp-inline-empty p {
  color: rgba(255, 247, 251, 0.58);
  font-size: 13px;
  line-height: 1.8;
}

.jbsp-post-widget .jbsp-inline-empty {
  min-height: auto;
  padding: 30px;
  text-align: center;
}

.jbsp-post-widget .jbsp-error {
  min-height: 70svh;
  display: grid;
  place-items: center;
  text-align: center;
  width: min(760px, calc(100% - 40px));
  margin-inline: auto;
  padding: 70px 0;
}

.jbsp-post-widget .jbsp-error h2 {
  color: #fff;
  font-size: 36px;
  margin: 0;
}

.jbsp-post-widget .jbsp-error p {
  color: var(--muted);
  line-height: 2;
  margin: 16px 0 0;
}

.jbsp-post-widget .jbsp-page {
  position: relative;
}

/* Tablet */
@media (max-width: 1080px) {
  .jbsp-post-widget .jbsp-hero__grid {
    grid-template-columns: 1fr;
  }

  .jbsp-post-widget .jbsp-layout {
    grid-template-columns: 1fr;
  }

  .jbsp-post-widget .jbsp-sidebar {
    position: relative;
    top: auto;
    grid-template-columns: 1fr 1fr;
  }

  .jbsp-post-widget .jbsp-tocbox {
    grid-column: 1 / -1;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .jbsp-post-widget .jbsp-container {
    width: min(100% - 26px, 1220px);
  }

  .jbsp-post-widget .jbsp-hero {
    min-height: auto;
    padding: 64px 0 44px;
  }

  .jbsp-post-widget .jbsp-hero::before {
    font-size: clamp(64px, 22vw, 120px);
    letter-spacing: -6px;
  }

  .jbsp-post-widget .jbsp-hero h1 {
    font-size: clamp(36px, 12vw, 58px);
    letter-spacing: -1.3px;
  }

  .jbsp-post-widget .jbsp-hero p {
    font-size: 14.5px;
    line-height: 1.9;
  }

  .jbsp-post-widget .jbsp-meta {
    grid-template-columns: 1fr;
  }

  .jbsp-post-widget .jbsp-hero__card {
    min-height: 360px;
    border-radius: 32px;
    padding: 12px;
  }

  .jbsp-post-widget .jbsp-hero__image {
    inset: 12px;
    border-radius: 24px;
  }

  .jbsp-post-widget .jbsp-hero__badge {
    right: 24px;
    left: 24px;
    bottom: 24px;
    min-height: 68px;
    padding: 12px;
  }

  .jbsp-post-widget .jbsp-body-wrap {
    padding-top: 34px;
    padding-bottom: 74px;
  }

  .jbsp-post-widget .jbsp-sidebar {
    grid-template-columns: 1fr;
  }

  .jbsp-post-widget .jbsp-content {
    padding: 22px;
    border-radius: 28px;
  }

  .jbsp-post-widget .jbsp-content,
  .jbsp-post-widget .jbsp-content p,
  .jbsp-post-widget .jbsp-content li {
    font-size: 15.2px;
    line-height: 2;
  }

  .jbsp-post-widget .jbsp-content h2 {
    font-size: clamp(26px, 8vw, 38px);
  }

  .jbsp-post-widget .jbsp-content h3 {
    font-size: 23px;
  }

  .jbsp-post-widget .jbsp-author {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .jbsp-post-widget .jbsp-author__icon {
    margin-inline: auto;
  }

  .jbsp-post-widget .jbsp-related__grid {
    grid-template-columns: 1fr;
  }

  .jbsp-post-widget .jbsp-loader {
    width: min(100% - 26px, 920px);
  }

  .jbsp-post-widget .jbsp-loader__hero {
    height: 280px;
  }
}

@media (max-width: 480px) {
  .jbsp-post-widget .jbsp-hero__badge span {
    font-size: 12px;
    letter-spacing: 0.05em;
  }

  .jbsp-post-widget .jbsp-section-head h2 {
    font-size: clamp(26px, 9vw, 38px);
  }

  .jbsp-post-widget .jbsp-related-card__media {
    height: 150px;
  }
}

/* Elementor widget container */
.elementor-widget-jb_post_page,
.elementor-widget-jb_post_page > .elementor-widget-container {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}

.elementor-section:has(.jbsp-post-widget),
.elementor-container:has(.jbsp-post-widget),
.elementor-column:has(.jbsp-post-widget),
.elementor-widget-wrap:has(.jbsp-post-widget),
.elementor-widget:has(.jbsp-post-widget),
.e-con:has(.jbsp-post-widget),
.e-con-inner:has(.jbsp-post-widget),
.entry-content:has(.jbsp-post-widget),
.site-content:has(.jbsp-post-widget) {
  overflow: visible !important;
  max-width: none !important;
}

.elementor-section.elementor-section-boxed:has(.jbsp-post-widget) > .elementor-container,
.elementor-section:has(.jbsp-post-widget--fullwidth) > .elementor-container {
  max-width: 100% !important;
  width: 100% !important;
  padding-inline: 0 !important;
}

.elementor-widget-jb_post_page .elementor-widget-container {
  overflow: visible !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Elementor editor: no 100vw breakout */
.elementor-editor-active .elementor-widget-jb_post_page,
.elementor-editor-preview .elementor-widget-jb_post_page {
  width: 100% !important;
  max-width: 100% !important;
}

.elementor-editor-active .jbsp-post-widget,
.elementor-editor-preview .jbsp-post-widget,
.elementor-editor-active .jbsp-post-widget--fullwidth,
.elementor-editor-preview .jbsp-post-widget--fullwidth {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
}

.elementor-editor-active .jbsp-post-widget .jbsp-single,
.elementor-editor-preview .jbsp-post-widget .jbsp-single {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  margin-inline: 0 !important;
}

.elementor-editor-active .jbsp-post-widget .jbsp-loader,
.elementor-editor-preview .jbsp-post-widget .jbsp-loader {
  min-height: 60vh;
}

.elementor-editor-active .jbsp-post-widget .jbsp-page[hidden],
.elementor-editor-preview .jbsp-post-widget .jbsp-page[hidden] {
  display: block !important;
}

.elementor-editor-active .jbsp-post-widget .jbsp-loader[hidden],
.elementor-editor-preview .jbsp-post-widget .jbsp-loader[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .jbsp-post-widget .jbsp-single *,
  .jbsp-post-widget .jbsp-single *::before,
  .jbsp-post-widget .jbsp-single *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
