/*
Theme Name: med-akademia.ru
Theme URI: https://med-akademia.ru/
Description: Тема сайта med-akademia.ru. При активации название сайта автоматически устанавливается равным домену. Чистый адаптивный шаблон без встроенного контента.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Author: med-akademia.ru
Text Domain: med-akademia-ru
License: GPL-2.0-or-later
*/

:root {
	--primary: #0e8a6a;
	--primary-d: #07513f;
	--accent: #ff8a4c;
	--bg: #f6faf8;
	--soft: #e3f4ee;
	--ink: #14261f;
	--muted: color-mix(in srgb, var(--ink) 60%, #fff);
	--line: color-mix(in srgb, var(--ink) 12%, #fff);
	--card: #fff;
	--r: 14px;
	--shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 28px rgba(15,23,42,.07);
	--f-head: "PT Sans", system-ui, sans-serif;
	--f-body: "PT Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.68 var(--f-body); }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--primary); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }

.btn { display: inline-block; background: var(--primary); color: #fff; text-decoration: none; padding: 11px 20px; border-radius: calc(var(--r) * .7); font: 600 16px var(--f-head); border: 0; cursor: pointer; }
.btn:hover { background: var(--primary-d); }

/* header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font: 800 21px var(--f-head); color: var(--primary-d); text-decoration: none; }
.brand__tag { font-size: 13px; color: var(--muted); }
.primary-nav .menu, .primary-nav .children, .primary-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.primary-nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font: 600 15px var(--f-head); }
.primary-nav a:hover, .current-menu-item > a { background: var(--soft); color: var(--primary-d); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 40px; align-items: center; justify-content: center; background: var(--soft); border: 0; border-radius: 10px; cursor: pointer; }
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); display: block; }

/* hero */
.hero { color: #fff; padding: 64px 0 72px; background: radial-gradient(900px 420px at 88% 10%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%), linear-gradient(135deg, var(--primary-d), var(--primary)); }
.hero__title { font: 800 clamp(28px, 5vw, 44px)/1.12 var(--f-head); margin: 0 0 14px; }
.hero__lead { font-size: 18px; max-width: 640px; margin: 0 0 22px; opacity: .95; }
.hero .btn { background: #fff; color: var(--primary-d); }
.hero .btn:hover { background: var(--soft); }

/* sections */
.section { padding: 48px 0; }
.section--alt { background: #fff; }
.section__title { font: 800 26px var(--f-head); margin: 0 0 24px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card__thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.card__body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.card__title { font: 700 19px/1.3 var(--f-head); margin: 0; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--primary); }
.card__excerpt { margin: 0; font-size: 15.5px; color: var(--muted); }
.card__more { margin-top: auto; font: 600 15px var(--f-head); text-decoration: none; }

/* layout */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 44px 0; align-items: start; }
.layout__main { min-width: 0; }
.page-title { font: 800 30px var(--f-head); margin: 0 0 20px; }
.entry__title { font: 800 clamp(26px, 4vw, 36px)/1.15 var(--f-head); margin: 0 0 10px; }
.entry__meta { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.entry__thumb { margin: 0 0 24px; }
.entry__thumb img { width: 100%; border-radius: var(--r); }

.prose { font-size: 17.5px; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font: 800 25px var(--f-head); margin: 1.7em 0 .5em; }
.prose h3 { font: 700 20px var(--f-head); margin: 1.4em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose img { border-radius: calc(var(--r) * .6); margin: 1.2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--soft); font-family: var(--f-head); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--primary); color: var(--muted); }

/* sidebar / widgets */
.layout__side { display: flex; flex-direction: column; gap: 22px; }
.widget { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.widget__title { font: 700 17px var(--f-head); margin: 0 0 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.widget a { text-decoration: none; }

.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }

/* pagination */
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination .current { display: inline-block; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* footer */
.site-footer { background: var(--primary-d); color: #fff; margin-top: 56px; padding: 40px 0 28px; }
.site-footer a { color: #fff; }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-bottom: 26px; }
.site-footer .widget { background: transparent; border: 0; padding: 0; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.2); padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-menu { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.footer-menu a { text-decoration: none; }

@media (max-width: 860px) {
	.layout { grid-template-columns: 1fr; }
	.nav-toggle { display: flex; }
	.primary-nav { display: none; position: absolute; left: 0; right: 0; top: 72px; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px; }
	.nav-open .primary-nav { display: block; }
	.primary-nav .menu, .primary-nav ul { flex-direction: column; }
}
