/* almatyzdrav.kz — тема записей kz-engine в дизайне статических страниц 2026 (цвета, шапка, крошки, колонка, подвал —
   из <style> страниц /outreach/…, сведено к итоговым значениям каскада). Ниже — оформление разметки ядра (ke-*). */
:root {
    --color-primary: #2c7be5;
    --color-primary-dark: #1a5bb5;
    --color-secondary: #454e5c;
    --color-bg: #eaeaea;
    --color-bg-light: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #dddddd;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.skip-nav { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; z-index: 9999; padding: 8px 16px; background: #2c7be5; color: #fff; font-size: 14px; }
.skip-nav:focus { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); width: auto; height: auto; overflow: visible; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* Шапка */
.header { background: #2d3748; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; }
.header .logo { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; color: #ffffff; text-decoration: none; }
.header .logo:hover { color: #ffffff; text-decoration: none; opacity: 0.9; }
.header .logo-icon { width: 42px; height: 42px; background: linear-gradient(135deg, #3182ce 0%, #38a169 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #ffffff; font-size: 20px; flex-shrink: 0; }
.header .nav-main { display: flex; align-items: center; gap: 5px; }
.header .nav-main a { padding: 8px 14px; color: #ffffff; font-weight: 500; border-radius: 6px; transition: background 0.2s; text-decoration: none; }
.header .nav-main a:hover, .header .nav-main a[aria-current] { background: rgba(255,255,255,0.15); color: #ffffff; text-decoration: none; }

/* Крошки */
.breadcrumbs { background-color: var(--color-bg-light); padding: 12px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.breadcrumbs a { color: var(--color-text-light); }
.breadcrumbs span { color: var(--color-text-light); margin: 0 8px; }
.breadcrumbs span.current { color: var(--color-text); font-weight: 600; margin: 0; }

/* Колонки */
.main-wrapper { display: flex; gap: 30px; padding: 30px 0; }
.sidebar { width: 280px; flex-shrink: 0; }
.content { flex: 1; min-width: 0; }

/* Боковая колонка */
.sidebar-search { display: flex; margin-bottom: 20px; background: var(--color-bg-light); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.sidebar-search input { flex: 1; min-width: 0; padding: 12px 15px; border: 0; font: inherit; outline: none; }
.sidebar-search button { padding: 0 16px; border: 0; background: var(--color-primary); color: #ffffff; cursor: pointer; font-size: 16px; }
.sidebar-search button:hover { background: var(--color-primary-dark); }
.sidebar-menu { background-color: var(--color-bg-light); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 20px; }
.sidebar-menu h3 { background-color: var(--color-secondary); color: #ffffff; padding: 15px 20px; font-size: 16px; font-weight: 600; }
.sidebar-menu ul { list-style: none; }
.sidebar-menu li { border-bottom: 1px solid var(--color-border); }
.sidebar-menu li:last-child { border-bottom: none; }
.sidebar-menu a { display: block; padding: 12px 20px; color: var(--color-text); transition: all 0.2s; }
.sidebar-menu a:hover, .sidebar-menu a.active { background-color: var(--color-primary); color: #ffffff; text-decoration: none; }
.sidebar-ad { padding: 15px; background: #f8f9fa; border-radius: 8px; position: sticky; top: 80px; min-height: 250px; }

/* Карточка содержимого */
.content-box, article.ke-entry, .ke-front, .ke-term-head, .ke-featured-list, .ke-block, .ke-list, .ke-related, .ke-adjacent, .ke-pager, .content > h1, .content > p {
    background-color: var(--color-bg-light); border-radius: 8px; padding: 25px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.page-title, .content h1 { font-size: 28px; font-weight: 700; line-height: 1.3; margin-bottom: 20px; color: var(--color-secondary); }
.content > h1 { margin-bottom: 20px; }
.ke-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Запись */
.ke-entry-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -8px 0 20px; font-size: 14px; color: var(--color-text-light); }
.ke-entry-meta a { color: var(--color-text-light); }
.ke-featured { display: block; max-width: 100%; height: auto; border-radius: 8px; margin-bottom: 20px; }
.ke-content { overflow-wrap: break-word; }
.ke-content > * + * { margin-top: 1em; }
.ke-content h2 { font-size: 22px; line-height: 1.3; margin-top: 1.6em; color: var(--color-secondary); }
.ke-content h3 { font-size: 19px; line-height: 1.35; margin-top: 1.4em; color: var(--color-secondary); }
.ke-content h4 { font-size: 17px; margin-top: 1.2em; }
.ke-content ul, .ke-content ol { padding-left: 1.5em; }
.ke-content li + li { margin-top: 0.35em; }
.ke-content img { max-width: 100%; height: auto; border-radius: 6px; }
.ke-content figure { margin-left: 0; margin-right: 0; }
.ke-content figcaption, .ke-content .wp-caption-text { font-size: 14px; color: var(--color-text-light); margin-top: 6px; }
.ke-content .wp-caption { max-width: 100%; }
.ke-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.ke-content .alignleft { float: left; margin: 0 20px 10px 0; }
.ke-content .alignright { float: right; margin: 0 0 10px 20px; }
.ke-content::after { content: ""; display: table; clear: both; }
.ke-content blockquote { border-left: 4px solid var(--color-primary); padding: 10px 20px; background: #f8f9fa; border-radius: 0 8px 8px 0; }
.ke-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.ke-content th, .ke-content td { padding: 10px 12px; border: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.ke-content th { background: var(--color-secondary); color: #ffffff; font-weight: 600; }
.ke-content iframe { max-width: 100%; }
.ke-tags { margin-top: 25px; display: flex; flex-wrap: wrap; gap: 8px; }
.ke-tags a { padding: 4px 12px; background: #f0f4fa; border-radius: 14px; font-size: 14px; }
.ke-children { margin-top: 20px; padding-left: 1.5em; }
.ke-adjacent { display: flex; justify-content: space-between; gap: 20px; font-size: 15px; }
.ke-adjacent a[rel="next"] { text-align: right; margin-left: auto; }
.ke-related h2 { font-size: 20px; margin-bottom: 15px; color: var(--color-secondary); border-bottom: 2px solid var(--color-primary); padding-bottom: 10px; }

/* /blog/: рубрики */
.hub-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 20px; }
.hub-grid a { display: block; padding: 14px 16px; background: #f8f9fa; border-left: 4px solid var(--color-primary); border-radius: 8px; color: var(--color-text); font-weight: 500; }
.hub-grid a:hover { background: var(--color-primary); color: #ffffff; text-decoration: none; }
.hub-grid i { color: var(--color-primary); margin-right: 6px; }
.hub-grid a:hover i { color: #ffffff; }

/* Рубрика, поиск, списки */
.ke-term-head h1 { margin-bottom: 0; }
.ke-term-desc { margin-top: 12px; }
.ke-term-children { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.ke-term-children a, .ke-suggest a { padding: 4px 12px; background: #f0f4fa; border-radius: 14px; font-size: 14px; }
.ke-list { display: grid; gap: 0; padding-top: 10px; padding-bottom: 10px; }
.ke-card { display: grid; grid-template-columns: 200px 1fr; grid-template-areas: "img title" "img meta" "img text"; column-gap: 20px; align-content: start; padding: 15px 0; border-bottom: 1px solid #eee; }
.ke-card:last-child { border-bottom: 0; }
.ke-card > a:first-child { grid-area: img; }
.ke-card img { display: block; width: 100%; height: auto; border-radius: 8px; }
.ke-card h3 { grid-area: title; font-size: 18px; line-height: 1.35; }
.ke-card h3 a { color: var(--color-secondary); }
.ke-card h3 a:hover { color: var(--color-primary); }
.ke-card .ke-term, .ke-card time { grid-area: meta; font-size: 13px; color: var(--color-text-light); margin-top: 6px; }
.ke-card .ke-term { justify-self: start; }
.ke-card time { justify-self: end; }
.ke-card p { grid-area: text; font-size: 15px; color: var(--color-text-light); margin-top: 8px; }
.ke-related .ke-card { grid-template-columns: 120px 1fr; }
.ke-card:not(:has(img)) { grid-template-columns: 1fr; grid-template-areas: "title" "meta" "text"; }
.ke-pager { display: flex; flex-wrap: wrap; gap: 6px; padding: 15px 25px; }
.ke-pager a, .ke-pager .current { min-width: 38px; padding: 6px 10px; text-align: center; border-radius: 6px; border: 1px solid var(--color-border); }
.ke-pager .current { background: var(--color-primary); border-color: var(--color-primary); color: #ffffff; font-weight: 600; }
.ke-pager a:hover { background: #f0f4fa; text-decoration: none; }

/* Подвал */
.footer { background: #1a202c; color: #ffffff; padding: 50px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { padding-right: 20px; }
.footer-logo { font-size: 20px; font-weight: 700; color: #ffffff; display: block; margin-bottom: 15px; }
.footer-logo:hover { color: #ffffff; text-decoration: none; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.7); line-height: 1.7; }
.footer-column { min-width: 0; }
.footer-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; color: #ffffff; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 14px; transition: all 0.2s; }
.footer-links a:hover { color: #ffffff; padding-left: 5px; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; font-size: 14px; color: rgba(255,255,255,0.6); }

@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header .nav-main { display: none; }
    .header .logo span { font-size: 16px; }
    .main-wrapper { flex-direction: column; padding: 20px 0; }
    .sidebar { width: 100%; order: 2; }
    .content { order: 1; }
    .sidebar-ad { display: none; }
    .content-box, article.ke-entry, .ke-front, .ke-term-head, .ke-featured-list, .ke-block, .ke-list, .ke-related, .ke-adjacent, .ke-pager, .content > h1, .content > p { padding: 18px; }
    .page-title, .content h1 { font-size: 24px; }
    .ke-card { grid-template-columns: 110px 1fr; grid-template-areas: "img title" "img meta" "text text"; }
    .ke-content .alignleft, .ke-content .alignright { float: none; margin: 0 0 10px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand { padding-right: 0; }
}
