/*
Theme Name: Health Marginalia
Theme URI: https://example.com
Author: Angelina
Author URI: https://example.com
Description: Тема для бизнес-блога: чистая светлая шапка с оранжевым акцентом, без баннера-героя — сразу сетка «Latest publications» (2 колонки) со ссылкой «Все публикации», компактный сайдбар (поиск, популярные статьи, язык), страница «About» с развёрнутой биографией автора, светлый футер с соцсетями. Шрифт Times New Roman.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: healthmarginalia
*/

/* ==========================================================================
   Variables
   ========================================================================== */
:root{
	--c-bg:#ffffff;
	--c-ink:#1c1c1c;
	--c-ink-soft:#5c5c5c;
	--c-line:#e6e6e6;
	--c-line-soft:#f4f4f2;
	--c-orange:#e8720d;
	--c-orange-dark:#c25e08;
	--c-footer-bg:#f7f7f5;
	--maxw:1200px;
	--font:'Times New Roman', Times, Georgia, serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box;}
html{height:100%;}
body{
	margin:0;
	min-height:100%;
	display:flex;
	flex-direction:column;
	font-family:var(--font);
	color:var(--c-ink);
	background:var(--c-bg);
	line-height:1.6;
	font-size:18px;
}
#main-content{flex:1 0 auto;}
.site-footer{flex-shrink:0;}
img{max-width:100%;height:auto;display:block;}
a{color:var(--c-orange);text-decoration:none;}
a:hover{text-decoration:underline;}
ul{list-style:none;margin:0;padding:0;}
button{font-family:inherit;cursor:pointer;}
input,textarea{font-family:inherit;font-size:15px;}
h1,h2,h3,h4{font-family:var(--font);font-weight:700;line-height:1.25;margin:0 0 .5em;color:var(--c-ink);}
p{margin:0 0 1em;}
.container{max-width:var(--maxw);margin:0 auto;padding:0 24px;}
.screen-reader-text{position:absolute;left:-9999px;}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{border-bottom:1px solid var(--c-line);}
.header-inner{display:flex;align-items:center;gap:32px;padding:20px 24px;max-width:var(--maxw);margin:0 auto;}
.brand{flex:0 0 auto;display:flex;align-items:center;}
.brand .brand-mark{height:52px;width:auto;flex-shrink:0;}
.brand img.custom-logo{max-height:52px;width:auto;display:block;}

.primary-nav{flex:1;}
.primary-nav ul{display:flex;gap:34px;flex-wrap:wrap;justify-content:center;}
.primary-nav a{font-size:17px;color:var(--c-ink);padding-bottom:6px;border-bottom:2px solid transparent;}
.primary-nav a:hover,.primary-nav .current-menu-item a{color:var(--c-orange);border-bottom-color:var(--c-orange);text-decoration:none;}

.header-search-toggle{background:none;border:none;color:var(--c-ink);display:flex;padding:4px;flex:0 0 auto;}
.header-search-toggle svg{width:20px;height:20px;}
.header-search-toggle:hover{color:var(--c-orange);}

.menu-toggle{display:none;background:none;border:none;font-size:22px;color:var(--c-ink);}

.header-search-panel{background:var(--c-line-soft);max-height:0;overflow:hidden;transition:max-height .2s ease;}
.header-search-panel.is-open{max-height:76px;}
.header-search-panel .container{padding-top:16px;padding-bottom:16px;}
.header-search-panel form{display:flex;gap:8px;max-width:480px;}
.header-search-panel input[type="search"]{flex:1;padding:10px 14px;border:1px solid var(--c-line);border-radius:6px;font-family:var(--font);font-size:15px;}
.header-search-panel button{padding:10px 20px;border:1px solid var(--c-orange);background:var(--c-orange);color:#fff;border-radius:6px;font-family:var(--font);font-size:15px;}

@media (max-width:820px){
	.menu-toggle{display:block;order:3;}
	.primary-nav{display:none;order:5;flex:1 0 100%;}
	.primary-nav.is-open{display:block;}
	.primary-nav ul{flex-direction:column;gap:10px;padding:14px 0;justify-content:flex-start;}
	.header-inner{flex-wrap:wrap;}
}

/* ==========================================================================
   Layout: content + sidebar
   ========================================================================== */
.page-wrap{padding:44px 0 0;}
.layout-grid{display:grid;grid-template-columns:1fr 300px;gap:44px;align-items:start;}
@media (max-width:900px){.layout-grid{grid-template-columns:1fr;}}
.col-sidebar{position:sticky;top:24px;align-self:start;display:flex;flex-direction:column;gap:22px;}

/* ==========================================================================
   Latest publications
   ========================================================================== */
.section-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:26px;gap:16px;}
.section-head h1,.section-head h2{font-size:28px;margin-bottom:0;position:relative;padding-bottom:12px;}
.section-head h1::after,.section-head h2::after{content:"";position:absolute;left:0;bottom:0;width:46px;height:3px;background:var(--c-orange);}
.section-head a{font-size:15px;font-weight:700;white-space:nowrap;color:var(--c-orange);}
.section-head a:hover{color:var(--c-orange-dark);}

.cards-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-bottom:20px;}
@media (max-width:640px){.cards-grid{grid-template-columns:1fr;}}
.post-card{border:1px solid var(--c-line);border-radius:10px;overflow:hidden;background:#fff;}
.post-card-media{overflow:hidden;background:var(--c-line-soft);}
.post-card-media img{width:100%;height:190px;object-fit:cover;}
.post-card-body{padding:20px 22px 24px;}
.cat-pill{display:inline-block;background:var(--c-line-soft);color:var(--c-orange-dark);font-size:13px;font-weight:700;padding:5px 13px;border-radius:999px;margin-bottom:12px;border:1px solid var(--c-line);}
.post-card h3{font-size:20px;margin-bottom:8px;}
.post-card h3 a{color:var(--c-ink);}
.post-card p{color:var(--c-ink-soft);font-size:15px;}
.post-meta{font-size:14px;color:var(--c-ink-soft);margin-bottom:8px;}

.empty-state{grid-column:1/-1;text-align:center;padding:56px 20px;border:1px dashed var(--c-line);border-radius:10px;}
.empty-state svg{width:52px;height:52px;color:var(--c-line);margin:0 auto 18px;}
.empty-state p{color:var(--c-ink-soft);margin-bottom:4px;}
.empty-state p:first-of-type{color:var(--c-ink);font-weight:700;font-size:17px;}

.pagination{display:flex;gap:10px;padding:10px 0 44px;}
.pagination a,.pagination span{padding:7px 12px;border:1px solid var(--c-line);border-radius:6px;font-size:15px;}
.pagination .current{background:var(--c-orange);color:#fff;border-color:var(--c-orange);}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar-box{border:1px solid var(--c-line);border-radius:10px;padding:20px 22px;}
.sidebar-box h3{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:var(--c-ink-soft);margin-bottom:16px;}

.sidebar-search{display:flex;align-items:center;gap:8px;border:1px solid var(--c-line);border-radius:8px;padding:11px 14px;}
.sidebar-search svg{width:16px;height:16px;flex-shrink:0;color:var(--c-ink-soft);}
.sidebar-search input[type="search"]{flex:1;border:none;font-family:var(--font);font-size:15px;background:transparent;}
.sidebar-search input[type="search"]:focus{outline:none;}
.sidebar-search button{display:none;}

.popular-item{display:flex;gap:12px;margin-bottom:16px;}
.popular-item:last-child{margin-bottom:0;}
.popular-item-thumb{width:56px;height:56px;flex-shrink:0;overflow:hidden;border-radius:8px;background:var(--c-line-soft);}
.popular-item-thumb img{width:100%;height:100%;object-fit:cover;}
.popular-item h4{font-size:15px;margin:0 0 4px;line-height:1.3;}
.popular-item h4 a{color:var(--c-ink);}
.popular-item .post-meta{margin:0;font-size:13px;}
.sidebar-empty{font-size:14px;color:var(--c-ink-soft);}

.lang-item ul,
.lang-item li{
	list-style:none !important; list-style-type:none !important;
	margin:0 !important; padding:0 !important; float:none !important; position:static !important;
}
.lang-item ul{display:flex; gap:14px;}
.lang-item a{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--c-ink);}
.lang-item a:hover{color:var(--c-orange);text-decoration:underline;}
.lang-item img{width:16px;height:auto;flex-shrink:0;}

/* ==========================================================================
   Static pages / breadcrumbs
   ========================================================================== */
.breadcrumbs{padding:16px 0 0;font-size:14px;color:var(--c-ink-soft);}
.breadcrumbs a{color:var(--c-orange);}
.page-hero h1{font-size:32px;margin-bottom:22px;}
.page-content p{color:var(--c-ink-soft);font-size:17px;}

.contact-form{max-width:560px;margin-top:6px;}
.form-row{margin-bottom:18px;}
.form-row label{display:block;font-weight:700;font-size:15px;margin-bottom:6px;}
.form-row input,.form-row textarea{width:100%;border:1px solid var(--c-line);padding:10px 12px;border-radius:6px;font-family:var(--font);font-size:16px;color:var(--c-ink);}
.form-row textarea{min-height:130px;resize:vertical;}
.form-row input:focus,.form-row textarea:focus{outline:1px solid var(--c-orange);}
.btn-submit{background:var(--c-orange);color:#fff;border:none;padding:12px 28px;border-radius:6px;font-family:var(--font);font-size:16px;}
.btn-submit:hover{background:var(--c-orange-dark);}
.form-notice{padding:10px 14px;margin-bottom:18px;font-size:15px;border-radius:6px;border:1px solid var(--c-line);}
.form-notice.success{background:#eaf7ee;}
.form-notice.error{background:#fbeaea;}

/* ==========================================================================
   About page / author
   ========================================================================== */
.author-box{display:flex;gap:22px;align-items:flex-start;border:1px solid var(--c-line);border-radius:10px;padding:26px;margin-top:26px;}
.author-box img{width:110px;height:110px;border-radius:50%;object-fit:cover;flex-shrink:0;}
.author-box .author-name{font-weight:700;font-size:19px;margin-bottom:8px;}
.author-box p{color:var(--c-ink-soft);}
@media (max-width:560px){.author-box{flex-direction:column;align-items:center;text-align:center;}}

/* ==========================================================================
   Single post
   ========================================================================== */
.single-post-wrap h1{font-size:30px;}
.single-post-wrap .post-thumb{margin-bottom:22px;border-radius:10px;overflow:hidden;}
.entry-content{font-size:18px;}
.entry-content p{margin-bottom:1.2em;}
.entry-content img{margin:1.3em 0;border-radius:8px;}
.entry-content h2{font-size:24px;}
.entry-content h3{font-size:20px;}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{background:var(--c-footer-bg);border-top:1px solid var(--c-line);margin-top:44px;}
.footer-inner{padding:30px 0;display:flex;flex-wrap:wrap;justify-content:space-between;gap:22px;align-items:center;}
.footer-brand img{height:38px;width:auto;}
.footer-nav ul{display:flex;gap:22px;flex-wrap:wrap;}
.footer-nav a{color:var(--c-ink-soft);font-size:15px;}
.footer-nav a:hover{color:var(--c-orange);}
.footer-social{display:flex;gap:14px;align-items:center;}
.footer-social a{color:var(--c-ink-soft);display:flex;}
.footer-social a:hover{color:var(--c-orange);}
.footer-social svg{width:18px;height:18px;}
.footer-bottom{border-top:1px solid var(--c-line);padding:14px 0;font-size:13px;color:var(--c-ink-soft);display:flex;justify-content:flex-end;}
@media (max-width:700px){.footer-bottom{justify-content:flex-start;}}

.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);}
