/**
 * МастерДом - blog styles (on top of landing.css)
 */

.blog-wrap {
  padding: 56px 0 92px;
  background: var(--light);
  min-height: 60vh;
}

.blog-head { margin-bottom: 44px; }
.blog-head h1 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin-bottom: 16px;
}
.blog-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  padding: 60px 0;
}

/* ===== List ===== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 158, 11, 0.5);
}
.post-card-img {
  aspect-ratio: 16 / 9;
  background: var(--dark-2);
  overflow: hidden;
}
.post-card-img svg {
  width: 100%;
  height: 100%;
  display: block;
}
.post-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.post-card-body time {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.post-card-body h2 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--dark);
}
.post-card-body p {
  font-size: 14.5px;
  color: var(--text-muted);
  flex: 1;
}
.post-card-more {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* ===== Article ===== */
.article-wrap {
  max-width: 800px;
}
.crumbs {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.crumbs a { color: var(--accent-dark); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }

.article-wrap h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin-bottom: 14px;
}
.article-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
  background: var(--dark-2);
}
.article-cover svg { width: 100%; height: auto; display: block; }

.article-body {
  font-size: 17.5px;
  line-height: 1.75;
  color: var(--text);
}
.article-body h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  margin: 40px 0 16px;
  line-height: 1.25;
}
.article-body h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin: 28px 0 12px;
}
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--accent-dark); font-weight: 600; }
.article-body figure {
  margin: 30px 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
}
.article-body figure svg { width: 100%; height: auto; display: block; }
.article-body figcaption {
  font-size: 14px;
  color: var(--text-muted);
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15.5px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-body th, .article-body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.article-body th {
  background: var(--dark);
  color: var(--white);
  font-weight: 700;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body blockquote {
  margin: 24px 0;
  padding: 18px 24px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 48px 0 0;
  padding: 30px 34px;
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--text-on-dark);
}
.article-cta b {
  display: block;
  font-size: 21px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
}
.article-cta p {
  font-size: 15px;
  color: var(--text-on-dark-muted);
  margin: 0;
  max-width: 440px;
}

.related { margin-top: 56px; }
.related h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 20px;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.35;
  transition: border-color 0.15s, transform 0.15s;
}
.related-card:hover { border-color: var(--accent-dark); transform: translateY(-2px); }
.related-card small { color: var(--text-muted); font-weight: 600; }

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .blog-wrap { padding: 40px 0 64px; }
  .post-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-cta { padding: 24px; }
}
