/* ============================================
   BLOG PAGE STYLES
   Стили для блога и отдельных постов
   ============================================ */

/* ============================================
   HERO SECTION
   ============================================ */

.single-hero {
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 80px;
  position: relative;
  z-index: 0;
  border-radius: 0 0 56px 56px;
  overflow: hidden;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.single-hero:before {
  position: absolute;
  top: 0;
  right: 0;
  content: "";
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #000, rgba(0, 0, 0, 0)) rgba(24, 24, 26, 0.52);
  z-index: -1;
}

.single-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  border-radius: 0 0 56px 56px;
}

.single-hero__bg-xs {
  display: none;
}

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */

.single-content {
  overflow: clip;
  position: relative;
  z-index: 2;
  background-color: #fff;
}

.single-content__wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
  padding: 64px 0;
  position: relative;
  z-index: 0;
}

/* Centered layout when no TOC */
.single-content__wrapper--centered {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

.single-content__wrapper::after {
  content: "";
  position: absolute;
  width: 1126px;
  height: 1307px;
  background: url(../../img/single/decor.svg) center center / cover no-repeat;
  right: -36%;
  top: -830px;
  z-index: -1;
}

.single-content .container {
  overflow: visible;
}

.single-content__article {
  min-width: 0;
  /* Prevents overflow */
}

.single-content__sidebar {
  position: sticky;
  top: 130px;
}

/* ============================================
   BLOCK MARKDOWN STYLES
   ============================================ */

.single-content__content h2 {
  font-weight: 600;
  font-size: 48px;
  line-height: 117%;
  letter-spacing: -0.03em;
  color: #18181a;
  margin-bottom: 24px;
}

.single-content__content h3 {
  font-weight: 600;
  font-size: 32px;
  line-height: 125%;
  letter-spacing: -0.03em;
  color: #18181a;
  margin-bottom: 24px;
}

.single-content__content h4 {
  font-weight: 600;
  font-size: 24px;
  line-height: 133%;
  letter-spacing: -0.03em;
  color: #18181a;
  margin-bottom: 24px;
}

.single-content__content h5 {
  font-weight: 600;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.02em;
  color: #18181a;
  margin-bottom: 20px;
}

.single-content__content h6 {
  font-weight: 600;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: -0.01em;
  color: #18181a;
  margin-bottom: 16px;
}

.single-content__content p {
  font-weight: 400;
  font-size: 18px;
  line-height: 156%;
  letter-spacing: -0.01em;
  color: rgba(24, 24, 26, 0.72);
  margin-bottom: 24px;
  text-align: justify;
}

.single-content__content ol,
.single-content__content ul {
  margin-bottom: 24px;
}

.single-content__content ul {
  padding-left: 15px;
}

.single-content__content ol li {
  list-style-type: decimal;
  list-style-position: outside;
}

.single-content__content ul li {
  position: relative;
  list-style: none;
}

.single-content__content ul li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  min-width: 10px;
  min-height: 10px;
  background: url(../../img/common/list_square.webp) center center / cover no-repeat;
  position: absolute;
  top: 8px;
  left: -15px;
}

.single-content__content img:not([class]) {
  max-height: 490px;
  width: 100%;
  object-fit: contain;
  margin-bottom: 24px;
}

.single-content__content li {
  font-size: 18px;
  line-height: 156%;
  letter-spacing: -0.01em;
  color: rgba(24, 24, 26, 0.72);
  list-style-position: inside;
  text-align: justify;
}

.single-content__content ul p,
.single-content__content ol p,
.single-content__content li p {
  font-weight: 400;
  font-size: 18px;
  line-height: 156%;
  letter-spacing: -0.01em;
  color: rgba(24, 24, 26, 0.72);
}

.single-content__content a {
  color: #00a95c;
  text-decoration: underline;
  position: relative;
}

@media (any-hover: hover) {
  .single-content__content a {
    transition: all 0.1s ease 0s;
  }

  .single-content__content a:hover {
    text-decoration: none;
  }
}

.single-content__content strong {
  font-weight: 600;
}

/* Light Block - Светлый блок */

.blog-light {
  display: block;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.02em;
  color: #18181a;
  padding: 24px 32px;
  margin: 0;
  margin-top: 24px;
  margin-bottom: 24px;
  font-style: normal;
  width: 100%;
  background: #faf9f9;
  position: relative;
}

.blog-light p {
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.02em;
  color: #18181a;
}

.blog-light p:last-child {
  margin-bottom: 0;
}

.blog-light::before {
  content: "";
  position: absolute;
  top: 0px;
  left: 0px;
  width: 2px;
  height: 100%;
  background:
    radial-gradient(43.98% 45.27% at 7.86% 89.29%, #008947 0%, rgba(0, 137, 71, 0) 100%),
    linear-gradient(360deg, rgba(52, 215, 184, 0) 0%, #34d7b8 100%),
    radial-gradient(73.32% 118.97% at 94.82% 25%, #019e75 0%, rgba(1, 158, 117, 0) 100%),
    radial-gradient(42.31% 42.65% at 91.3% 100%, #00be69 0%, rgba(0, 163, 120, 0) 100%), #00c37b;
}

/* Dark Block - Темный блок с бирюзовой линией */
.blog-dark {
  display: block;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.02em;
  color: #fff;
  padding: 24px 32px;
  margin: 0;
  margin-top: 24px;
  margin-bottom: 24px;
  font-style: normal;
  width: 100%;
  background: #18181a;
  position: relative;
}

.blog-dark::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0px;
  width: 2px;
  height: 100%;
  background:
    radial-gradient(43.98% 45.27% at 7.86% 89.29%, #008947 0%, rgba(0, 137, 71, 0) 100%),
    linear-gradient(360deg, rgba(52, 215, 184, 0) 0%, #34d7b8 100%),
    radial-gradient(73.32% 118.97% at 94.82% 25%, #019e75 0%, rgba(1, 158, 117, 0) 100%),
    radial-gradient(42.31% 42.65% at 91.3% 100%, #00be69 0%, rgba(0, 163, 120, 0) 100%), #00c37b;
}

/* Highlight Block - Зеленый градиентный блок */
.blog-highlight {
  font-weight: 400;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.02em;
  color: #fff;
  padding: 24px 32px;
  margin: 0;
  margin-bottom: 24px;
  width: 100%;
  background:
    radial-gradient(43.98% 45.27% at 7.86% 89.29%, #008947 0%, rgba(0, 137, 71, 0) 100%),
    linear-gradient(360deg, rgba(52, 215, 184, 0) 0%, #34d7b8 100%),
    radial-gradient(73.32% 118.97% at 94.82% 25%, #019e75 0%, rgba(1, 158, 117, 0) 100%),
    radial-gradient(42.31% 42.65% at 91.3% 100%, #00be69 0%, rgba(0, 163, 120, 0) 100%), #00c37b;
}

/* ============================================
   TABLE OF CONTENTS (Зміст) - Minimalist
   ============================================ */

.toc-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: -0.01em;
  color: rgba(24, 24, 26, 0.48);
  margin-bottom: 0;
}

.toc-title::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: url(../../img/common/list_square.webp) center center / cover no-repeat;
}

.toc-content {
  max-height: 78vh;
  overflow: auto;
  padding: 24px 24px 24px 0;
  border: 1px solid rgba(125, 135, 145, 0.1);
  background-color: #fff;
}

.toc-content::-webkit-scrollbar {
  width: 6px;
  background-color: transparent;
}

.toc-content::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 100px;
}

.toc-content::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: #00c37b;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.toc-link {
  display: block;
  font-weight: 500;
  font-size: 18px;
  line-height: 156%;
  letter-spacing: -0.01em;
  color: rgba(24, 24, 26, 0.48);
  position: relative;
  padding-left: 24px;
}

@media (any-hover: hover) {
  .toc-link {
    transition: all 0.3s ease 0s;
  }

  .toc-link:hover {
    color: #18181a;
  }
}

.toc-item--sub .toc-link {
  padding-left: 48px;
  font-size: 16px;
}

.toc-link.is-active {
  color: #18181a;
}

.toc-link:before {
  content: "";
  display: block;
  width: 2px;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background:
    radial-gradient(43.98% 45.27% at 7.86% 89.29%, #008947 0%, rgba(0, 137, 71, 0) 100%),
    linear-gradient(360deg, rgba(52, 215, 184, 0) 0%, #34d7b8 100%),
    radial-gradient(73.32% 118.97% at 94.82% 25%, #019e75 0%, rgba(1, 158, 117, 0) 100%),
    radial-gradient(42.31% 42.65% at 91.3% 100%, #00be69 0%, rgba(0, 163, 120, 0) 100%), #00c37b;
  opacity: 0;
  transition: all 0.2s ease 0s;
}

.toc-link.is-active::before {
  opacity: 1;
}

/* ============================================
   BLOG CONTENT BLOCKS
   Шорткоды для контента блога
   ============================================ */

/* CTA Block - Зеленый градиентный блок с кнопкой */
.blog-cta {
  margin-bottom: 40px;
}

.blog-cta__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 48px;
  width: 100%;
  background: url("../../img/consultation/bg-blog.webp") center top / cover no-repeat;
}

.blog-cta__title {
  text-align: left;
  font-size: 32px;
  max-width: 713px;
  display: flex;
  flex-direction: column;
}

.blog-cta__title span {
  color: rgba(255, 255, 255, 0.48);
}

.blog-cta__desc {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

.blog-cta__button {
  margin-left: -6px;
}

.blog-cta__button span {
  padding: 14px 24px;
  font-weight: 400;
}

/* Expert Block - Блок с экспертом */
.blog-expert {
  margin-bottom: 40px;
}

.blog-expert__body {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #faf9f9;
}

.blog-expert__user {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  position: relative;
}

.blog-expert__user::before {
  content: "";
  position: absolute;
  height: 88px;
  width: 2px;
  background:
    radial-gradient(43.98% 45.27% at 7.86% 89.29%, #008947 0%, rgba(0, 137, 71, 0) 100%),
    linear-gradient(360deg, rgba(52, 215, 184, 0) 0%, #34d7b8 100%),
    radial-gradient(73.32% 118.97% at 94.82% 25%, #019e75 0%, rgba(1, 158, 117, 0) 100%),
    radial-gradient(42.31% 42.65% at 91.3% 100%, #00be69 0%, rgba(0, 163, 120, 0) 100%), #00c37b;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.blog-expert__avatar {
  width: 88px;
  height: 88px;
  border-radius: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-expert__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.blog-expert__role {
  padding: 2px 12px;
  border: 1px solid rgba(125, 135, 145, 0.1);
  border-radius: 100px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  line-height: 171%;
  letter-spacing: -0.02em;
  color: rgba(24, 24, 26, 0.48);
  margin-bottom: 8px;
}

.blog-expert__name {
  font-weight: 500;
  font-size: 18px;
  line-height: 156%;
  letter-spacing: -0.01em;
  color: #18181a;
  margin-bottom: 4px;
}

.blog-expert__desc {
  font-weight: 500;
  font-size: 12px;
  line-height: 167%;
  letter-spacing: -0.02em;
  color: rgba(24, 24, 26, 0.48);
}

.blog-expert__desc button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #00a95c;
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}

@media (any-hover: hover) {
  .blog-expert__desc button {
    transition: all 0.3s ease 0s;
  }

  .blog-expert__desc button:hover {
    text-decoration: none;
  }
}

.blog-expert__message {
  font-weight: 500;
  font-size: 18px;
  line-height: 156%;
  letter-spacing: -0.01em;
  color: rgba(24, 24, 26, 0.72);
  padding: 0 24px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {

  /* Single column on tablets and mobile */
  .single-content__wrapper {
    grid-template-columns: 1fr;
  }

  .single-content__sidebar {
    position: static;
    order: -1;
    /* Move TOC before content */
  }

  .toc-content {
    max-height: 100%;
  }
}

@media (max-width: 992px) {
  .single-content__wrapper {
    padding-top: 48px;
  }

  .single-hero {
    padding-bottom: 55px;
  }

  .single-hero__bg {
    border-radius: 0 0 42px 42px;
  }

  .single-content__content h1 {
    font-size: 36px;
  }

  .single-content__content h2 {
    font-size: 32px;
  }

  .single-content__content h3 {
    font-size: 24px;
  }

  .single-content__content h4 {
    font-size: 20px;
  }

  .single-content__content h5 {
    font-size: 16px;
  }

  .single-content__content h6 {
    font-size: 14px;
  }
}

@media (max-width: 768px) {

  /* Blog Blocks Mobile */
  .blog-cta__body {
    background: url("../../img/consultation/bg-mob.webp") center top / cover no-repeat;
  }

  .blog-cta__body {
    align-items: center;
    text-align: center;
    padding: 48px 32px;
  }

  .blog-cta__title {
    text-align: center;
  }

  .blog-dark,
  .blog-light,
  .blog-highlight {
    padding: 24px 20px;
    font-size: 16px;
  }

  /* Hero Section */
  .single-hero {
    min-height: 332px;
    padding-bottom: 45px;
  }

  /* .single-hero:before {
    background: url("../../img/hero/main__bg-mob.svg") 0 0/contain no-repeat;
    width: 375px;
    height: 762px;  
    right: 50%;
    transform: translateX(48%);
    top: -2%;
  } */

  .single-hero__bg {
    border-radius: 0 0 32px 32px;
  }

  .single-hero__bg-xl {
    display: none;
  }

  .single-hero__bg-xs {
    display: block;
  }

  .single-content__wrapper::after {
    display: none;
  }

  .single-content__content p,
  .single-content__content li {
    font-size: 16px;
  }
}

@media (max-width: 680px) {
  /* Markdown */

  .service-content__content h1 {
    font-size: 28px;
  }

  .single-content__content h2 {
    font-size: 24px;
  }

  .single-content__content h3 {
    font-size: 20px;
  }

  .single-content__content h4 {
    font-size: 18px;
  }

  .service-content__content h5 {
    font-size: 16px;
  }

  .service-content__content h6 {
    font-size: 14px;
  }
}

@media (max-width: 400px) {
  .blog-cta__body {
    padding: 48px 12px;
  }
}