/* ============================================================
   Блог LAPACA — общая стилистика страниц блога.
   Наследует тему главной страницы: палитра, шрифты, кнопки.
   ============================================================ */

:root {
  --theme-accent: #f59e0b;
  --theme-bg-main: #fcf9f2;
  --theme-bg-sec: #f3ece1;
  --theme-font-headings: "Lato", sans-serif;
  --theme-font-main: "Open Sans", sans-serif;
  --theme-max-width: 1200px;
  --theme-primary: #d84315;
  --theme-primary-dark: #b3360f;
  --theme-radius: 4px;
  --theme-text-main: #3e2723;
  --theme-text-soft: #6d5a52;
  --theme-border: #e9dfd2;
  --theme-shadow: 0 10px 30px rgba(62, 39, 35, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--theme-font-main);
  font-size: 17px;
  line-height: 1.75;
  color: var(--theme-text-main);
  background: var(--theme-bg-main);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--theme-primary); text-decoration: none; }
a:hover { color: var(--theme-primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--theme-font-headings);
  line-height: 1.2;
  color: var(--theme-text-main);
  margin: 0 0 0.55em;
  font-weight: 800;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: 1.55rem; margin-top: 1.6em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; }

p { margin: 0 0 1.1em; }

.container {
  max-width: var(--theme-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Шапка ---------- */
.site-header {
  background: rgba(252, 249, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--theme-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  font-family: var(--theme-font-headings);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  color: var(--theme-text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.main-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.main-nav a {
  color: var(--theme-text-main);
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--theme-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--theme-primary);
  color: #fff;
  font-weight: 700;
  font-family: var(--theme-font-main);
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 8px;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--theme-primary-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--theme-primary);
  border: 1.5px solid var(--theme-primary);
}
.btn-ghost:hover { background: rgba(216, 67, 21, 0.08); color: var(--theme-primary); }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--theme-text-soft);
  margin: 24px 0 8px;
}
.breadcrumbs a { color: var(--theme-text-soft); }
.breadcrumbs a:hover { color: var(--theme-primary); }
.breadcrumbs .sep { margin: 0 8px; }

/* ---------- Шапка статьи ---------- */
.article-hero {
  max-width: 800px;
  margin: 8px auto 28px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--theme-text-soft);
  font-size: 0.9rem;
  margin: 14px 0 22px;
}
.tag {
  display: inline-block;
  background: var(--theme-bg-sec);
  color: var(--theme-primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
}

/* ---------- Изображения ---------- */
figure { margin: 28px 0; }
figure img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow);
}
figcaption {
  font-size: 0.85rem;
  color: var(--theme-text-soft);
  margin-top: 10px;
  text-align: center;
}

/* ---------- Тело статьи ---------- */
.article-body {
  max-width: 760px;
  margin: 0 auto;
}
.article-body h2 {
  border-left: 4px solid var(--theme-accent);
  padding-left: 16px;
}
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: 0.45em; }
.article-body strong { color: var(--theme-text-main); }

.callout {
  background: var(--theme-bg-sec);
  border-left: 4px solid var(--theme-primary);
  border-radius: 0 var(--theme-radius) var(--theme-radius) 0;
  padding: 18px 22px;
  margin: 26px 0;
}
.callout p:last-child { margin-bottom: 0; }
/* ---------- FAQ ---------- */
.faq { margin: 34px 0 0; }
.faq details {
  background: #fff;
  border: 1px solid var(--theme-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-family: var(--theme-font-headings);
  color: var(--theme-text-main);
}
.faq details p { margin: 12px 0 0; color: var(--theme-text-soft); }

/* ---------- CTA ---------- */
.cta {
  background: var(--theme-bg-sec);
  border-radius: 16px;
  padding: 40px 28px;
  text-align: center;
  margin: 40px 0;
}
.cta h2 { margin-top: 0; }
.cta .btn { font-size: 1rem; padding: 13px 28px; }

/* ---------- Похожие статьи ---------- */
.related { margin: 48px 0 20px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--theme-border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--theme-shadow); }
.card-img {
  aspect-ratio: 16 / 9;
  background: var(--theme-bg-sec);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.1rem; }
.card-body p { margin: 0; font-size: 0.92rem; color: var(--theme-text-soft); }
.card-link { margin-top: auto; font-weight: 700; font-size: 0.9rem; }

/* ---------- Главная блога ---------- */
.blog-hero {
  background: var(--theme-bg-sec);
  border-radius: 18px;
  padding: 48px 28px;
  text-align: center;
  margin: 24px 0 36px;
}
.blog-hero h1 { margin-bottom: 12px; }
.blog-hero p { max-width: 640px; margin: 0 auto; color: var(--theme-text-soft); font-size: 1.05rem; }

/* ---------- Футер ---------- */
.site-footer {
  margin-top: 60px;
  background: var(--theme-bg-sec);
  border-top: 1px solid var(--theme-border);
  padding: 40px 0 24px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-note { color: var(--theme-text-soft); font-size: 0.9rem; max-width: 340px; margin: 10px 0 0; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--theme-text-main); font-weight: 600; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--theme-primary); }
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--theme-border);
  color: var(--theme-text-soft);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .header-inner { justify-content: space-between; }
}

