/* Grid Layout для статьи */
.article-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

/* Без сайдбара - 1 колонка */
.article-layout.no-sidebar {
  grid-template-columns: 1fr;
  grid-template-areas:
    "header"
    "body"
    "form"
    "reviews"
    "related";
}

.article-layout.no-sidebar .article__header {
  grid-area: header;
}
.article-layout .broker-review-form {
  grid-area: form;
}
.article-layout .block-broker-comments {
  grid-area: reviews;
  margin: 30px 0;
}
.article-layout.no-sidebar .article__body {
  grid-area: body;
}

.article-layout.no-sidebar .related {
  grid-area: related;
}

/* С сайдбаром - 2 колонки */
.article-layout.has-sidebar {
  grid-template-columns: 1fr 312px;
  grid-template-areas:
    "header expert"
    "body expert"
    "form expert"
    "reviews expert"
    "related expert";
}

.article-layout.has-sidebar .article__header {
  grid-area: header;
}

.article-layout.has-sidebar .article__body {
  grid-area: body;
}

.article-layout.has-sidebar .related {
  grid-area: related;
}

.article-layout.has-sidebar .expert {
  grid-area: expert;
}
.article-layout .block-broker-comments__container {
  padding: 0;
}
/* С сайдбаром для кнопок поделиться */
.article-layout.has-share-sidebar {
  grid-template-columns: 1fr 312px;
  grid-template-areas:
    "body sidebar"
    "form sidebar"
    "reviews sidebar"
    "related sidebar";
}

.article-layout.has-share-sidebar .article__body {
  grid-area: body;
}

.article-layout.has-share-sidebar .article-share-sidebar {
  grid-area: sidebar;
}

.article-layout.has-share-sidebar .related {
  grid-area: related;
}
.article__body #ez-toc-container {
  display: none;
}
.article__body #ez-toc-container + * {
  margin-top: 0;
}
/* Сайдбар с кнопками поделиться */
.article-share-sidebar {
  width: 312px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}
.article-share-sidebar__block {
  background: var(--white);
  border-radius: 14px;
  padding: 20px;
  width: 100%;
}
.article-share-sidebar__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.275em;
  color: var(--text);
  margin-bottom: 12px;
}

.article-share-sidebar__buttons {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: wrap;
}

.article-share-sidebar__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0;
  transition: opacity 0.3s ease;
}

.article-share-sidebar__button:hover {
  opacity: 0.7;
}

.article-share-sidebar__button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.article__header {
  display: flex;
  flex-direction: column;
  row-gap: 24px;
}

.article__title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.275em;
  color: var(--text);
  margin: 0;
}

.article__meta {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.article__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 1.275em;
  color: var(--grey);
}

.article__meta-item svg {
  flex-shrink: 0;
}

.article__excerpt {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5em;
}

.expert {
  width: 312px;
  background: var(--white);
  border-radius: 14px;
  padding: 20px;
}

.expert__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.expert__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.expert__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expert__avatar--placeholder {
  width: 100%;
  height: 100%;
  background: var(--grey-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
}

.expert__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.expert__name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.275em;
  color: var(--text);
}

.expert__position {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.275em;
  color: var(--grey);
}

/* Related Block */
.related {
  background: var(--white);
  border-radius: 14px;
}

.related__header {
  padding: 20px;
  border-bottom: 1px solid var(--grey-light);
}

.related__date {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.27em;
  color: var(--primary);
}
.article-related__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.single-article .block-faq.section {
  margin: 0 0 35px;
}
.single-article .block-faq__container {
  padding: 0;
}
.single-article .article-related__container {
  padding: 0;
}
/* Responsive Design */
@media (max-width: 1024px) {
  .article__body #ez-toc-container {
    display: block;
    margin-bottom: 24px;
  }
  .article-share-sidebar #ez-toc-container {
    display: none;
  }
  .article-layout.has-sidebar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "expert"
      "body"
      "form"
      "reviews "
      "related";
    gap: 12px;
  }

  .article-layout.has-share-sidebar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "body"
      "sidebar"
      "form"
      "reviews "
      "related";
    gap: 12px;
  }

  .expert {
    width: 100%;
  }
  .expert__card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .article-share-sidebar {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .article__title {
    font-size: 28px;
  }
  .article__excerpt {
    font-size: 15px;
  }
  .article-share-sidebar__title {
    font-size: 20px;
  }
  .review-experience__inner--comments {
    display: none;
  }
}
@media (max-width: 480px) {
  .article__title {
    font-size: 24px;
  }
  .article__excerpt {
    font-size: 14px;
  }
  .article-layout .block-broker-comments {
    margin: 20px 0;
  }
}
.blog-post-breadcrumbs .breadcrumbs {
  margin: 20px 0;
}
.wp-block-image :where(figcaption) {
  text-align: center;
  margin-top: -16px;
  font-size: 14px;
  color: var(--grey);
}
/* Tag Archive Page */
.tag-archive .news-feed__header {
  margin-bottom: 32px;
}

.tag-archive__description {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.5em;
  color: var(--grey);
}
