/*
Theme Name: SEO Machine Blog
Theme URI: https://optiai.ru
Description: Минималистичная тема для SEO-блога, созданная SEO Machine. Чистый дизайн без лишних элементов.
Version: 2.3
Author: SEO Machine
*/

:root {
    --header-bg: #1a1a2e;
    --header-text: #ffffff;
    --accent: #e14747;
    --footer-bg: #1a1a2e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f8f9fa; color: #1a1a2e; line-height: 1.7; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); }

/* Header */
.site-header { background: var(--header-bg); padding: 12px 0; position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: nowrap; min-height: 52px; }
.header-left { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.header-logo { max-height: 46px; width: auto; display: block; }
.custom-logo { max-height: 46px; width: auto; display: block; }
.site-title { font-size: 1.05rem; font-weight: 700; color: var(--header-text); text-decoration: none; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-phone { color: var(--header-text); font-size: 0.88rem; font-weight: 600; text-decoration: none; opacity: 0.9; white-space: nowrap; }
.header-phone:hover { opacity: 1; }
.header-cta { background: var(--accent); color: #fff !important; font-size: 0.8rem; font-weight: 700; padding: 7px 16px; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.header-cta:hover { opacity: 0.9; }
.header-home { display: inline-flex; align-items: center; gap: 5px; color: var(--header-text); font-size: 0.8rem; font-weight: 600; text-decoration: none; opacity: 0.75; border: 1px solid rgba(255,255,255,.25); padding: 6px 12px; border-radius: 8px; white-space: nowrap; }
.header-home:hover { opacity: 1; background: rgba(255,255,255,.1); }
@media (max-width: 768px) { .header-inner { flex-wrap: wrap; } .header-cta { font-size: 0.68rem; } }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--header-text); padding: 28px 0; margin-top: 60px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-link { color: var(--header-text); opacity: 0.75; font-size: 0.85rem; text-decoration: none; }
.footer-link:hover { opacity: 1; }
.footer-copy { font-size: 0.8rem; opacity: 0.5; }

/* Blog listing */
.blog-wrap { padding: 40px 0; }
.articles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .articles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .articles-grid { grid-template-columns: 1fr; } }
.article-card { background: #fff; border-radius: 12px; padding: 24px; border: 1px solid #e8e8e8; transition: box-shadow .2s; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.article-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.article-card a { text-decoration: none; color: inherit; }
.article-card-thumb { display: block; margin: -24px -24px 18px; }
.article-card-thumb img { width: 100%; max-width: 100%; height: 180px; object-fit: cover; display: block; }
.article-date { font-size: 0.78rem; color: #9ca3af; margin-bottom: 8px; }
.article-title { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 10px; line-height: 1.3; }
.article-title a:hover { color: var(--accent); }
.article-excerpt { font-size: 0.9rem; color: #4b5563; margin-bottom: 14px; flex: 1; }
.read-more { font-size: 0.875rem; color: var(--accent); font-weight: 600; text-decoration: none; margin-top: auto; }
.read-more:hover { text-decoration: underline; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; text-decoration: none; font-size: 0.875rem; font-weight: 500; border: 1px solid #e8e8e8; color: #4b5563; background: #fff; }
.pagination a:hover { background: #f3f4f6; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Single article */
.single-wrap { padding: 40px 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; font-size: 0.875rem; font-weight: 500; margin-bottom: 28px; }
.back-link:hover { text-decoration: underline; }
.article-wrap { background: #fff; border-radius: 12px; border: 1px solid #e8e8e8; padding: 40px 48px; }
.article-wrap h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.25; color: #1a1a2e; margin-bottom: 12px; }
.article-cover { width: 100%; border-radius: 8px; margin: 20px 0; }
.article-body { font-size: 1.05rem; color: #374151; }
.article-body h2 { font-size: 1.45rem; font-weight: 700; color: #1a1a2e; margin: 28px 0 12px; }
.article-body h3 { font-size: 1.2rem; font-weight: 600; color: #1a1a2e; margin: 22px 0 10px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: #6b7280; font-style: italic; margin: 20px 0; }
.article-body img { max-width: 100%; border-radius: 8px; margin: 16px 0; }
@media (max-width: 640px) {
    .article-wrap { padding: 24px 16px; }
    .article-wrap h1 { font-size: 1.5rem; }
    .header-home span { display: none; }
}

/* ── FAQ block — принудительная светлая цветовая схема ───────────────── */
/* Переопределяем инлайн-стили от dark-mode генерации !important          */
.faq-container {
    background: #f5f5f5 !important;
    border: 1px solid #e5e5e5 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.06) !important;
}
.faq-container h2 {
    color: #111111 !important;
}
.faq-container details {
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
}
.faq-container summary {
    color: #111111 !important;
}
.faq-container div[itemprop="acceptedAnswer"],
.faq-container [itemprop="text"] {
    color: #444444 !important;
    border-top-color: #f0f0f0 !important;
}
.faq-container details::before {
    color: var(--accent) !important;
}
