/* =============================================
   Article page – matches Figma exactly
   Design tokens from Figma:
     Main:   #4D4D4D
     Gray:   #777777
     Light:  #F9F9F9
     Accent: #F7D59E
     Gold:   #C8A265
     White:  #FFFFFF
   Fonts: Merriweather (titles), Roboto (body)
   ============================================= */

/* ---- Page layout ---- */
.article-page {
  padding: 60px 0 0;
  position: relative;
  z-index: 1;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 803px) minmax(280px, 410px);
  gap: clamp(40px, 7vw, 130px);
  align-items: start;
}

.article-content {
  max-width: 803px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.article-sidebar {
  position: sticky;
  top: calc(var(--bp-header-offset, 90px) + 20px);
  align-self: start;
}

.article-content .breadcrumb {
  margin-bottom: 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: #4d4d4d;
}

/* ---- Top block (everything in the 803px column) ---- */
.article-top {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

/* ---- Intro: title + lead + review note + meta ---- */
.article-intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.article-title {
  font-family: 'Merriweather', serif;
  font-weight: 400;
  font-size: 40px;
  line-height: normal;
  color: #4d4d4d;
  margin: 0;
}

.article-lead {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.3;
  color: #4d4d4d;
  margin: 0;
}

/* Review note – Figma: #777, 14px, leading 1.3, before meta */
.article-review-note {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: #777777;
  margin: 0;
}

/* Meta bar – Figma: gap 30, items are 14px #777 */
.article-meta {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: #777777;
}

.article-meta-item svg {
  flex-shrink: 0;
}

/* ---- Cover image ---- */
.article-media {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-cover {
  width: 100%;
  height: 451px;
  border-radius: 30px;
  overflow: hidden;
  background: #d9d9d9;
}

.article-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* ---- Article body (markdown) ---- */
.article-body {
  color: #4d4d4d;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.5;
  color: #4d4d4d;
  margin: 0;
}

.article-body p,
.article-body li {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: #4d4d4d;
  margin: 0;
}

.article-body ul,
.article-body ol {
  margin: 0;
  padding-left: 27px;
  color: #4d4d4d;
}

.article-body li {
  margin: 0;
}

.article-body a {
  color: inherit;
  text-decoration: underline;
}

.article-body .article-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-body .article-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  border: 1px solid #d9d9d9;
  background: #fff;
}

.article-body .article-table th,
.article-body .article-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #d9d9d9;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #4d4d4d;
  vertical-align: top;
}

.article-body .article-table th {
  font-weight: 700;
  background: #f7f4ef;
}

.article-body .article-table tbody tr:last-child td {
  border-bottom: none;
}

/* Spacing between elements in body */
.article-body h1+*,
.article-body h2+*,
.article-body h3+*,
.article-body h4+* {
  margin-top: 10px;
}

.article-body p+p {
  margin-top: 12px;
}

.article-body p+ul,
.article-body p+ol,
.article-body p+.article-table-wrap {
  margin-top: 10px;
}

.article-body ul+p,
.article-body ol+p,
.article-body .article-table-wrap+p {
  margin-top: 12px;
}

.article-body p+h1,
.article-body p+h2,
.article-body p+h3,
.article-body p+h4,
.article-body ul+h1,
.article-body ul+h2,
.article-body ul+h3,
.article-body ul+h4,
.article-body ol+h1,
.article-body ol+h2,
.article-body ol+h3,
.article-body ol+h4,
.article-body .article-table-wrap+h1,
.article-body .article-table-wrap+h2,
.article-body .article-table-wrap+h3,
.article-body .article-table-wrap+h4 {
  margin-top: 20px;
}

.article-body ul ul,
.article-body ol ol,
.article-body ul ol,
.article-body ol ul {
  margin-top: 10px;
  padding-left: 27px;
}

/* ---- Sources (Figma: node 1032:3512) ---- */
.article-sources {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-sources-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.article-sources-label {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: #4d4d4d;
}

.article-sources-link {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: #c8a265;
  text-decoration: underline;
  text-decoration-style: solid;
  transition: opacity 0.2s ease;
}

.article-sources-link:hover {
  opacity: 0.7;
}

.article-sources-footnote {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: #777777;
  margin: 0;
}

/* =============================================
   Article CTA blocks
   ============================================= */
.article-lead-cta {
  width: 100%;
}

.article-lead-cta__desktop {
  min-height: 205px;
  padding: 42px 30px 36px;
  border-radius: 20px;
  background: #4d4d4d;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.article-lead-cta__title {
  font-family: 'Merriweather', serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.12;
  color: #ffffff;
  margin: 0;
}

.article-lead-cta__text {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.3;
  color: #ffffff;
}

.article-lead-cta__button {
  margin-top: 22px;
  padding: 8px 14px 8px 20px;
  gap: 10px;
}

.article-lead-cta__button span {
  font-size: 14px;
  letter-spacing: 0.42px;
}

.article-lead-cta__button .btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.article-check-card {
  width: 100%;
  padding: 22px 20px;
  border-radius: 10px;
  border: 1px solid #eeeeee;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.article-check-card--mobile {
  display: none;
}

.article-check-card__title {
  font-family: 'Merriweather', serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  color: #4d4d4d;
  margin: 0;
}

.article-check-card__text {
  max-width: 300px;
  margin: 14px 0 22px;
  font-size: 16px;
  line-height: 1.3;
  color: #4d4d4d;
}

.article-check-card__button {
  width: 100%;
  min-height: 56px;
  padding: 8px 8px 8px 18px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #ffffff;
  color: #4d4d4d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.article-check-card__button:hover {
  border-color: #c8a265;
  background: #fffaf1;
}

.article-check-card__button span:first-child {
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.42px;
  text-transform: uppercase;
  white-space: nowrap;
}

.article-check-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #4d4d4d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}

.article-check-card__icon img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

/* =============================================
   Author block (Figma: node 1038:3639)
   White bg, rounded-20, padding 30px, gap 40px
   ============================================= */
.article-author {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.article-author-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* "Автор статьи" heading – 24px Roboto Medium #4d4d4d */
.article-author-heading {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.5;
  color: #4d4d4d;
  margin: 0;
}

/* Card row: photo + info */
.article-author-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.article-author-photo {
  width: 68px;
  height: 68px;
  border-radius: 1000px;
  object-fit: cover;
  flex-shrink: 0;
}

.article-author-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f0e8;
}

.article-author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
  justify-content: center;
  line-height: 1.2;
}

/* Name – 18px Merriweather #c8a265 */
.article-author-name {
  font-family: 'Merriweather', serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.2;
  color: #c8a265;
  margin: 0;
}

/* Position – 18px Roboto #4d4d4d */
.article-author-position {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.2;
  color: #4d4d4d;
  margin: 0;
}

/* Description lines – 14px Roboto #777 */
.article-author-desc-line {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: #777777;
  margin: 0;
}

/* "Другие стать автора" section */
.article-author-other {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-author-other-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.5;
  color: #4d4d4d;
  margin: 0;
}

.article-author-other-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-author-other-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-author-other-link {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  color: #4d4d4d;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-author-other-link:hover {
  color: #c8a265;
}

.article-author-other-date {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2;
  color: #777777;
}

/* =============================================
   Comments section (Figma: node 1038:3806)
   ============================================= */
.article-comments {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.article-comments-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
}

.article-comments-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* "Комментарии" – 24px Roboto Medium #4d4d4d */
.article-comments-title {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.5;
  color: #4d4d4d;
  margin: 0;
}

/* Badge – white circle 40px, 14px bold #777 */
.article-comments-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 1000px;
  background: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  color: #777777;
  flex-shrink: 0;
}

/* Comment form – white bg, rounded-10, px-20 py-22 */
.comment-form {
  background: #ffffff;
  border-radius: 10px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 33px;
  overflow: hidden;
}

.comment-form-textarea {
  width: 100%;
  min-height: 60px;
  padding: 0;
  border: none;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  color: #4d4d4d;
  resize: vertical;
  background: transparent;
  outline: none;
}

.comment-form-textarea::placeholder {
  color: #4d4d4d;
}

.comment-form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-form-author {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.comment-form-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-form-name {
  flex: 1;
  padding: 0;
  border: none;
  font-family: 'Nunito Sans', 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.2;
  color: #4d4d4d;
  background: transparent;
  outline: none;
  min-width: 0;
}

.comment-form-name::placeholder {
  color: #4d4d4d;
}

/* Submit button: #4d4d4d bg, white text, rounded-8, px-16 py-9 */
.comment-form-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 8px;
  background: #4d4d4d;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.comment-form-submit:hover {
  opacity: 0.85;
}

.comment-form-submit span {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  color: #ffffff;
  white-space: nowrap;
}

.comment-form-submit svg {
  flex-shrink: 0;
}

.comment-form-captcha {
  display: flex;
  justify-content: flex-start;
}

.comment-form-status {
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.35;
  min-height: 0;
}

.comment-form-status:empty {
  display: none;
}

.comment-form-status.is-error {
  color: #d9534f;
}

.comment-form-status.is-success {
  color: #2e7d32;
}

/* Comment list wrapper (holds list + gradient) */
.comment-list-wrapper {
  position: relative;
}

/* Gradient overlay (Figma: node 1039:3566 – from transparent to #f9f9f9) */
.comment-list-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(249, 249, 249, 0) 37%, #f9f9f9 100%);
  pointer-events: none;
  z-index: 1;
}

/* Comment list */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Individual comment – no border, just bg #f9f9f9 */
.comment-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f9f9f9;
}

.comment-item-hidden {
  display: none;
}

/* Name: 16px Roboto Bold #4d4d4d */
.comment-item-name {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: #4d4d4d;
}

/* Text: 16px Roboto Regular #4d4d4d */
.comment-item-text {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #4d4d4d;
  margin: 0;
}

/* "Читать все комментарии" button – #F7D59E bg, rounded-12, h-42, full width */
.comment-btn-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #f7d59e;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.comment-btn-all:hover {
  opacity: 0.85;
}

.comment-btn-all span {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  color: #4d4d4d;
  white-space: nowrap;
}

.comment-btn-all img {
  flex-shrink: 0;
  width: 24px;
  height: 25px;
  object-fit: contain;
}

/* =============================================
   Responsive: mobile (< 768px)
   ============================================= */
@media (max-width: 1180px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
  }

  .article-content {
    max-width: 100%;
  }

  .article-check-card__title {
    font-size: 22px;
  }

  .article-check-card__text {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .article-page {
    padding: 20px 0 0;
  }

  .article-layout {
    display: block;
  }

  .article-content {
    max-width: 100%;
    gap: 24px;
  }

  .article-sidebar {
    display: none;
  }

  .article-top {
    gap: 24px;
  }

  .article-title {
    font-size: 24px;
  }

  .article-lead {
    font-size: 16px;
  }

  .article-meta {
    gap: 16px;
  }

  .article-cover {
    height: 199px;
    border-radius: 20px;
  }

  .article-body h1,
  .article-body h2,
  .article-body h3,
  .article-body h4 {
    font-size: 20px;
  }

  .article-body p,
  .article-body li {
    font-size: 16px;
  }

  .article-body .article-table th,
  .article-body .article-table td {
    font-size: 14px;
    padding: 10px 12px;
  }

  .article-body ul,
  .article-body ol {
    padding-left: 24px;
  }

  .article-body ul ul,
  .article-body ol ol,
  .article-body ul ol,
  .article-body ol ul {
    padding-left: 24px;
  }

  .article-lead-cta__desktop {
    display: none;
  }

  .article-check-card--mobile {
    display: flex;
    padding: 22px 12px 12px;
    border-radius: 10px;
  }

  .article-check-card__title {
    font-size: 24px;
  }

  .article-check-card__text {
    max-width: 260px;
    margin: 14px 0 22px;
    font-size: 16px;
  }

  /* Author */
  .article-author {
    padding: 20px;
    border-radius: 16px;
    gap: 28px;
  }

  .article-author-heading,
  .article-author-other-title {
    font-size: 20px;
  }

  .article-author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .article-author-info {
    align-items: center;
  }

  .article-author-desc-line {
    text-align: left;
    align-self: flex-start;
  }

  /* Comments */
  .article-comments {
    gap: 20px;
  }

  .article-comments-title-row {
    justify-content: center;
  }

  .article-comments-title {
    font-size: 20px;
  }

  .comment-form {
    padding: 16px;
    gap: 20px;
  }

  .comment-form-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .comment-form-submit {
    justify-content: center;
    width: 100%;
  }
}

/* =============================================
   FAQ Section
   ============================================= */
.faq-section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.faq-section .section-title {
  margin-bottom: 40px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.faq-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  align-self: start;
}

.faq-q {
  width: 100%;
  display: flex;
  gap: 2px;
  align-items: center;
  padding: 12px 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq-q-text {
  flex: 1 1 auto;
  font-size: 18px;
  line-height: 1.3;
  color: #3c3b3b;
}

.faq-chevron {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  flex: 0 0 40px;
}

.faq-chevron img {
  width: 24px;
  height: 24px;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
}

.faq-a {
  padding: 10px 20px 20px;
}

.faq-a p {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  color: #4d4d4d;
}

@media (max-width: 768px) {
  .faq-section {
    padding: 40px 0;
  }

  .faq-section .section-title {
    margin-bottom: 20px;
    text-align: center;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }
}
