/*
Theme Name: dds_zakznaet.ru
Description: Познавательная тема для школьного портала «Зак знает» — дизайн «Лаборатория на столе».
Author: Захар Князев
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: zakznaet
*/

/* =========================================================================
   1. Переменные и база
   ========================================================================= */

:root {
    --paper: #F0F4F8;
    --paper-alt: #E8EDF2;
    --head-bg: #FFFFFF;
    --foot-bg: #1A202C;
    --ink: #1E293B;
    --accent: #00B4D8;
    --accent-dark: #0096B8;
    --amber: #F59E0B;
    --muted: #6B7A8F;
    --line: rgba(107, 122, 143, 0.35);
    --shadow-hard: 4px 4px 0 rgba(26, 32, 44, 0.15);
    --shadow-hard-deep: 8px 8px 0 rgba(26, 32, 44, 0.15);
    --font-head: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
    --font-body: "Public Sans", "Roboto", "Segoe UI", system-ui, sans-serif;
    --font-hand: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
    --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='5' viewBox='0 0 12 5'%3E%3Cpath d='M0 3.5 Q3 0.5 6 3.5 T12 3.5' stroke='%23F59E0B' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--paper);
    background-image: radial-gradient(rgba(30, 41, 59, 0.09) 1px, transparent 1px);
    background-size: 26px 26px;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    right: -120px;
    bottom: -140px;
    width: 620px;
    height: 620px;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 40% 40%, rgba(0, 180, 216, 0.05), rgba(0, 180, 216, 0) 68%);
}

body::after {
    content: "";
    position: fixed;
    left: -60px;
    top: 40px;
    width: 460px;
    height: 460px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='460' height='460' viewBox='0 0 460 460'%3E%3Cg fill='none' stroke='%23F59E0B' stroke-width='6' opacity='0.06'%3E%3Ccircle cx='120' cy='90' r='58'/%3E%3Ccircle cx='300' cy='210' r='34'/%3E%3Cpath d='M60 320 L130 200 L200 320 Z'/%3E%3Cpath d='M250 60 L300 130 L200 130 Z'/%3E%3Crect x='320' y='330' width='70' height='70'/%3E%3C/g%3E%3C/svg%3E");
}

.site-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
}

/* =========================================================================
   2. Типографика
   ========================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.7em;
}

h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-left: 6%;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.35rem;
    font-weight: 400;
}

h4 {
    font-size: 1.12rem;
    font-weight: 600;
}

p {
    margin: 0 0 1.15em;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
    background-image: var(--wave);
    background-repeat: repeat-x;
    background-position: 0 100%;
    background-size: 0 5px;
    transition: background-size 0.35s ease, color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--accent-dark);
    background-size: 100% 5px;
}

ul, ol {
    padding-left: 1.3em;
}

blockquote {
    margin: 1.8em 0;
    padding: 1.4rem 1.6rem;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(240, 244, 248, 0.6));
    border-top: 2px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    border-right: 0;
    font-size: 1.06rem;
}

blockquote p:last-child {
    margin-bottom: 0;
}

code, pre {
    font-family: "Consolas", "Menlo", monospace;
    background: var(--paper-alt);
}

pre {
    padding: 1rem 1.2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    background: #fff;
    border: 1px solid var(--ink);
}

th, td {
    border: 1px solid var(--muted);
    padding: 0.6rem 0.8rem;
    text-align: left;
}

th {
    background: var(--paper-alt);
    font-family: var(--font-head);
    font-weight: 700;
}

/* Заголовок секции: янтарная черта слева + пунктир снизу */
.sec-title {
    position: relative;
    display: inline-block;
    padding: 0 0 10px 16px;
    border-bottom: 2px dashed rgba(107, 122, 143, 0.5);
    margin-bottom: 1.4rem;
}

.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.16em;
    bottom: 0.42em;
    width: 3px;
    background: var(--amber);
}

/* Рукописная пометка «Уголок Захара» */
.zak-note {
    font-family: var(--font-hand);
    font-size: 1.12rem;
    color: var(--amber);
    transform: rotate(-3deg);
    display: inline-block;
}

/* Разделитель из трёх квадратов */
.sq-divider {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0 0 2.2rem;
}

.sq-divider span {
    width: 9px;
    height: 9px;
    border: 2px solid var(--amber);
}

/* =========================================================================
   3. Кнопки
   ========================================================================= */

.btn {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    padding: 0.75rem 1.6rem;
    border-radius: 4px;
    border: 2px solid var(--accent);
    background-color: var(--accent);
    background-image: none;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.btn:hover,
.btn:focus {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-dark);
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: transparent;
    color: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 4px 12px rgba(26, 32, 44, 0.16);
}

.btn-light {
    border-color: #fff;
    background-color: #fff;
    color: var(--ink);
}

.btn-light:hover,
.btn-light:focus {
    background-color: var(--amber);
    border-color: var(--amber);
    color: var(--ink);
}

/* =========================================================================
   4. Шапка
   ========================================================================= */

.site-head {
    background: var(--head-bg);
    border-bottom: 2px solid var(--accent);
}

.head-inner {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 320px;
}

.brand-logo,
.brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
}

.brand-logo {
    width: auto;
    max-height: 62px;
}

.brand-text {
    min-width: 0;
}

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.06rem;
    line-height: 1.35;
    color: var(--ink);
    background-image: none;
    max-width: 46ch;
}

.brand-name:hover {
    color: var(--accent-dark);
}

.brand-desc {
    display: block;
    font-size: 0.83rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 62ch;
    margin-top: 0.2rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-head);
    font-weight: 700;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent-dark);
    border-radius: 4px;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--ink);
    padding-bottom: 2px;
}

.main-nav a:hover {
    color: var(--accent-dark);
}

.main-nav .current-menu-item > a {
    color: var(--accent-dark);
    border-bottom: 2px solid var(--amber);
}

/* =========================================================================
   5. Раскладки контента
   ========================================================================= */

.site-main {
    flex: 1 0 auto;
    padding: 2.6rem 0 3.4rem;
}

.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    gap: 6%;
    align-items: start;
}

.content-area {
    min-width: 0;
}

.crumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.crumbs a {
    color: var(--muted);
}

.crumbs a:hover {
    color: var(--accent-dark);
}

.crumbs-sep {
    color: var(--amber);
    margin: 0 0.15rem;
}

.page-head {
    margin-bottom: 2rem;
}

.page-head h1 {
    margin-left: 5%;
}

.page-lead {
    color: var(--muted);
    margin-left: 5%;
    max-width: 70ch;
}

/* =========================================================================
   6. Карточки записей
   ========================================================================= */

.card-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-bottom: 2.6rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0;
    box-shadow: var(--shadow-hard);
    transition: box-shadow 0.25s ease;
}

.card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 0.25s ease;
    z-index: 3;
}

.card::after {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 0;
    height: 1px;
    background: var(--line);
}

.card:hover {
    box-shadow: var(--shadow-hard-deep);
}

.card:hover::before {
    transform: scaleY(1);
}

.card-row {
    flex-direction: row;
    overflow: hidden;
}

.card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
    background: var(--paper-alt);
}

.card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: none;
}

.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.card:hover .card-thumb-wrap img {
    transform: scale(1.06);
}

.card-body {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.6rem 1.7rem;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.card-title a {
    color: var(--ink);
}

.card-title a:hover {
    color: var(--accent-dark);
}

.card-meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
}

.card-meta a {
    color: var(--muted);
}

.card-meta .meta-cat::before {
    content: "•";
    color: var(--amber);
    margin: 0 0.4rem;
}

.card-excerpt {
    color: #46566b;
    font-size: 0.97rem;
    margin-bottom: 1.1rem;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-dark);
}

/* Избранная карточка — миниатюра сверху со срезом */
.card-featured .card-thumb-top {
    display: block;
    position: relative;
    overflow: hidden;
    background-image: none;
    background-color: var(--paper-alt);
}

.card-featured .card-thumb-top img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.35s ease;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 22px));
}

.card-featured:hover .card-thumb-top img {
    transform: scale(1.05);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

/* =========================================================================
   7. Пагинация
   ========================================================================= */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2.4rem 0 0.6rem;
}

.pager .page-numbers {
    display: inline-block;
    min-width: 42px;
    text-align: center;
    padding: 0.5rem 0.8rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--ink);
    background: #fff;
    background-image: none;
    border: 1px solid var(--line);
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pager a.page-numbers:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pager .page-numbers.dots {
    border: 0;
    background: transparent;
    color: var(--muted);
}

/* =========================================================================
   8. Сайдбар и виджеты
   ========================================================================= */

.sidebar {
    min-width: 0;
    position: relative;
    padding: 1.6rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: var(--shadow-hard);
}

.sidebar .widget {
    margin-bottom: 1.9rem;
    color: var(--ink);
}

.sidebar .widget:last-child {
    margin-bottom: 0;
}

.sidebar .widget-title {
    position: relative;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ink);
    padding: 0 0 8px 14px;
    margin-bottom: 1rem;
    border-bottom: 2px dashed rgba(107, 122, 143, 0.45);
}

.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.18em;
    bottom: 0.4em;
    width: 3px;
    background: var(--amber);
}

.sidebar .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar .widget li {
    padding: 0.45rem 0 0.45rem 16px;
    position: relative;
    border-bottom: 1px solid rgba(107, 122, 143, 0.2);
}

.sidebar .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05em;
    width: 7px;
    height: 7px;
    border: 2px solid var(--accent);
}

.sidebar .widget a {
    color: var(--ink);
    font-size: 0.96rem;
}

.sidebar .widget a:hover {
    color: var(--accent-dark);
}

.sidebar .widget .post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
}

.sidebar .widget p {
    color: #46566b;
    font-size: 0.95rem;
}

/* =========================================================================
   9. Одиночная запись и страница
   ========================================================================= */

.entry {
    background: #fff;
    padding: 2.2rem 2.2rem 2.4rem;
    box-shadow: var(--shadow-hard);
}

.entry-title {
    font-size: 2.3rem;
    margin-left: 0;
    margin-bottom: 0.6rem;
}

.entry-meta {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed rgba(107, 122, 143, 0.4);
}

.entry-meta a {
    color: var(--muted);
}

.entry-thumb {
    margin: 0 0 1.6rem;
}

.entry-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.entry-content img {
    display: block;
    height: auto;
}

.entry-content h2 {
    font-size: 1.7rem;
    margin-top: 1.6em;
}

.entry-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 1.4em;
}

.entry-content ul li,
.entry-content ol li {
    margin-bottom: 0.4em;
}

.entry-aside {
    margin-top: 2rem;
    padding: 1.2rem 1.4rem;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(255, 255, 255, 0.4));
    border-top: 2px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    border-right: 0;
}

.entry-aside p {
    margin: 0;
}

.entry-tags {
    margin-top: 1.6rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.post-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.8rem;
    font-family: var(--font-head);
    font-size: 0.92rem;
    font-weight: 600;
}

/* =========================================================================
   10. Комментарии
   ========================================================================= */

.comments-block {
    margin-top: 2.2rem;
    background: #fff;
    padding: 1.8rem 2rem 2rem;
    box-shadow: var(--shadow-hard);
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.comment-list {
    list-style: none;
    margin: 0 0 1.8rem;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 1.6rem;
}

.comment-item {
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
    background: var(--paper);
    border-left: 3px solid var(--accent);
}

.comment-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: baseline;
    margin-bottom: 0.4rem;
}

.comment-author {
    font-family: var(--font-head);
    font-weight: 700;
}

.comment-date,
.comment-hold {
    font-size: 0.82rem;
    color: var(--muted);
}

.comment-actions {
    font-size: 0.86rem;
    font-family: var(--font-head);
    font-weight: 600;
}

.comment-form label {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    font-family: var(--font-body);
    font-size: 0.96rem;
    color: var(--ink);
}

.comment-form textarea {
    min-height: 150px;
}

.comment-form .form-submit input[type="submit"] {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 700;
    padding: 0.75rem 1.6rem;
    border-radius: 4px;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.comment-form .form-submit input[type="submit"]:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
}

/* =========================================================================
   11. Форма поиска и 404
   ========================================================================= */

.search-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.search-form .search-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 0.96rem;
    color: var(--ink);
}

.search-form .search-submit {
    font-family: var(--font-head);
    font-weight: 700;
    padding: 0.7rem 1.3rem;
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

.search-form .search-submit:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.error-box {
    background: #fff;
    padding: 2.4rem 2.2rem;
    box-shadow: var(--shadow-hard);
}

.error-code {
    font-family: var(--font-head);
    font-size: 4.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    margin: 0 0 0.6rem;
}

.error-box .search-form {
    margin: 1.4rem 0 1.6rem;
    max-width: 460px;
}

/* =========================================================================
   12. Главная страница
   ========================================================================= */

.front-section {
    padding: 7.5rem 0;
    position: relative;
}

.front-section.alt-bg {
    background: var(--paper-alt);
}

.front-section .shell-narrow {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.hatch-mark {
    position: absolute;
    left: 0;
    top: 0;
    width: 30%;
    height: 100%;
    pointer-events: none;
    opacity: 0.5;
    background-image: repeating-linear-gradient(45deg, rgba(107, 122, 143, 0.13) 0 1px, transparent 1px 14px);
}

/* --- Блок 1: hero-баннер --- */
.fs-hero {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #0f1b26;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 2;
    padding: 5rem 0 5.6rem;
}

.hero-plate {
    max-width: 640px;
    padding: 2.4rem 2.4rem 2.6rem;
    background: rgba(15, 27, 38, 0.72);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    border-top: 2px solid rgba(0, 180, 216, 0.8);
    border-left: 4px solid var(--accent);
    border-bottom: 2px solid rgba(0, 180, 216, 0.8);
    border-right: 0;
    text-align: left;
}

.hero-plate h1 {
    color: #fff;
    margin-left: 0;
    font-size: 3.2rem;
    margin-bottom: 0.5rem;
}

.hero-plate h1 .light {
    font-weight: 300;
}

.hero-sub {
    color: #D6E2EC;
    font-size: 1.05rem;
    margin-bottom: 1.6rem;
    max-width: 52ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hero-note {
    position: absolute;
    right: 6%;
    bottom: 2rem;
    z-index: 3;
    font-family: var(--font-hand);
    font-size: 1.5rem;
    color: var(--amber);
    transform: rotate(-6deg);
}

/* --- Блок 2: пошаговая лестница --- */
.steps-ladder {
    position: relative;
    margin-top: 2.4rem;
    padding-left: 74px;
}

.steps-ladder::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--accent);
}

.step-item {
    position: relative;
    margin-bottom: 2.2rem;
    min-width: 0;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-num {
    position: absolute;
    left: -74px;
    top: -6px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--amber);
    background: var(--paper);
    border: 2px dashed var(--amber);
    border-radius: 50%;
}

.step-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.step-item p {
    margin: 0;
    color: #46566b;
    max-width: 74ch;
}

/* --- Блок «последние записи» --- */
.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

/* --- Блок 3: зигзаг --- */
.zig-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
    margin-bottom: 3.4rem;
}

.zig-row:last-child {
    margin-bottom: 0;
}

.zig-row.reverse .zig-media {
    order: 2;
}

.zig-media {
    min-width: 0;
}

.zig-media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 10px solid #fff;
    box-shadow: 10px 10px 0 rgba(26, 32, 44, 0.15);
}

.zig-text {
    min-width: 0;
}

.zig-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.zig-text p {
    color: #46566b;
}

/* --- Блок 4: статистика --- */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 2rem;
}

.fact-item {
    min-width: 0;
    padding: 1.4rem 1.2rem;
    background: rgba(255, 255, 255, 0.65);
    border-top: 2px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    border-right: 0;
    text-align: left;
}

.fact-num {
    display: block;
    font-family: var(--font-head);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.fact-label {
    display: block;
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.95rem;
}

/* =========================================================================
   13. Подвал
   ========================================================================= */

.site-foot {
    flex: 0 0 auto;
    background: var(--foot-bg);
    color: #C7D2DE;
    padding: 3rem 0 1.6rem;
    border-top: 4px solid var(--accent);
}

.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}

.foot-col {
    min-width: 0;
}

.site-foot .widget {
    color: #C7D2DE;
    font-size: 0.95rem;
}

.site-foot .widget p {
    color: #C7D2DE;
}

.site-foot .widget-title {
    position: relative;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0 0 8px 14px;
    margin-bottom: 1rem;
    border-bottom: 2px dashed rgba(199, 210, 222, 0.35);
}

.site-foot .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.18em;
    bottom: 0.4em;
    width: 3px;
    background: var(--amber);
}

.site-foot .widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-foot .widget li {
    position: relative;
    padding: 0.4rem 0 0.4rem 16px;
}

.site-foot .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1em;
    width: 7px;
    height: 7px;
    border: 2px solid var(--accent);
}

.site-foot .widget a {
    color: #E2E9F0;
}

.site-foot .widget a:hover {
    color: #fff;
}

.site-foot .widget .post-date {
    display: block;
    font-size: 0.8rem;
    color: #93A2B4;
}

.foot-contact {
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: #93A2B4;
}

.foot-bottom {
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(199, 210, 222, 0.2);
    font-size: 0.86rem;
    color: #93A2B4;
}

/* =========================================================================
   14. Cookie-баннер
   ========================================================================= */

.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.4rem;
    background: var(--foot-bg);
    color: #DCE4EC;
    border-top: 3px solid var(--accent);
    font-size: 0.9rem;
}

.cookie-banner p {
    margin: 0;
    max-width: 74ch;
    min-width: 0;
}

.cookie-banner a {
    color: #7FE3F5;
}

/* =========================================================================
   15. Адаптив
   ========================================================================= */

@media (max-width: 960px) {
    h1 {
        font-size: 2.4rem;
    }

    .hero-plate h1 {
        font-size: 2.4rem;
    }

    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.4rem;
    }

    .layout-single,
    .front-section .shell-narrow {
        width: 100%;
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foot-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-toggle {
        display: inline-flex;
        order: 2;
    }

    .main-nav {
        flex: 1 1 100%;
        order: 3;
    }

    .main-nav[hidden] {
        display: none !important;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--line);
        margin-top: 0.6rem;
    }

    .main-nav li {
        border-bottom: 1px solid var(--line);
    }

    .main-nav a {
        display: block;
        padding: 0.7rem 0;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2rem;
        margin-left: 0;
    }

    h2 {
        font-size: 1.55rem;
    }

    .page-head h1,
    .page-lead {
        margin-left: 0;
    }

    .front-section {
        padding: 3rem 0;
    }

    .hero-inner {
        padding: 3rem 0 3.4rem;
    }

    .hero-plate {
        padding: 1.6rem 1.4rem 1.8rem;
    }

    .hero-plate h1 {
        font-size: 1.9rem;
    }

    .hero-note {
        right: 5%;
        bottom: 0.8rem;
        font-size: 1.2rem;
    }

    .entry,
    .comments-block,
    .error-box {
        padding: 1.5rem 1.3rem 1.7rem;
    }

    .card-row {
        flex-direction: column;
    }

    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }

    .card-thumb-wrap a {
        position: static;
    }

    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .card-body {
        padding: 1.2rem 1.2rem 1.4rem;
    }

    .card-grid,
    .facts-grid,
    .foot-cols {
        grid-template-columns: minmax(0, 1fr);
    }

    .zig-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.6rem;
    }

    .zig-row.reverse .zig-media {
        order: 0;
    }

    .zig-media img {
        border-width: 7px;
        box-shadow: 7px 7px 0 rgba(26, 32, 44, 0.15);
    }

    .steps-ladder {
        padding-left: 58px;
    }

    .steps-ladder::before {
        left: 21px;
    }

    .step-num {
        left: -58px;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .fact-item {
        padding: 1.2rem 1.2rem;
    }

    .fact-num {
        font-size: 3.2rem;
    }

    .sidebar {
        padding: 1.3rem 1.2rem;
    }

    .hatch-mark {
        display: none;
    }

    .cookie-banner {
        padding: 0.9rem 1rem;
        font-size: 0.85rem;
    }
}
