/* Blog single post — premium editorial */

.apm-blog-single {
  padding: 32px 0 56px;
  background: #f8fafc;
}

.apm-blog-single .apm-header {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.apm-blog-single .apm-nav .current-menu-item > a,
.apm-blog-single .apm-nav .current_page_parent > a {
  color: #0d5bdb;
}

.apm-blog-single .apm-nav .current-menu-item > a::after,
.apm-blog-single .apm-nav .current_page_parent > a::after {
  transform: scaleX(1);
}

/* Breadcrumb */
.apm-blog-single__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 28px;
  font-size: 0.875rem;
  color: #64748b;
}

.apm-blog-single__breadcrumb a {
  color: #64748b;
  text-decoration: none;
  transition: color 300ms;
}

.apm-blog-single__breadcrumb a:hover {
  color: #0d5bdb;
}

.apm-blog-single__breadcrumb span[aria-hidden] {
  color: #94a3b8;
}

.apm-blog-single__breadcrumb-current {
  color: #334155;
  font-weight: 500;
}

/* Grid */
.apm-blog-single__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
}

/* Header */
.apm-blog-single__header {
  margin-bottom: 28px;
}

.apm-blog-single__meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: #64748b;
}

.apm-blog-single__meta-top time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.apm-blog-single__title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.apm-blog-single__excerpt {
  margin: 0 0 22px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #475569;
  max-width: 720px;
}

.apm-blog-single__author-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.apm-blog-single__share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apm-blog-single__share-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}

.apm-blog-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  text-decoration: none;
  cursor: pointer;
  transition: transform 300ms, color 300ms, border-color 300ms, box-shadow 300ms;
}

.apm-blog-share:hover {
  transform: translateY(-2px);
  color: #0d5bdb;
  border-color: #bfdbfe;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.apm-blog-share.is-copied {
  color: #19a85b;
  border-color: #bbf7d0;
}

/* Featured image */
.apm-blog-single__figure {
  margin: 0 0 28px;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

.apm-blog-single__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms ease;
}

.apm-blog-single__figure:hover img {
  transform: scale(1.02);
}

/* TOC */
.apm-blog-toc {
  margin-bottom: 32px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.apm-blog-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.apm-blog-toc__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.apm-blog-toc__toggle {
  border: 0;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0d5bdb;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 300ms;
}

.apm-blog-toc__toggle:hover {
  background: #eef4ff;
}

.apm-blog-toc.is-collapsed .apm-blog-toc__nav {
  display: none;
}

.apm-blog-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 24px;
}

.apm-blog-toc__list li {
  break-inside: avoid;
  margin-bottom: 8px;
}

.apm-blog-toc__list a {
  display: block;
  padding: 6px 0;
  font-size: 0.875rem;
  color: #334155;
  text-decoration: none;
  transition: color 300ms;
}

.apm-blog-toc__list a:hover {
  color: #0d5bdb;
}

/* Article body */
.apm-blog-single__body {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
}

.apm-blog-single__body > *:first-child {
  margin-top: 0;
}

.apm-blog-single__body h2 {
  margin: 40px 0 16px;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #0f172a;
  scroll-margin-top: 100px;
}

.apm-blog-single__body h3 {
  margin: 28px 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  scroll-margin-top: 100px;
}

.apm-blog-single__body p {
  margin: 0 0 1.25em;
}

.apm-blog-single__body ul,
.apm-blog-single__body ol {
  margin: 0 0 1.5em;
  padding-left: 0;
}

.apm-blog-single__body ul {
  list-style: none;
}

.apm-blog-single__body ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.apm-blog-single__body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D5BDB' stroke-width='2.5'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.apm-blog-single__body ol {
  padding-left: 1.25em;
}

.apm-blog-single__body a {
  color: #0d5bdb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.apm-blog-single__body a:hover {
  color: #0948a8;
}

.apm-blog-single__body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}

.apm-blog-single__body blockquote {
  margin: 28px 0;
  padding: 24px 28px;
  background: #eef4ff;
  border-left: 4px solid #0d5bdb;
  border-radius: 0 16px 16px 0;
  font-size: 1.0625rem;
  font-style: italic;
  color: #1e3a5f;
  position: relative;
}

.apm-blog-single__body blockquote p:last-child {
  margin-bottom: 0;
}

.apm-blog-single__body .apm-tip,
.apm-blog-single__body .is-style-tip {
  margin: 24px 0;
  padding: 18px 20px 18px 52px;
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  position: relative;
}

.apm-blog-single__body .apm-tip::before,
.apm-blog-single__body .is-style-tip::before {
  content: "💡";
  position: absolute;
  left: 18px;
  top: 18px;
  font-size: 1.125rem;
}

/* Tags */
.apm-blog-single__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.apm-blog-single__tags > span {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

/* Post navigation */
.apm-blog-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}

.apm-blog-post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 300ms, box-shadow 300ms, border-color 300ms;
}

.apm-blog-post-nav__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  border-color: #bfdbfe;
}

.apm-blog-post-nav__item span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.apm-blog-post-nav__item strong {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #0f172a;
}

.apm-blog-post-nav__item--next {
  text-align: right;
}

/* Single sidebar overrides */
.apm-blog-sidebar--single {
  top: 100px;
}

.apm-blog-single-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.apm-blog-single-search svg {
  flex-shrink: 0;
  color: #94a3b8;
}

.apm-blog-single-search input {
  width: 100%;
  border: 0;
  background: transparent;
  height: 40px;
  font-size: 0.875rem;
  outline: none;
}

.apm-blog-sidebar--single .apm-blog-popular__item span time {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 400;
  color: #94a3b8;
}

.apm-blog-guide--vertical {
  flex-direction: column;
  text-align: center;
}

.apm-blog-guide--vertical .apm-blog-guide__cover {
  margin: 0 auto 12px;
}

/* Reveal */
.apm-blog-single .apm-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.apm-blog-single .apm-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1100px) {
  .apm-blog-single__grid {
    grid-template-columns: 1fr;
  }

  .apm-blog-sidebar--single {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .apm-blog-toc__list {
    columns: 1;
  }

  .apm-blog-post-nav {
    grid-template-columns: 1fr;
  }

  .apm-blog-post-nav__item--next {
    text-align: left;
  }

  .apm-blog-sidebar--single {
    grid-template-columns: 1fr;
  }

  .apm-blog-single__author-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apm-blog-single .apm-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
