/* ==========================================================================
   РОДНЫЕ СКАЗКИ • БЛОГ И СТАТЬИ О СКАЗКОТЕРАПИИ И ВОСПИТАНИИ
   Стили хаба блога и отдельных страниц статей
   ========================================================================== */

:root {
  --bg-primary: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-subtle: #F6F3EE;
  --text-main: #2D2622;
  --text-muted: #685E57;
  --text-light: #8C827A;
  
  --accent-amber: #D97746;
  --accent-amber-hover: #C56333;
  --accent-amber-soft: rgba(217, 119, 70, 0.08);
  
  --sage-green: #5B7A63;
  --sage-green-soft: rgba(91, 122, 99, 0.08);
  
  --gold-warm: #C99757;
  --gold-gradient: linear-gradient(135deg, #E8B978 0%, #C99757 50%, #9C6A2E 100%);
  
  --border-light: #EBE5DC;
  --border-focus: #D4C9BC;
  
  --shadow-sm: 0 2px 8px rgba(45, 38, 34, 0.04);
  --shadow-md: 0 6px 20px rgba(45, 38, 34, 0.06);
  --shadow-lg: 0 12px 36px rgba(45, 38, 34, 0.09);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-display: 'Cinzel', serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.7;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* Липкий прогресс-бар чтения */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--gold-gradient);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* Контейнеры */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.article-container {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Хедер блога */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
  transition: box-shadow 0.25s ease;
}

.blog-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.blog-logo-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gold-warm);
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(201, 151, 87, 0.25);
}

.blog-logo-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  display: block;
}

.blog-logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  letter-spacing: 0.02em;
}

.blog-header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.blog-nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.blog-nav-link:hover,
.blog-nav-link.active {
  color: var(--accent-amber);
}

.blog-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold-gradient);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(201, 151, 87, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-header-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 151, 87, 0.45);
}

/* Хлебные крошки */
.breadcrumbs {
  padding: 20px 0 10px;
  font-size: 0.88rem;
  color: var(--text-light);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  color: var(--text-light);
  font-size: 1.1rem;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--accent-amber);
}

.breadcrumbs li:last-child {
  color: var(--text-main);
  font-weight: 500;
}

/* Главный блок Хаба блога */
.blog-hero {
  padding: 40px 0 30px;
  text-align: center;
}

.blog-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
  background: var(--accent-amber-soft);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.blog-hero-title {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 16px;
}

.blog-hero-desc {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Фильтры категорий блога */
.blog-categories-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 40px;
}

.category-pill {
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.category-pill:hover,
.category-pill.active {
  background: var(--text-main);
  color: #FFFFFF;
  border-color: var(--text-main);
}

/* Сетка карточек блога */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-warm);
}

.blog-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
  overflow: hidden;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}

.blog-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  color: var(--accent-amber);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.blog-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 12px;
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-amber);
}

.blog-card-footer svg {
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-footer svg {
  transform: translateX(4px);
}

/* ==========================================================================
   СТИЛИ СТРАНИЦЫ СТАТЬИ
   ========================================================================== */

.article-hero {
  padding: 20px 0 35px;
}

.article-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
  background: var(--accent-amber-soft);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 18px;
}

.article-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 35px;
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-author-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold-warm);
}

.article-author-name {
  font-weight: 700;
  color: var(--text-main);
}

.article-author-role {
  font-size: 0.8rem;
  color: var(--text-light);
}

.article-lead-image-wrap {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.article-lead-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.article-lead-caption {
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  text-align: center;
}

/* Тело статьи (Типографика) */
.article-body {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-main);
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2.4rem 0 1rem;
  color: var(--text-main);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-amber-soft);
}

.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 1.8rem 0 0.8rem;
  color: var(--text-main);
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1.5rem 1.4rem;
}

.article-body li {
  margin-bottom: 0.6rem;
  padding-left: 0.3rem;
}

.article-body strong {
  font-weight: 700;
  color: #1A1513;
}

/* Информационные плашки (Callout Boxes) */
.callout-box {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 2rem 0;
  border-left: 4px solid var(--accent-amber);
  box-shadow: var(--shadow-sm);
}

.callout-box.sage {
  border-left-color: var(--sage-green);
  background: #F4F7F4;
}

.callout-box.gold {
  border-left-color: var(--gold-warm);
  background: #FDF9F3;
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.callout-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0 !important;
}

/* Цитаты */
.quote-block {
  margin: 2rem 0;
  padding: 24px 30px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  position: relative;
}

.quote-block::before {
  content: '“';
  font-family: var(--font-serif);
  font-size: 4rem;
  line-height: 1;
  position: absolute;
  top: 10px;
  left: 14px;
  color: var(--gold-warm);
  opacity: 0.35;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-main);
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

.quote-author {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-amber);
  text-align: right;
  display: block;
}

/* Встроенный CTA-блок статьи */
.article-cta-card {
  background: linear-gradient(135deg, #FFFDFB 0%, #F8F2EB 100%);
  border: 1px solid var(--gold-warm);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin: 3.5rem 0;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.article-cta-badge {
  display: inline-block;
  background: var(--gold-gradient);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.article-cta-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 12px;
}

.article-cta-desc {
  max-width: 620px;
  margin: 0 auto 24px;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-cta-promo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px dashed var(--accent-amber);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.promo-val {
  font-weight: 800;
  color: var(--accent-amber);
  letter-spacing: 0.04em;
}

.article-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--gold-gradient);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(201, 151, 87, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201, 151, 87, 0.5);
}

.article-cta-note {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* FAQ блок в статье */
.article-faq-section {
  margin: 3.5rem 0;
  padding-top: 2rem;
  border-top: 2px solid var(--border-light);
}

.faq-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.faq-answer {
  padding: 18px 22px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Перелинковка: Читайте также */
.related-articles {
  margin: 4rem 0 2rem;
  padding-top: 2.5rem;
  border-top: 2px solid var(--border-light);
}

.related-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-warm);
  box-shadow: var(--shadow-md);
}

.related-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 8px;
}

.related-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-main);
  flex-grow: 1;
  margin-bottom: 10px;
}

.related-card-readmore {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Футер блога */
.blog-footer {
  background: #F3EFEA;
  border-top: 1px solid var(--border-light);
  padding: 50px 0 35px;
  margin-top: 70px;
  font-size: 0.95rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 380px;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-nav-col h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.footer-nav-col ul {
  list-style: none;
}

.footer-nav-col li {
  margin-bottom: 10px;
}

.footer-nav-col a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav-col a:hover {
  color: var(--accent-amber);
}

.footer-bottom {
  padding-top: 25px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .blog-hero-title {
    font-size: 2rem;
  }
  
  .article-title {
    font-size: 1.85rem;
  }
  
  .article-body {
    font-size: 1.02rem;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .article-cta-card {
    padding: 26px 18px;
  }
  
  .article-cta-title {
    font-size: 1.5rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-header-nav {
    display: none;
  }
}
