/**
 * Single blog post layout.
 *
 * @package Innov8th
 */

.single-post-main {
  position: relative;
  min-height: 60vh;
  overflow: visible;
  background: linear-gradient(
    180deg,
    #08040e 0%,
    #08040e 58%,
    #050208 70%,
    #030105 80%,
    #010001 90%,
    #000000 100%
  );
}

.single-post-main::after {
  content: "";
  display: block;
  height: clamp(72px, 9vh, 110px);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(0, 0, 0, 0.85) 75%,
    #000000 100%
  );
  pointer-events: none;
}

.single-post-sticky-backdrop {
  padding-bottom: 100px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: opacity 0.35s ease;
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 52%,
    rgba(0, 0, 0, 0.82) 72%,
    rgba(0, 0, 0, 0.45) 86%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    #000 0%,
    #000 52%,
    rgba(0, 0, 0, 0.82) 72%,
    rgba(0, 0, 0, 0.45) 86%,
    transparent 100%
  );
}

.single-post-sticky-backdrop__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(8, 4, 14, 0) 0%,
    rgba(8, 4, 14, 0.2) 48%,
    rgba(8, 4, 14, 0.62) 78%,
    rgba(8, 4, 14, 0.88) 100%
  );
}

.single-post-sticky-backdrop__wave {
  position: relative;
  z-index: 1;
  width: min(72vw, 780px);
  max-width: none;
  height: auto;
  margin-top: -32px;
  opacity: 0.96;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.35));
  user-select: none;
}

.single-post-sticky-backdrop__blur,
.single-post-sticky-backdrop__blur2,
.single-post-sticky-backdrop__blur3 {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

.single-post-scroll-layer {
  position: relative;
  z-index: 1;
}

.single-post-main > :not(.single-post-sticky-backdrop) {
  position: relative;
  z-index: 1;
}

/* Glass hero — floats over sticky wave + blurs */
.single-post-main .glass-stage-hero__blur,
.single-post-main .glass-stage-hero__blur2,
.single-post-main .glass-stage-hero__blur3 {
  display: none;
}

.single-post-main .glass-stage-hero {
  padding-bottom: 1.5rem;
  overflow: visible;
}

.single-post-main .glass-stage-hero__stage {
  background: rgba(10, 5, 18, 0.32);
  backdrop-filter: blur(26px) saturate(1.15);
  -webkit-backdrop-filter: blur(26px) saturate(1.15);
  border-color: rgba(255, 255, 255, 0.16);
}

.single-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  padding-top: 2rem;
  padding-bottom: 0;
}

.single-post-main-col {
  min-width: 0;
}

.single-post-article-panel {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 5, 18, 0.42);
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.single-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.single-post-meta__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.single-post-meta__chip--link {
  color: #ff5fce;
  border-color: rgba(255, 0, 184, 0.28);
  background: rgba(255, 0, 184, 0.08);
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.single-post-meta__chip--link:hover {
  color: #fff;
  border-color: rgba(255, 0, 184, 0.5);
  background: rgba(255, 0, 184, 0.16);
}

.single-post-body {
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.06rem;
  line-height: 1.8;
}

.single-post-body > :first-child {
  margin-top: 0;
}

.single-post-body h2,
.single-post-body h3,
.single-post-body h4 {
  color: #fff;
  margin-top: 2.5rem;
  margin-bottom: 0.9rem;
  line-height: 1.28;
  scroll-margin-top: 7rem;
}

.single-post-body h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  letter-spacing: -0.02em;
}

.single-post-body h3 {
  font-size: clamp(1.22rem, 2vw, 1.5rem);
}

.single-post-body p,
.single-post-body ul,
.single-post-body ol,
.single-post-body blockquote {
  margin-bottom: 1.2rem;
}

.single-post-body ul,
.single-post-body ol {
  padding-left: 1.4rem;
}

.single-post-body li + li {
  margin-top: 0.4rem;
}

.single-post-body blockquote {
  padding: 1.1rem 1.35rem;
  border-left: 3px solid rgba(255, 0, 184, 0.65);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 14px 14px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
}

.single-post-body a {
  color: #ff00b8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post-body a:hover {
  color: #ff5fce;
}

.single-post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.single-post-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
  position: relative;
  z-index: 2;
}

.single-post-main + footer {
  position: relative;
  z-index: 2;
  margin-top: calc(-1 * clamp(72px, 9vh, 110px));
  background: #000;
}

.single-post-main + footer .main-footer {
  overflow: visible;
}

.single-post-main + footer .main-footer .overlay {
  overflow: visible;
  background: transparent;
}

.single-post-main + footer .gradientBlurfooter {
  top: clamp(-48px, -6vh, -12px);
  opacity: 0.82;
}

.single-post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.single-post-nav__placeholder {
  display: block;
}

.single-post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 5, 18, 0.4);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  text-decoration: none;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.single-post-nav__link:hover {
  border-color: rgba(255, 0, 184, 0.35);
  background: rgba(255, 0, 184, 0.08);
  transform: translateY(-2px);
}

.single-post-nav__link--next {
  text-align: right;
}

.single-post-nav__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

.single-post-nav__title {
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
}

.single-post-back {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 200ms ease;
}

.single-post-back:hover {
  color: #ff5fce;
}

.single-post-sidebar {
  position: sticky;
  top: 6.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.single-post-sidebar__block {
  padding: 1.15rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 5, 18, 0.38);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.single-post-sidebar__block--toc {
  border-color: rgba(255, 0, 184, 0.16);
  background: rgba(255, 0, 184, 0.04);
}

.single-post-sidebar__title {
  margin: 0 0 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff5fce;
}

.single-post-sidebar__toc,
.single-post-sidebar__cards,
.single-post-sidebar__pills {
  list-style: none;
  margin: 0;
  padding: 0;
}

.single-post-sidebar__toc {
  position: relative;
  padding-left: 0.15rem;
}

.single-post-sidebar__toc::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.single-post-sidebar__toc-item {
  position: relative;
  padding-left: 0.85rem;
}

.single-post-sidebar__toc-item + .single-post-sidebar__toc-item {
  margin-top: 0.45rem;
}

.single-post-sidebar__toc-item--h3 {
  padding-left: 1.35rem;
}

.single-post-sidebar__toc a {
  display: block;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 200ms ease;
}

.single-post-sidebar__toc a:hover,
.single-post-sidebar__toc a.is-active {
  color: #fff;
}

.single-post-sidebar__toc a.is-active {
  font-weight: 600;
  color: #fff;
  border-left: 2px solid #ff00b8;
  padding-left: 0.55rem;
  margin-left: -0.7rem;
}

.single-post-sidebar__cards li + li {
  margin-top: 0.75rem;
}

.single-post-sidebar__card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 5, 18, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-decoration: none;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.single-post-sidebar__card:hover {
  border-color: rgba(255, 0, 184, 0.35);
  background: rgba(255, 0, 184, 0.08);
  transform: translateX(3px);
}

.single-post-sidebar__card-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 10px;
}

.single-post-sidebar__card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-post-sidebar__card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.single-post-sidebar__card-tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff5fce;
}

.single-post-sidebar__card-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}

.single-post-sidebar__card-meta {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.single-post-sidebar__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.single-post-sidebar__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}

.single-post-sidebar__pill:hover,
.single-post-sidebar__pill.is-active {
  color: #fff;
  border-color: rgba(255, 0, 184, 0.45);
  background: rgba(255, 0, 184, 0.14);
}

.single-post-sidebar__pill-count {
  min-width: 1.25rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.64rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
}

.single-post-sidebar__cta {
  border-color: rgba(178, 85, 255, 0.28);
  background: linear-gradient(160deg, rgba(255, 0, 184, 0.1) 0%, rgba(102, 33, 146, 0.14) 100%);
}

.single-post-sidebar__cta-copy {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.single-post-sidebar__cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.single-post-sidebar__cta-link {
  display: block;
  padding: 0.72rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
}

.single-post-sidebar__cta-link:hover {
  color: #fff;
  border-color: rgba(255, 0, 184, 0.45);
  background: rgba(255, 0, 184, 0.14);
}

.single-post-sidebar__cta-link--accent {
  border-color: rgba(255, 0, 184, 0.4);
  background: rgba(255, 0, 184, 0.18);
}

#article-content {
  scroll-margin-top: 6rem;
}

@media (max-width: 1100px) {
  .single-post-layout {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
    gap: 2rem;
  }
}

@media (max-width: 992px) {
  .single-post-sticky-backdrop__wave {
    margin-top: -20px;
    width: min(82vw, 620px);
  }

  .single-post-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .single-post-body {
    max-width: none;
  }

  .single-post-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .single-post-sidebar__block--toc,
  .single-post-sidebar__cta {
    grid-column: 1 / -1;
  }

  .single-post-sidebar__cta-actions {
    flex-direction: row;
  }

  .single-post-sidebar__cta-link {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .single-post-sticky-backdrop__wave {
    margin-top: -8px;
    width: 92vw;
    opacity: 0.9;
  }

  .single-post-layout {
    padding-top: 1.25rem;
    padding-bottom: 0;
  }

  .single-post-article-panel {
    padding: 1.2rem;
    border-radius: 18px;
  }

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

  .single-post-sidebar__cta-actions {
    flex-direction: column;
  }

  .single-post-nav {
    grid-template-columns: 1fr;
  }

  .single-post-nav__link--next {
    text-align: left;
  }
}
