/* ── Blog shared styles ─────────────────────────────────────── */

/* Article hero */
.art-hero {
  background: var(--green);
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}
.art-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(201,168,76,.15) 0%, transparent 70%);
  pointer-events: none;
}
.art-hero__inner { position: relative; z-index: 1; max-width: 800px; }
.art-hero__tag {
  display: inline-block;
  background: rgba(201,168,76,.2);
  color: #c9a84c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.art-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 16px;
}
.art-hero__meta { font-size: 14px; color: rgba(255,255,255,.55); }
.art-hero__meta span { margin-right: 18px; }

/* Article body layout */
.art-body {
  background: var(--cream);
  padding: 60px 0 100px;
}
.art-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 900px) {
  .art-layout { grid-template-columns: 1fr; gap: 32px; }
  .art-sidebar { order: 2; }
}

/* Article content typography */
.art-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--text);
  margin: 48px 0 16px;
  padding-top: 8px;
  border-top: 2px solid var(--border);
}
.art-content h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.art-content h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
}
.art-content p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-light);
  margin-bottom: 16px;
}
.art-content strong { color: var(--text); }
.art-content figure {
  margin: 28px 0;
}
.art-content figure img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.art-content figcaption {
  font-size: 13px;
  color: var(--text-light);
  opacity: .7;
  margin-top: 8px;
  text-align: center;
}
@media (max-width: 768px) {
  .art-content figure img { height: 200px; }
}
.art-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}
.art-content ul li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-light);
  padding: 6px 0 6px 28px;
  position: relative;
}
.art-content ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--green-mid);
  font-weight: 700;
}

/* Callout box */
.callout {
  border-left: 4px solid var(--green-mid);
  background: #fff;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.callout--gold { border-left-color: #c9a84c; }
.callout--red  { border-left-color: #c0392b; }
.callout__icon { font-size: 22px; margin-bottom: 8px; display: block; }
.callout__title { font-weight: 700; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.callout p { font-size: 15px; margin: 0; line-height: 1.7; }

/* Build-type cards grid */
.build-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.build-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  transition: border-color .2s, box-shadow .2s;
}
.build-card:hover { border-color: var(--green-mid); box-shadow: 0 4px 16px rgba(0,0,0,.07); }
.build-card__icon { font-size: 32px; margin-bottom: 12px; display: block; }
.build-card__title { font-weight: 700; color: var(--text); font-size: 15px; margin-bottom: 8px; }
.build-card__text { font-size: 14px; color: var(--text-light); line-height: 1.6; }
.build-card__vri {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-mid);
  background: rgba(74,124,74,.08);
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Deny list */
.deny-list {
  background: #fff8f8;
  border: 1.5px solid #f5c6c6;
  border-radius: 14px;
  padding: 24px;
  margin: 24px 0;
}
.deny-list__title { font-weight: 700; color: #c0392b; margin-bottom: 14px; font-size: 15px; }
.deny-list ul { margin: 0; }
.deny-list ul li { color: var(--text-light); }
.deny-list ul li::before { content: '✕'; color: #c0392b; }

/* Comparison cards */
.compare-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}
@media (max-width: 600px) { .compare-cards { grid-template-columns: 1fr; } }
.compare-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
}
.compare-card--green { border-color: var(--green-mid); }
.compare-card--gold  { border-color: #c9a84c; }
.compare-card__badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.compare-card--green .compare-card__badge { background: rgba(74,124,74,.12); color: var(--green); }
.compare-card--gold  .compare-card__badge { background: rgba(201,168,76,.15); color: #a07830; }
.compare-card__title { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.compare-card ul { margin: 0; }
.compare-card ul li { font-size: 14px; }

/* Styled table */
.art-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.art-table thead th {
  background: var(--green);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}
.art-table thead th:first-child { border-radius: 10px 0 0 0; }
.art-table thead th:last-child  { border-radius: 0 10px 0 0; }
.art-table tbody tr:nth-child(even) { background: #f5f2ec; }
.art-table tbody td { padding: 12px 16px; color: var(--text-light); border-bottom: 1px solid var(--border); }
.art-table tbody td:first-child { font-weight: 600; color: var(--text); }

/* Sidebar */
.art-sidebar { position: sticky; top: 100px; }
.art-sidebar__card {
  background: var(--green);
  border-radius: 16px;
  padding: 28px 24px;
  color: #fff;
  margin-bottom: 20px;
}
.art-sidebar__card h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}
.art-sidebar__card p { font-size: 14px; color: rgba(255,255,255,.8); line-height: 1.7; margin-bottom: 18px; }
.art-sidebar__card .btn { width: 100%; text-align: center; justify-content: center; }
.art-sidebar__toc {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.art-sidebar__toc h4 { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-light); margin-bottom: 14px; }
.art-sidebar__toc a {
  display: block;
  font-size: 14px;
  color: var(--text-light);
  text-decoration: none;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  transition: color .15s;
}
.art-sidebar__toc a:last-child { border-bottom: none; }
.art-sidebar__toc a:hover { color: var(--green); }

/* Bottom CTA */
.art-cta {
  background: var(--green);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  margin-top: 56px;
}
.art-cta h3 { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.art-cta p { font-size: 15px; color: rgba(255,255,255,.8); margin-bottom: 24px; }
.art-cta__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Blog listing page */
.blog-hero {
  background: var(--green);
  padding: 100px 0 60px;
}
.blog-hero__title { font-family: var(--font-serif); font-size: clamp(32px, 5vw, 52px); font-weight: 700; color: #fff; margin-bottom: 12px; }
.blog-hero__sub { font-size: 17px; color: rgba(255,255,255,.7); max-width: 480px; }

.blog-grid {
  background: var(--cream);
  padding: 60px 0 100px;
}
.blog-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.blog-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, border-color .2s;
}
.blog-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.09); border-color: var(--green-mid); }
.blog-card__cover {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.blog-card__cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(20,46,20,.45) 0%, rgba(20,46,20,.25) 100%);
}
.blog-card__cover--gold::after {
  background: linear-gradient(160deg, rgba(90,65,10,.5) 0%, rgba(140,100,20,.25) 100%);
}
.blog-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green-mid);
  margin-bottom: 10px;
}
.blog-card__title { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 10px; }
.blog-card__excerpt { font-size: 14px; color: var(--text-light); line-height: 1.6; flex: 1; }
.blog-card__footer { padding: 16px 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-light); display: flex; justify-content: space-between; }
.blog-card__read { color: var(--green-mid); font-weight: 600; }

/* ========== MOBILE 768px ========== */
@media (max-width: 768px) {

  /* ── Hero ── */
  .art-hero { padding: 80px 0 28px; }
  .art-hero__title { font-size: 22px; line-height: 1.3; }
  .art-hero__meta { font-size: 13px; }

  /* ── Layout ── */
  .art-body { padding: 28px 0 52px; }
  .art-layout { padding: 0 16px; gap: 0; }
  .art-sidebar { display: none; }

  /* ── Типографика ── */
  .art-content h2 { font-size: 19px; margin: 32px 0 12px; }
  .art-content h3 { font-size: 16px; }
  .art-content p { font-size: 15px; line-height: 1.75; }
  .art-content ul li { font-size: 15px; }

  /* ── Карточки — всегда 1 колонка ── */
  .build-cards { grid-template-columns: 1fr !important; gap: 10px; }
  .build-card { padding: 16px 14px; border-radius: 12px; }
  .build-card__icon { font-size: 24px; margin-bottom: 8px; }
  .build-card__title { font-size: 14px; }
  .build-card__text { font-size: 13px; }
  .compare-cards { grid-template-columns: 1fr !important; }

  /* ── Callout ── */
  .callout { padding: 14px 14px; margin: 18px 0; }
  .callout__icon { font-size: 18px; }
  .callout__title { font-size: 14px; }
  .callout p { font-size: 14px; }

  /* ── CTA блок внизу статьи ── */
  .art-cta { padding: 24px 18px; margin-top: 32px; border-radius: 14px; }
  .art-cta h3 { font-size: 19px; margin-bottom: 10px; }
  .art-cta p { font-size: 14px; margin-bottom: 18px; }
  .art-cta__actions { flex-direction: column; gap: 10px; }
  .art-cta__actions .btn { width: 100%; text-align: center; padding: 14px 20px; }

  /* ── Блог-листинг ── */
  .blog-hero { padding: 80px 0 32px; }
  .blog-hero__title { font-size: 28px; }
  .blog-hero__sub { font-size: 14px; }
  .blog-grid { padding: 32px 0 56px; }
  .blog-cards { grid-template-columns: 1fr; gap: 14px; }
  .blog-card__cover { height: 160px; }
  .blog-card__title { font-size: 16px; }
  .blog-card__body { padding: 16px; }
  .blog-card__excerpt { font-size: 13px; }
  .blog-card__footer { padding: 12px 16px; font-size: 12px; }

  /* ── Текст договора и блок скачивания ── */
  .contract-doc { padding: 18px 16px; font-size: 13.5px; max-height: 480px; }
  .contract-doc h4 { font-size: 14px; margin: 18px 0 6px; }
  .contract-doc .contract-doc__title { font-size: 15px; }
  .download-box { padding: 16px 16px; }
  .download-box__actions { flex-direction: column; }
  .download-box__actions .btn { width: 100%; text-align: center; justify-content: center; }
}

/* ========== ТАБЛИЦЫ → КАРТОЧКИ на мобиле ========== */
@media (max-width: 768px) {
  .art-table,
  .art-table tbody,
  .art-table tr,
  .art-table td { display: block; width: 100%; box-sizing: border-box; }

  .art-table { border: none; margin: 16px 0; }
  .art-table thead { display: none; }

  .art-table tbody tr {
    border: 1.5px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fff;
  }
  .art-table tbody tr:nth-child(even) { background: #fff; }

  .art-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-light);
    white-space: normal;
    word-break: break-word;
  }
  .art-table tbody td:first-child {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    background: rgba(31,61,31,0.07);
    border-bottom-color: var(--border);
  }
  .art-table tbody td:last-child { border-bottom: none; }

  .art-table tbody td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--green-mid);
    margin-bottom: 4px;
  }
  .art-table tbody td:first-child[data-label]::before { display: none; }
  .art-table tbody td:empty { display: none; }
}

/* Download box (шаблоны документов) */
.download-box {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 28px 0;
}
.download-box__title { font-weight: 700; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.download-box__text { font-size: 14px; color: var(--text-light); margin-bottom: 16px; line-height: 1.6; }
.download-box__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.download-box__actions .btn { display: inline-flex; align-items: center; gap: 8px; }

/* Текст договора внутри статьи */
.contract-doc {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  margin: 24px 0;
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  max-height: 640px;
  overflow-y: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contract-doc h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  margin: 22px 0 8px;
}
.contract-doc h4:first-child { margin-top: 0; }
.contract-doc p { margin: 0 0 10px; }
.contract-doc .contract-doc__title {
  font-family: var(--font-sans);
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 16px;
}
