/* =======================================================================
   Хлеб на закваске — общие стили сайта
   Используется всеми шаблонами: article.html, category.html, index.html
   ======================================================================= */

:root {
  --bg: #FDFCF9;
  --ink: #2E2620;
  --ink-soft: #5A4F44;
  --bark: #A89684;
  --bark-dark: #7A6A5A;
  --leaf: #7C8A5C;
  --leaf-light: #9BAA79;
  --kraft: #D9C7A3;
  --kraft-dark: #C4AF85;
  --honey: #C08A3E;
  --honey-dark: #A5722F;
  --line: #E8E1D3;
}

/* ---------- база ---------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'PT Sans', sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  color: var(--ink);
  font-weight: 600;
  margin: 0;
}

a { color: inherit; }

/* =======================================================================
   Декоративные элементы (берёзы по бокам, гирлянда листьев сверху)
   ======================================================================= */

.birch-side {
  position: fixed;
  bottom: 0;
  width: 220px;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.9;
}
.birch-side.left { left: 0; }
.birch-side.right { right: 0; transform: scaleX(-1); }
@media (max-width: 1380px) {
  .birch-side { display: none; }
}

.leaf-garland {
  position: relative;
  width: 100%;
  height: 108px;
  z-index: 5;
  margin-bottom: -46px;
}
@media (max-width: 640px) {
  .leaf-garland { height: 72px; margin-bottom: -26px; }
}

/* =======================================================================
   Шапка сайта (одинаковая на всех страницах)
   ======================================================================= */

header.site-header {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 0 20px 28px;
}
.wordmark {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-style: italic;
  font-size: 34px;
  color: var(--bark-dark);
  letter-spacing: 0.3px;
}
.site-tagline {
  font-family: 'Caveat', cursive;
  font-size: 19px;
  color: var(--ink-soft);
  margin-top: 2px;
}
nav.board-nav {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 14px;
}
nav.board-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
nav.board-nav a:hover, nav.board-nav a.active {
  color: var(--honey-dark);
  border-color: var(--honey);
}

/* =======================================================================
   Контейнеры центральной колонки
   ======================================================================= */

/* узкая колонка — для чтения длинного текста статьи */
main {
  position: relative;
  z-index: 2;
  max-width: 740px;
  margin: 0 auto;
  padding: 30px 22px 90px;
}

/* широкая колонка — для сеток карточек (category.html, index.html).
   Добавь класс "wide" на <main>, чтобы переключить ширину. */
main.wide {
  max-width: 1120px;
  padding: 30px 24px 90px;
}

/* =======================================================================
   Компонент: eyebrow-бирка (категория над заголовком статьи)
   ======================================================================= */

.eyebrow {
  display: inline-block;
  font-family: 'Caveat', cursive;
  font-size: 20px;
  font-weight: 600;
  color: var(--bark-dark);
  background: var(--kraft);
  padding: 4px 16px 6px;
  border-radius: 3px 12px 5px 10px;
  transform: rotate(-1.2deg);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  margin-bottom: 18px;
}

/* =======================================================================
   Страница статьи (article.html)
   ======================================================================= */

h1.article-title {
  font-size: 40px;
  line-height: 1.22;
  margin-bottom: 22px;
}
@media (max-width: 640px) {
  h1.article-title { font-size: 30px; }
}

.hero-photo, .inline-photo, .card-photo, .featured-photo, .new-photo {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  background: linear-gradient(135deg, #EFE6D0 0%, #E3D5B8 50%, #D9C7A3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-style: italic;
  border: 1px solid var(--line);
}
.hero-photo { margin-bottom: 34px; font-size: 14px; }
.inline-photo { margin: 30px 0; }
.featured-photo { aspect-ratio: 4/3; }

.intro {
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 30px;
}

article p { margin: 0 0 22px; }

h2.section-title {
  font-size: 25px;
  margin: 44px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
h2.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

h3.subhead {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 19px;
  color: var(--bark-dark);
  margin: 30px 0 10px;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--honey-dark);
  background: #FBF0DC;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85em;
  padding: 2px 10px 3px 8px;
  border-radius: 3px 9px 3px 9px;
  border: 1px solid #EAD9B0;
  vertical-align: middle;
  transition: background 0.15s, transform 0.15s;
}
.product-link:hover {
  background: var(--kraft);
  transform: translateY(-1px);
}
.product-link:hover { border-bottom-style: solid; }

ul.ingredients {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
ul.ingredients li {
  padding: 9px 0 9px 26px;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
ul.ingredients li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 7px;
  height: 7px;
  background: var(--leaf-light);
  border-radius: 50%;
}

/* отдельное оформление для списков ингредиентов/инвентаря — бледно-зелёный
   блок, чтобы визуально отделить "что понадобится" от обычного текста */
ul.ingredients-box {
  list-style: none;
  margin: 0 0 24px;
  padding: 18px 20px;
  background: #EEF2E6;
  border: 1px solid #DCE5CC;
  border-radius: 6px 16px 6px 16px;
}
ul.ingredients-box li {
  padding: 7px 0 7px 24px;
  position: relative;
  border-bottom: 1px dashed #D3DDC2;
}
ul.ingredients-box li:last-child {
  border-bottom: none;
}
ul.ingredients-box li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 7px;
  height: 7px;
  background: var(--leaf);
  border-radius: 50%;
}

.related {
  margin-top: 56px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.related h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--bark-dark);
}
.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.related-list a {
  text-decoration: none;
  background: #F7F2E8;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 4px 12px 4px 12px;
  color: var(--ink);
  font-size: 15px;
  transition: background 0.2s;
}
.related-list a:hover { background: var(--kraft); }

/* =======================================================================
   Крафтовый CTA-блок (вебинар) — используется на всех типах страниц
   ======================================================================= */

.cta-block {
  padding: 28px 26px;
  background: var(--kraft);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.15) 0px, rgba(255,255,255,0.15) 1px, transparent 1px, transparent 6px);
  border-radius: 4px 16px 4px 16px;
  text-align: center;
  box-shadow: 0 3px 0 var(--kraft-dark), 0 6px 14px rgba(122, 106, 90, 0.18);
}
.cta-block h2 {
  font-size: 24px;
  margin-bottom: 12px;
}
.cta-block p {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 16px;
}
.cta-button {
  display: inline-block;
  background: var(--honey);
  color: #FFF8EC;
  font-family: 'PT Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 3px 10px 3px 10px;
  box-shadow: 0 3px 0 var(--honey-dark);
  transition: transform 0.15s;
}
.cta-button:hover { transform: translateY(-2px); }

/* используется на article.html/category.html внутри узкой колонки */
main:not(.wide) .cta-block { margin: 48px 0; }
/* используется на category.html/index.html — центрируется в широкой колонке */
main.wide .cta-block { max-width: 780px; margin: 0 auto; }

/* =======================================================================
   Страница доски (category.html) — сетка карточек статей
   ======================================================================= */

.hub-intro {
  max-width: 760px;
  margin: 0 auto 46px;
  text-align: center;
}
h1.hub-title {
  font-size: 38px;
  line-height: 1.25;
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  h1.hub-title { font-size: 28px; }
}
.hub-intro p {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 26px;
}
@media (max-width: 900px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .article-grid { grid-template-columns: 1fr; gap: 26px; } }

.article-card { text-decoration: none; color: var(--ink); display: block; }
.article-card .card-photo {
  margin-bottom: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-card:hover .card-photo {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(122, 106, 90, 0.18);
}
.card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s;
}
.article-card:hover .card-title { color: var(--honey-dark); }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 3px 10px 3px 10px;
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-soft);
}
.pagination a { border: 1px solid var(--line); transition: background 0.2s; }
.pagination a:hover { background: #F7F2E8; }
.pagination span.current {
  background: var(--honey);
  color: #FFF8EC;
  font-weight: 700;
  box-shadow: 0 2px 0 var(--honey-dark);
}
.pagination .dots { color: var(--ink-soft); opacity: 0.6; }

/* =======================================================================
   Главная страница (index.html)
   ======================================================================= */

.hero {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.25;
  margin-bottom: 18px;
}
@media (max-width: 640px) { .hero h1 { font-size: 30px; } }
.hero p {
  color: var(--ink-soft);
  font-size: 18px;
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
}
.section-heading h2 { font-size: 27px; white-space: nowrap; }
.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
main.wide section { margin-bottom: 68px; }

/* -- топ-3 "любимое читателями" -- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 860px) { .featured-grid { grid-template-columns: 1fr; } }

.featured-card { text-decoration: none; color: var(--ink); display: block; position: relative; }
.featured-card .featured-photo {
  margin-bottom: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.featured-card:hover .featured-photo {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(122, 106, 90, 0.2);
}
.featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 18px;
  color: var(--bark-dark);
  background: var(--kraft);
  padding: 3px 14px 5px;
  border-radius: 3px 10px 3px 10px;
  transform: rotate(-2deg);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.featured-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.35;
  transition: color 0.2s;
}
.featured-card:hover .featured-title { color: var(--honey-dark); }

.read-more {
  display: inline-block;
  margin-top: 10px;
  font-family: 'PT Sans', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--honey-dark);
}
.featured-card:hover .read-more,
.new-card:hover .read-more { text-decoration: underline; }

/* -- плитки досок -- */
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 860px) { .board-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .board-grid { grid-template-columns: 1fr; } }

.board-tile {
  text-decoration: none;
  color: var(--ink);
  display: block;
  background: #F7F2E8;
  border: 1px solid var(--line);
  border-radius: 6px 18px 6px 18px;
  padding: 22px 22px 24px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.board-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(122, 106, 90, 0.15);
  background: #F3ECDC;
}
.board-tile .leaf-icon { width: 30px; height: 30px; margin-bottom: 12px; }
.board-tile h3 { font-size: 20px; margin-bottom: 8px; }
.board-tile p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 14px;
  line-height: 1.55;
}
.board-tile .tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'PT Sans', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  color: #FFF8EC;
  background: var(--honey);
  padding: 8px 16px;
  border-radius: 3px 9px 3px 9px;
  box-shadow: 0 2px 0 var(--honey-dark);
  transition: transform 0.15s;
}
.board-tile:hover .tile-cta { transform: translateY(-2px); }

/* -- новые статьи -- */
.new-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
}
@media (max-width: 900px) { .new-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .new-grid { grid-template-columns: 1fr; } }

.new-card { text-decoration: none; color: var(--ink); display: block; position: relative; }
.new-card .new-photo {
  margin-bottom: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.new-card:hover .new-photo {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(122, 106, 90, 0.18);
}
.new-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 16px;
  color: #FFF8EC;
  background: var(--leaf);
  padding: 2px 12px 4px;
  border-radius: 3px 8px 3px 8px;
  transform: rotate(2deg);
}
.new-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s;
}
.new-card:hover .new-title { color: var(--honey-dark); }

/* =======================================================================
   Подвал (одинаковый на всех страницах)
   ======================================================================= */

footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 30px 20px 50px;
  font-size: 13px;
  color: var(--ink-soft);
}
