/* Blog single page */
.blog-single-page {
  padding: 14px 12px 72px;
  background: #ffffff;
}

.blog-single-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.blog-single-article {
  display: block;
}

.blog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 10px 0 36px;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.4;
}

.blog-breadcrumbs a {
  color: #5f7f9f;
  text-decoration: none;
}

.blog-breadcrumbs a:hover {
  color: #1d4ed8;
}

.blog-layout {
  display: grid;
  grid-template-columns: 372px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.blog-layout__sidebar {
  position: sticky;
  top: 28px;
}

.blog-toc {
  position: relative;
  border: 1px solid rgba(30, 86, 165, 0.22);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(31, 65, 110, 0.08);
  overflow: hidden;
}

.blog-toc::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0 0 0 auto;
  width: 4px;
  background: linear-gradient(180deg, var(--blue) 0%, rgba(30, 86, 165, 0.45) 100%);
  pointer-events: none;
}

.blog-toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px 20px;
  border-bottom: 1px solid #d8e7f3;
}

.blog-toc__title {
  margin: 0;
  color: var(--blue);
  font-family: "Roboto", sans-serif;
  font-size: 1.12rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.blog-toc__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.blog-toc__toggle i {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.blog-toc__list {
  margin: 0;
  padding: 8px 16px 16px 42px;
  color: #4b5563;
  font-size: 0.98rem;
  line-height: 1.7;
  max-height: 72vh;
  overflow: auto;
}

.blog-toc__list::-webkit-scrollbar {
  width: 7px;
}

.blog-toc__list::-webkit-scrollbar-thumb {
  background: var(--blue);
  border-radius: 999px;
}

.blog-toc__list li {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(30, 86, 165, 0.14);
}

.blog-toc__list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.blog-toc__list a {
  display: inline-block;
  color: #4b5563;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

.blog-toc__list a:hover {
  color: var(--blue);
}

.blog-toc__list .toc-level-3 {
  margin-left: 18px;
  padding-bottom: 8px;
  border-bottom: 0;
  list-style: disc;
  color: rgba(30, 86, 165, 0.85);
}

.blog-toc__list .toc-level-3 a {
  font-size: 0.95rem;
  font-weight: 500;
}

.blog-toc.is-collapsed .blog-toc__list {
  display: none;
}

.blog-toc.is-collapsed .blog-toc__toggle i {
  transform: rotate(0deg);
}

.blog-toc:not(.is-collapsed) .blog-toc__toggle i {
  transform: rotate(180deg);
}

.blog-layout__main {
  min-width: 0;
}

.blog-hero {
  padding-top: 2px;
}

.blog-hero__title {
  margin: 0 0 18px;
  color: #202838;
  font-family: "Roboto", sans-serif;
  font-size: clamp(2.6rem, 4.6vw, 4.15rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
  max-width: 980px;
}

.blog-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 26px;
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.4;
}

.blog-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  white-space: nowrap;
}

.blog-meta-item i {
  color: var(--blue);
  font-size: 0.9rem;
}

.blog-meta-label {
  color: #334155;
  font-weight: 700;
}

.blog-meta-item--share {
  flex-wrap: wrap;
  gap: 8px;
}

.blog-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--blue);
  border: 1px solid rgba(30, 86, 165, 0.2);
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.08);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.blog-share-link:hover {
  transform: translateY(-1px);
  background: #eff6ff;
  border-color: rgba(30, 86, 165, 0.3);
}

.blog-share-link--copy.is-copied {
  background: #eff6ff;
  border-color: rgba(30, 86, 165, 0.3);
}

.blog-hero__media {
  margin: 0 0 28px;
}

.blog-hero__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blog-content--single {
  color: #22314a;
  font-family: "Roboto", sans-serif;
  font-size: 1.05rem;
  line-height: 1.78;
}

.blog-content--single > :first-child {
  margin-top: 0;
}

.blog-content--single > :last-child {
  margin-bottom: 0;
}

.blog-content--single h2,
.blog-content--single h3,
.blog-content--single h4,
.blog-content--single h5,
.blog-content--single h6 {
  color: #202838;
  font-family: "Roboto", sans-serif;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 1.55em 0 0.65em;
  font-weight: 800;
}

.blog-content--single h2 {
  font-size: clamp(1.55rem, 2.3vw, 2.2rem);
}

.blog-content--single h3 {
  font-size: clamp(1.25rem, 1.9vw, 1.7rem);
}

.blog-content--single h4 {
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
}

.blog-content--single p {
  margin: 0 0 1.15em;
}

.blog-content--single a {
  color: #1d4ed8;
  text-decoration: none;
}

.blog-content--single a:hover {
  text-decoration: underline;
}

.blog-content--single ul,
.blog-content--single ol {
  margin: 0 0 1.15em 1.4em;
}

.blog-content--single li {
  margin-bottom: 0.5em;
}

.blog-content--single blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 4px solid #1d4ed8;
  background: #f6faff;
  border-radius: 12px;
  color: #334155;
}

.blog-content--single img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.6em 0;
}

.blog-content--single figure {
  margin: 1.6em 0;
}

.blog-content--single figcaption {
  margin-top: 10px;
  color: #6b7280;
  font-size: 0.88rem;
  text-align: center;
}

.blog-content--single table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.96rem;
}

.blog-content--single th,
.blog-content--single td {
  padding: 13px 14px;
  border: 1px solid #dbe5ee;
}

.blog-content--single th {
  background: #eef6fc;
  color: #22314a;
  font-weight: 800;
  text-align: left;
}

.blog-content--single pre {
  margin: 1.6em 0;
  padding: 18px 20px;
  background: #111827;
  color: #e5e7eb;
  border-radius: 12px;
  overflow-x: auto;
}

.blog-content--single code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2f7;
  font-size: 0.94em;
}

.blog-content--single pre code {
  padding: 0;
  background: transparent;
}

.blog-related-posts {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid rgba(31, 65, 110, 0.12);
}

.blog-related-posts__header {
  margin-bottom: 18px;
}

.blog-related-posts__title {
  margin: 0;
  color: #0f172a;
  font-family: "Roboto", sans-serif;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.blog-related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.blog-related-post-card {
  overflow: hidden;
  border: 1px solid rgba(30, 86, 165, 0.12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.blog-related-post-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef4fb;
}

.blog-related-post-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.blog-related-post-card:hover .blog-related-post-card__image {
  transform: scale(1.03);
}

.blog-related-post-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 20px;
}

.blog-related-post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 0.9rem;
}

.blog-related-post-card__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blog-related-post-card__title {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.blog-related-post-card__title a {
  color: #0f172a;
  text-decoration: none;
}

.blog-related-post-card__title a:hover {
  color: #1d4ed8;
}

.blog-related-post-card__excerpt {
  color: #475569;
  font-size: 0.96rem;
  line-height: 1.7;
}

.blog-related-post-card__link {
  align-self: flex-start;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
}

.blog-related-post-card__link:hover {
  text-decoration: underline;
}

@media (max-width: 1120px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .blog-layout__sidebar {
    position: static;
    order: 1;
  }

  .blog-layout__main {
    order: 2;
  }
}

@media (max-width: 768px) {
  .blog-single-page {
    padding: 10px 10px 54px;
  }

  .blog-breadcrumbs {
    margin-bottom: 24px;
    font-size: 0.88rem;
  }

  .blog-layout {
    gap: 18px;
  }

  .blog-hero__title {
    font-size: clamp(2.1rem, 8vw, 2.9rem);
    margin-bottom: 14px;
  }

  .blog-hero__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-bottom: 18px;
    font-size: 0.88rem;
    align-items: stretch;
  }

  .blog-meta-item {
    white-space: normal;
    align-items: flex-start;
  }

  .blog-meta-item--share {
    width: 100%;
    flex-wrap: wrap;
    gap: 7px;
  }

  .blog-toc__header {
    padding: 16px 16px 10px 18px;
  }

  .blog-toc__title {
    font-size: 1.02rem;
  }

  .blog-toc__list {
    padding: 8px 14px 14px 36px;
    max-height: none;
  }

  .blog-content--single {
    font-size: 1rem;
    line-height: 1.74;
  }

  .blog-content--single table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .blog-content--single th,
  .blog-content--single td {
    white-space: nowrap;
  }

  .blog-related-posts__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .blog-hero__meta {
    gap: 9px 10px;
    margin-bottom: 16px;
  }

  .blog-content--single h2 {
    font-size: 1.42rem;
  }

  .blog-content--single h3 {
    font-size: 1.18rem;
  }

  .blog-related-posts {
    margin-top: 34px;
    padding-top: 22px;
  }

  .blog-related-post-card__body {
    padding: 16px 16px 18px;
  }
}
