/* === Блог Golden Sun: общие стили для list / post / cards === */

/* Breadcrumbs */
.breadcrumb-row {
  font-size: 14px;
  color: var(--mute, #62625b);
  margin-bottom: 24px;
}
.breadcrumb-row a {
  color: var(--mute, #62625b);
  text-decoration: none;
}
.breadcrumb-row a:hover { color: var(--ink, #000); }
.breadcrumb-row .sep { margin: 0 6px; opacity: .5; }

/* HERO */
.blog-hero {
  padding: 48px 0 24px;
  background: var(--canvas, #fff);
  border-bottom: 1px solid var(--hairline-soft, #e5e5e0);
}
.blog-hero-content { max-width: 760px; margin-bottom: 28px; }
.blog-hero h1 {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--ink, #000);
  letter-spacing: -0.6px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.blog-hero-sub {
  font-size: 17px;
  color: var(--mute, #62625b);
  line-height: 1.55;
  max-width: 700px;
}

/* Tag filters */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--surface-soft, #fbfbf9);
  border: 1.5px solid var(--hairline, #dadad3);
  border-radius: var(--r-full, 9999px);
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal, #262622);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  text-decoration: none;
}
.tag-pill:hover {
  border-color: var(--primary, #e60023);
  color: var(--ink, #000);
}
.tag-pill.active {
  background: var(--ink, #000);
  color: var(--on-dark, #fff);
  border-color: var(--ink, #000);
}

/* Loading state */
.loading {
  padding: 80px 0;
  text-align: center;
  color: var(--mute, #62625b);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--hairline-soft, #e5e5e0);
  border-top-color: var(--primary, #e60023);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.blog-empty { padding: 60px 0 80px; }
.empty-card {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 32px;
  background: var(--canvas, #fff);
  border: 1px dashed var(--hairline, #dadad3);
  border-radius: var(--r-lg, 32px);
}
.empty-card svg { color: var(--ash, #91918c); margin-bottom: 20px; }
.empty-card h2 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.6rem;
  color: var(--ink, #000);
  margin-bottom: 12px;
}
.empty-card p { color: var(--mute, #62625b); font-size: 15px; margin-bottom: 28px; line-height: 1.6; }

/* Featured card */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--canvas, #fff);
  border-radius: var(--r-lg, 32px);
  border: 1px solid var(--hairline-soft, #e5e5e0);
  overflow: hidden;
  margin: 28px 0;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.featured-card:hover {
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.featured-image {
  position: relative;
  min-height: 360px;
  background: var(--surface-card, #f6f6f3);
  overflow: hidden;
}
.featured-image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.featured-card:hover .featured-image img { transform: scale(1.04); }
.featured-image-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--ash, #91918c);
  font-family: var(--font-display, sans-serif);
  font-size: 18px;
  font-weight: 600;
}
.featured-tag-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--primary, #e60023);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--r-full, 9999px);
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-body h2 {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--ink, #000);
  letter-spacing: -0.3px;
  line-height: 1.25;
  margin-bottom: 16px;
}
.featured-body p {
  color: var(--mute, #62625b);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.featured-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px;
  color: var(--mute, #62625b);
  margin-bottom: 20px;
}
.featured-meta svg { width: 14px; height: 14px; opacity: 0.6; }
.featured-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink, #000);
  color: #fff;
  padding: 12px 22px;
  border-radius: var(--r-md, 16px);
  font-size: 14px;
  font-weight: 700;
  align-self: flex-start;
  transition: background .15s;
}
.featured-card:hover .featured-cta { background: var(--primary, #e60023); }

/* Grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 28px 0 0;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--canvas, #fff);
  border-radius: var(--r-lg, 32px);
  border: 1px solid var(--hairline-soft, #e5e5e0);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.post-card-img {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--surface-card, #f6f6f3);
  overflow: hidden;
}
.post-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-img-fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--ash, #91918c);
  font-family: var(--font-display, sans-serif);
  font-size: 14px;
  font-weight: 600;
}
.post-card-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary, #e60023);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--r-full, 9999px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.post-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-card-body h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink, #000);
  line-height: 1.3;
  margin-bottom: 12px;
}
.post-card-body p {
  color: var(--mute, #62625b);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}
.post-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--hairline-soft, #e5e5e0);
  font-size: 13px;
  color: var(--mute, #62625b);
}
.post-card-date { display: inline-flex; align-items: center; gap: 6px; }
.post-card-date svg { width: 13px; height: 13px; opacity: .6; }
.post-card-cta {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 700; color: var(--primary, #e60023);
  transition: transform .2s;
}
.post-card:hover .post-card-cta { transform: translateX(2px); }

/* Pagination */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px;
  margin: 48px 0;
}
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 14px;
  background: var(--canvas, #fff);
  border: 1.5px solid var(--hairline, #dadad3);
  border-radius: var(--r-md, 16px);
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal, #262622);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.page-btn:hover { border-color: var(--ink, #000); }
.page-btn.active { background: var(--ink, #000); color: var(--on-dark, #fff); border-color: var(--ink, #000); }
.page-btn:disabled, .page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* SEO text */
.seo-text {
  background: var(--canvas, #fff);
  padding: 80px 0;
  border-top: 1px solid var(--hairline-soft, #e5e5e0);
  margin-top: 60px;
}
.seo-text-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
}
.seo-text h2 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink, #000);
  margin-bottom: 16px;
}
.seo-text h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink, #000);
  margin-bottom: 16px;
}
.seo-text p {
  color: var(--mute, #62625b);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
}
.seo-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.seo-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--mute, #62625b);
  font-size: 14px;
  line-height: 1.5;
}
.seo-bullets li::before {
  content: '';
  flex: none;
  width: 6px; height: 6px;
  margin-top: 8px;
  background: var(--primary, #e60023);
  border-radius: 50%;
}

@media (max-width: 1024px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-image { min-height: 280px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .seo-text-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .featured-body { padding: 28px; }
  .featured-body h2 { font-size: 1.4rem; }
}

/* === Reading progress bar (сверху страницы) === */
.read-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary, #e60023);
  z-index: 200;
  transition: width .12s linear;
}

/* === Страница отдельного поста — единый wrapper 1100px === */
.post-page-wrap {
  max-width: 1148px;          /* 1100 контент + 24+24 padding */
  margin: 0 auto;
  padding: 80px 24px 80px;    /* 80px сверху — крошки явно отделены от шапки */
}
/* Breadcrumb теперь автоматически выровнен с H1 и сеткой контента */
.post-page-wrap > .breadcrumb-row {
  font-size: 14px;
  color: var(--charcoal, #262622);
  margin: 0 0 40px;
}
.post-page-wrap > .breadcrumb-row a {
  color: var(--charcoal, #262622);
  font-weight: 500;
}
.post-page-wrap > .breadcrumb-row a:hover {
  color: var(--primary, #e60023);
}
.post-page-wrap > .breadcrumb-row .sep {
  margin: 0 8px;
  color: var(--ash, #91918c);
  opacity: 1;
}

.post-header {
  margin: 0 0 32px;
}
.post-header h1 {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  color: var(--ink, #000);
  letter-spacing: -0.4px;
  line-height: 1.2;
  margin-bottom: 28px;
  max-width: 820px;
}
.post-meta-bar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  padding: 16px 22px;
  background: var(--surface-soft, #fbfbf9);
  border: 1px solid var(--hairline-soft, #e5e5e0);
  border-radius: var(--r-full, 9999px);
}
.post-meta-info {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  font-size: 13px;
  color: var(--mute, #62625b);
}
.post-meta-info > span {
  display: inline-flex; align-items: center; gap: 6px;
  line-height: 1;
}
.post-meta-info svg { width: 15px; height: 15px; opacity: 0.65; flex: none; }
.post-share { display: flex; gap: 6px; }
.share-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--canvas, #fff);
  border: 1px solid var(--hairline, #dadad3);
  color: var(--mute, #62625b);
  transition: border-color .15s, color .15s, background .15s;
  text-decoration: none;
}
.share-btn:hover {
  border-color: var(--primary, #e60023);
  color: var(--primary, #e60023);
}
.share-btn svg { width: 15px; height: 15px; }
.rating-stars { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.rating-stars-inner { display: inline-flex; gap: 1px; }
.rating-stars svg { width: 15px; height: 15px; }
.rating-stars .full { color: #f5b945; }
.rating-stars .empty { color: var(--hairline, #dadad3); }
.rating-stars .label {
  font-size: 13px;
  color: var(--charcoal, #262622);
  font-weight: 600;
  margin-left: 2px;
}

/* Cover image — БОЛЬШОЙ под H1, на всю ширину wrapper'а статьи */
.post-cover-wide {
  margin: 0 0 40px;
}
.post-cover {
  border-radius: var(--r-md, 16px);
  overflow: hidden;
  border: 1px solid var(--hairline-soft, #e5e5e0);
}
.post-cover img {
  width: 100%;
  height: clamp(260px, 38vw, 460px);
  object-fit: cover;
  display: block;
}

.post-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 60px;
  margin: 0;
}

/* Article rich-text content — оптимальная measure для чтения */
.post-content {
  color: var(--body, #33332e);
  font-size: 17px;
  line-height: 1.7;
  max-width: 720px;
}
.post-content h2 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.4rem; font-weight: 700; color: var(--ink, #000);
  margin: 44px 0 14px;
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.post-content h2:first-child { margin-top: 0; }
.post-content h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.1rem; font-weight: 700; color: var(--ink, #000);
  margin: 28px 0 10px;
  line-height: 1.35;
}
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol { margin: 18px 0 18px 26px; }
.post-content li { margin-bottom: 8px; }
.post-content a { color: var(--primary, #e60023); text-decoration: underline; }
.post-content a:hover { color: var(--primary-pressed, #cc001f); }
.post-content blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  background: var(--surface-soft, #fbfbf9);
  border-left: 4px solid var(--primary, #e60023);
  border-radius: 0 var(--r-md, 16px) var(--r-md, 16px) 0;
  color: var(--charcoal, #262622);
}
.post-content img {
  max-width: 100%; height: auto;
  border-radius: var(--r-md, 16px);
  margin: 24px 0;
}
.post-content code {
  background: var(--surface-card, #f6f6f3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.9em;
}

/* FAQ accordion */
.post-faq { margin-top: 48px; }
.post-faq h2 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.6rem; font-weight: 700; color: var(--ink, #000); margin-bottom: 20px;
}
.faq-item {
  background: var(--canvas, #fff);
  border: 1px solid var(--hairline-soft, #e5e5e0);
  border-radius: var(--r-md, 16px);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display, sans-serif);
  font-weight: 700; font-size: 16px;
  color: var(--ink, #000);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--primary, #e60023);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-answer {
  padding: 0 22px 18px;
  color: var(--mute, #62625b);
  font-size: 15px;
  line-height: 1.6;
}

/* Mentioned products */
.post-products { margin-top: 48px; }
.post-products h2 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.4rem; font-weight: 700; color: var(--ink, #000); margin-bottom: 20px;
}
.post-products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.product-mini {
  display: block;
  padding: 22px;
  background: var(--canvas, #fff);
  border: 1px solid var(--hairline-soft, #e5e5e0);
  border-radius: var(--r-md, 16px);
  text-decoration: none; color: inherit;
  transition: border-color .15s;
}
.product-mini:hover { border-color: var(--primary, #e60023); }
.product-mini-name { font-family: var(--font-display, sans-serif); font-weight: 700; color: var(--ink, #000); margin-bottom: 4px; }
.product-mini-cat { font-size: 12px; color: var(--mute, #62625b); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.product-mini-link { font-size: 14px; font-weight: 700; color: var(--primary, #e60023); display: inline-flex; align-items: center; gap: 4px; }

/* Author block */
.post-author {
  margin-top: 48px;
  padding: 24px;
  background: var(--surface-soft, #fbfbf9);
  border: 1px solid var(--hairline-soft, #e5e5e0);
  border-radius: var(--r-lg, 32px);
  display: flex; gap: 20px; align-items: flex-start;
}
.post-author-photo {
  flex: none; width: 64px; height: 64px;
  border-radius: 50%; overflow: hidden;
  background: var(--primary, #e60023);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-family: var(--font-display, sans-serif); font-size: 22px;
}
.post-author-photo img { width: 100%; height: 100%; object-fit: cover; }
.post-author-name { font-family: var(--font-display, sans-serif); font-weight: 700; font-size: 17px; color: var(--ink, #000); margin-bottom: 4px; }
.post-author-desc { color: var(--mute, #62625b); font-size: 14px; line-height: 1.5; }

/* Sidebar — sticky на десктопе, контрастный фон */
.post-sidebar {
  display: flex; flex-direction: column; gap: 16px;
  position: sticky;
  top: 140px;
  align-self: start;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.post-sidebar::-webkit-scrollbar { width: 4px; }
.post-sidebar::-webkit-scrollbar-thumb { background: var(--hairline, #dadad3); border-radius: 4px; }
.sidebar-card {
  padding: 24px;
  background: var(--canvas, #fff);
  border: 1px solid var(--hairline, #dadad3);
  border-radius: var(--r-md, 16px);
  box-shadow: 0 2px 6px -3px rgba(0,0,0,0.04);
}
.sidebar-card.dark { background: var(--ink, #000); color: #fff; border-color: var(--ink, #000); }
.sidebar-card.dark p { color: rgba(255,255,255,0.7); }
.sidebar-card h3 {
  font-family: var(--font-display, sans-serif);
  font-size: 13px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink, #000);
  margin-bottom: 18px;
}
.sidebar-card.dark h3 { color: #fff; }
.sidebar-card.cta h3 { font-size: 1.15rem; text-transform: none; letter-spacing: -0.2px; }
.sidebar-card.cta p { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 18px; line-height: 1.5; }
.sidebar-card .btn-primary { width: 100%; }
.toc-nav { display: flex; flex-direction: column; gap: 2px; }
.toc-nav a {
  padding: 8px 0 8px 14px;
  border-left: 2px solid var(--hairline-soft, #e5e5e0);
  font-size: 13.5px;
  color: var(--mute, #62625b);
  text-decoration: none;
  line-height: 1.4;
  transition: color .15s, border-color .15s, background .15s;
}
.toc-nav a:hover {
  color: var(--ink, #000);
  border-left-color: var(--ash, #91918c);
}
.toc-nav a.active {
  color: var(--primary, #e60023);
  border-left-color: var(--primary, #e60023);
  font-weight: 700;
}

/* Related posts */
.post-related {
  background: var(--surface-soft, #fbfbf9);
  padding: 64px 0;
  border-top: 1px solid var(--hairline-soft, #e5e5e0);
}
.post-related-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.post-related h2 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.5rem; font-weight: 700; color: var(--ink, #000);
}
.post-related a.all-link { font-weight: 700; color: var(--ink, #000); text-decoration: none; font-size: 14px; }
.post-related a.all-link:hover { color: var(--primary, #e60023); }

@media (max-width: 1024px) {
  .post-body-grid { grid-template-columns: 1fr; gap: 32px; }
  .post-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .post-sidebar > * { flex: 1 1 calc(50% - 10px); }
  .post-products-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .post-sidebar > * { flex: 1 1 100%; }
  .post-meta-bar { flex-direction: column; align-items: flex-start; }
}
