/*
Theme Name: dds_kulinarnyja.com
Theme URI: https://kulinarnyja.com/
Author: Арина Лебедева
Description: Тема для информационного сайта о рецептах, продуктах и кухонной утвари.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: poprecept
*/

:root {
    --bg: #F9F9FB;
    --bg-alt: #FFFFFF;
    --ink: #1A1A24;
    --muted: #7A7A8A;
    --pink: #FF477E;
    --mint: #00E5B5;
    --violet: #A855F7;
    --yellow: #FFD028;
    --line: #E0E0F0;
    --dark: #0F0F14;
    --side: #F2F2F8;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image: radial-gradient(circle at 1px 1px, rgba(26, 26, 36, 0.07) 1px, transparent 0);
    background-size: 18px 18px;
    color: var(--ink);
    font-family: "Roboto", "Open Sans", "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Inter", "Montserrat", "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.7em;
}

h1 { font-size: 3.5rem; font-weight: 900; }
h2 { font-size: 2.3rem; font-weight: 800; }
h3 { font-size: 1.55rem; font-weight: 700; }
h4 { font-size: 1.2rem; font-weight: 700; }

p { margin: 0 0 1.1em; }

a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-style: wavy; text-decoration-color: var(--mint); text-decoration-thickness: 3px; text-underline-offset: 5px; }

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

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

.home .hero-inner,
.home .section .shell,
.home .thesis .shell { width: min(85%, 1180px); }

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

/* ---------- Верхняя декоративная полоса ---------- */
.topbar {
    display: flex;
    height: 14px;
    overflow: hidden;
}
.topbar i {
    display: block;
    height: 100%;
    transform: skewX(-24deg);
}
.topbar i:nth-child(1) { flex: 0 0 42%; background: var(--pink); margin-left: -12px; }
.topbar i:nth-child(2) { flex: 0 0 34%; background: var(--mint); margin-left: -22px; }
.topbar i:nth-child(3) { flex: 1 1 auto; background: var(--yellow); margin-left: -22px; margin-right: -20px; }

/* ---------- Шапка ---------- */
.masthead {
    background: var(--bg-alt);
    border-bottom: 3px solid var(--line);
}
.masthead-inner {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: 1.2rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 280px;
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo, .brand-mark { flex: 0 0 auto; display: block; width: 56px; height: 56px; }
.brand-logo { border-radius: 12px; object-fit: cover; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: "Inter", "Montserrat", Arial, sans-serif;
    font-weight: 900;
    font-size: 1.05rem;
    line-height: 1.25;
    color: var(--ink);
}
.brand-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    margin-top: 0.25rem;
}

.nav-toggle {
    display: none;
    border: 3px solid var(--pink);
    background: #fff;
    color: var(--pink);
    border-radius: 30px;
    font: 700 0.95rem/1 "Inter", Arial, sans-serif;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
}
.nav-toggle:hover { background: var(--pink); color: #fff; }

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.4rem;
    margin: 0;
    padding: 0;
}
.site-nav a {
    display: inline-block;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.98rem;
    padding: 0.35rem 0;
    border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--pink); border-bottom-color: var(--mint); text-decoration: none; }
.site-nav .current-menu-item > a { color: var(--pink); border-bottom-color: var(--pink); }

/* ---------- Общие секции и разделители ---------- */
.zag {
    height: 16px;
    background: repeating-linear-gradient(135deg, var(--pink) 0 14px, var(--mint) 14px 28px, var(--yellow) 28px 42px);
    clip-path: polygon(0 0, 100% 0, 100% 58%, 0 100%);
}

.section { padding: 4.2rem 0; }
.section-alt { background: var(--bg-alt); }

.sec-title {
    position: relative;
    padding-left: 2.9rem;
    margin-bottom: 0.6rem;
}
.sec-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.22em;
    width: 26px;
    height: 26px;
    background: var(--pink);
    border-radius: 7px;
}
.sec-title.round::before { background: var(--mint); border-radius: 50%; }
.sec-sub {
    color: var(--muted);
    border-top: 2px solid var(--line);
    padding-top: 0.9rem;
    margin: 0 0 2.2rem;
    max-width: 62ch;
}

/* ---------- Раскладки ---------- */
.main-area { padding: 2.6rem 0 3.6rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67%) minmax(0, 27%);
    justify-content: space-between;
    gap: 2.4rem;
    align-items: start;
}
.layout-single {
    display: block;
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}
.content-area { min-width: 0; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs {
    font-size: 0.87rem;
    color: var(--muted);
    padding: 1.2rem 0 0;
    word-break: break-word;
}
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--pink); }
.breadcrumbs .sep { color: var(--mint); font-weight: 900; margin: 0 0.35rem; }
.breadcrumbs span:last-child { color: var(--ink); }

/* ---------- Карточки записей ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.8rem;
}
.card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem;
}
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 8px 10px 0 rgba(255, 71, 126, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-7px); box-shadow: 12px 16px 0 rgba(255, 71, 126, 0.28); }
.card-thumb {
    display: block;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 96.5%, 0 100%);
}
.card-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.25s ease;
}
.card:hover .card-thumb img { transform: scale(1.02); }
.card-thumb-empty {
    display: block;
    height: 10px;
    background: linear-gradient(90deg, var(--pink), var(--violet));
}
.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.5rem 1.6rem;
}
.card-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--pink); text-decoration: none; }
.card-meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
    letter-spacing: 0.02em;
}
.card-excerpt { color: #3A3A48; font-size: 0.96rem; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 1rem;
    align-self: flex-start;
}
.card-more a {
    display: inline-block;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--pink);
    border-bottom: 3px solid var(--mint);
    padding-bottom: 2px;
}
.card-more a:hover { text-decoration: none; border-bottom-color: var(--pink); }
.section-cta { margin: 2.2rem 0 0; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-block;
    padding: 0.85rem 1.9rem;
    border-radius: 30px;
    border: 3px solid var(--pink);
    background: var(--pink);
    color: #fff;
    font: 800 0.98rem/1.2 "Inter", Arial, sans-serif;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}
.btn:hover {
    background: #fff;
    color: var(--pink);
    transform: translate(-3px, -3px);
    box-shadow: 7px 7px 0 rgba(255, 71, 126, 0.55);
    text-decoration: none;
}
.btn-ghost {
    background: transparent;
    border-color: var(--mint);
    color: var(--ink);
}
.btn-ghost:hover {
    background: var(--mint);
    color: var(--dark);
    box-shadow: 7px 7px 0 rgba(0, 229, 181, 0.55);
}

/* ---------- Главная: блок 1, hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, #FF477E 0%, #A855F7 100%);
    color: #fff;
    padding: 4.6rem 0 4.8rem;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.28) 2px, transparent 0);
    background-size: 22px 22px;
    opacity: 0.55;
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    right: -140px;
    bottom: -220px;
    border-radius: 50%;
    background: rgba(0, 229, 181, 0.28);
    mix-blend-mode: screen;
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 2.6rem;
    align-items: center;
}
.hero h1 { color: #fff; margin-bottom: 1.1rem; }
.hero h1 .torn {
    display: inline-block;
    background: var(--mint);
    color: var(--dark);
    padding: 0 0.28em;
    clip-path: polygon(2% 6%, 99% 0, 100% 92%, 1% 100%);
}
.hero p {
    font-size: 1.12rem;
    max-width: 54ch;
    color: rgba(255, 255, 255, 0.94);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.6rem; }
.hero .btn { border-color: #fff; background: #fff; color: var(--pink); }
.hero .btn:hover { background: transparent; color: #fff; box-shadow: 7px 7px 0 rgba(15, 15, 20, 0.35); }
.hero .btn-ghost { background: transparent; border-color: var(--mint); color: #fff; }
.hero .btn-ghost:hover { background: var(--mint); color: var(--dark); }
.hero-art { min-width: 0; }
.hero-art img {
    display: block;
    width: min(100%, 420px);
    margin-left: auto;
    margin-right: 0;
    opacity: 0.9;
}

/* ---------- Главная: блок 2, сетка карточек-иконок ---------- */
.paper-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.9rem;
}
.paper-card {
    position: relative;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 2rem 1.7rem 1.9rem;
    box-shadow: 9px 10px 0 #FFFFFF, 10px 11px 0 var(--line), 18px 20px 0 rgba(0, 229, 181, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.paper-card:nth-child(2) { box-shadow: 9px 10px 0 #FFFFFF, 10px 11px 0 var(--line), 18px 20px 0 rgba(255, 71, 126, 0.25); }
.paper-card:nth-child(3) { box-shadow: 9px 10px 0 #FFFFFF, 10px 11px 0 var(--line), 18px 20px 0 rgba(168, 85, 247, 0.25); }
.paper-card:hover { transform: translateY(-6px); }
.paper-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--mint);
    margin-bottom: 1.1rem;
}
.paper-card:nth-child(2) .paper-icon { background: var(--pink); }
.paper-card:nth-child(3) .paper-icon { background: var(--yellow); }
.paper-icon svg { width: 32px; height: 32px; display: block; }
.paper-card h3 { margin-bottom: 0.5rem; }
.paper-card p { margin: 0; color: #3A3A48; font-size: 0.97rem; }

/* ---------- Главная: блок 3, цитата ---------- */
.thesis {
    background: var(--mint);
    padding: 4.2rem 0;
}
.thesis-plate {
    position: relative;
    background: rgba(255, 255, 255, 0.55);
    border: 3px solid var(--dark);
    border-radius: 4px;
    padding: 3rem 3rem 3.2rem;
    clip-path: polygon(0 0, 100% 0, 100% 82%, 92% 100%, 0 100%);
}
.thesis-quote {
    font-family: "Inter", "Montserrat", Arial, sans-serif;
    font-weight: 900;
    font-size: 2.7rem;
    line-height: 1.12;
    color: var(--dark);
    margin: 0;
    max-width: 20ch;
}
.thesis-quote span {
    position: relative;
    display: inline-block;
}
.thesis-quote span::after {
    content: "";
    position: absolute;
    left: -2%;
    right: -2%;
    top: 52%;
    height: 9px;
    background: var(--pink);
    transform: rotate(-1.6deg);
    border-radius: 4px;
}
.thesis-note {
    margin: 1.6rem 0 0;
    max-width: 46ch;
    color: #12261F;
    font-size: 1.02rem;
}
.stamp {
    position: absolute;
    right: 2.2rem;
    bottom: 2.4rem;
    border: 3px dashed var(--pink);
    border-radius: 8px;
    padding: 0.7rem 1.1rem;
    transform: rotate(-6deg);
    text-align: center;
    background: rgba(255, 255, 255, 0.75);
}
.stamp b {
    display: block;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.92rem;
    color: var(--pink);
}
.stamp i {
    display: block;
    font-style: normal;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: #3A3A48;
}

/* ---------- Главная: блок 4, карта тем ---------- */
.topics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.6rem;
}
.topic-tile {
    display: block;
    min-width: 0;
    border: 3px solid var(--dark);
    border-radius: 14px;
    padding: 1.6rem 1.4rem 1.7rem;
    color: var(--dark);
    box-shadow: 7px 8px 0 var(--dark);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.topic-tile:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 10px 12px 0 var(--dark); text-decoration: none; }
.topic-tile em { display: block; font-style: normal; font-size: 2rem; line-height: 1; margin-bottom: 0.7rem; }
.topic-tile b { display: block; font-family: "Inter", Arial, sans-serif; font-weight: 900; font-size: 1.16rem; }
.topic-tile span { display: block; font-size: 0.88rem; margin-top: 0.4rem; }
.topic-tile:nth-child(1) { background: var(--yellow); transform: rotate(-2deg); }
.topic-tile:nth-child(2) { background: var(--pink); color: #fff; transform: rotate(1.5deg); }
.topic-tile:nth-child(3) { background: var(--mint); transform: rotate(-1deg); }
.topic-tile:nth-child(4) { background: var(--violet); color: #fff; transform: rotate(2deg); }

/* ---------- Контент записи и страницы ---------- */
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: 2.6rem; margin-bottom: 0.5rem; }
.entry-meta { font-size: 0.86rem; color: var(--muted); }
.entry-thumb {
    display: block;
    width: 100%;
    border-radius: 16px;
    margin-bottom: 1.8rem;
    border: 1px solid var(--line);
    object-fit: cover;
}
.entry-content { font-size: 1.03rem; }
.entry-content h2 { font-size: 1.9rem; margin-top: 2rem; }
.entry-content h3 { font-size: 1.4rem; margin-top: 1.6rem; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content img { border-radius: 14px; display: block; }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.6rem 1.8rem;
    background: var(--side);
    border-left: 8px solid var(--mint);
    border-radius: 10px;
    clip-path: polygon(0 0, 100% 0, 100% 84%, 94% 100%, 0 100%);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 2px solid var(--line);
    font-size: 0.95rem;
}
.entry-content th, .entry-content td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}
.entry-content th { background: var(--side); font-weight: 800; }
.entry-content code {
    background: var(--side);
    padding: 0.1em 0.35em;
    border-radius: 5px;
    font-size: 0.92em;
}

.entry-tags { margin-top: 2rem; font-size: 0.9rem; }
.entry-tags a {
    display: inline-block;
    border: 2px solid var(--line);
    border-radius: 30px;
    padding: 0.25rem 0.9rem;
    margin: 0 0.4rem 0.5rem 0;
    color: var(--ink);
    font-weight: 700;
}
.entry-tags a:hover { border-color: var(--pink); color: var(--pink); text-decoration: none; }

.post-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2.4rem;
    padding-top: 1.6rem;
    border-top: 2px solid var(--line);
    font-weight: 700;
    font-size: 0.94rem;
}

/* ---------- Сайдбар ---------- */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--side);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
}
.sidebar .widget-title {
    position: relative;
    font-size: 1.15rem;
    margin: 0 0 1rem;
    padding-left: 1.6rem;
    color: var(--ink);
}
.sidebar .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--pink);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
}
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--ink); font-weight: 600; }
.sidebar .widget a:hover { color: var(--pink); }
.sidebar .widget p, .sidebar .widget .textwidget { color: #33333F; font-size: 0.95rem; }
.sidebar .widget .post-date { display: block; color: var(--muted); font-size: 0.8rem; }

/* ---------- Форма поиска ---------- */
.search-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.search-form input[type="search"] {
    flex: 1 1 180px;
    min-width: 0;
    border: 3px solid var(--line);
    border-radius: 30px;
    padding: 0.7rem 1.1rem;
    font: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--mint); }

/* ---------- Пагинация ---------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2.6rem;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 0.9rem;
    border: 3px solid var(--line);
    border-radius: 30px;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--ink);
    background: #fff;
}
.pagination a.page-numbers:hover {
    border-color: var(--mint);
    color: var(--pink);
    text-decoration: none;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0, 229, 181, 0.5);
}
.pagination .page-numbers.current {
    background: var(--pink);
    border-color: var(--pink);
    color: #fff;
}
.pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

/* ---------- Комментарии ---------- */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 3px solid var(--line);
}
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list ul.children { list-style: none; margin: 1rem 0 0 1.4rem; padding: 0; }
.comment-body {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
    box-shadow: 6px 7px 0 rgba(0, 229, 181, 0.16);
}
.comment-author { font-weight: 800; }
.comment-metadata { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.6rem; }
.comment-reply-link { font-weight: 700; font-size: 0.88rem; }
.comment-respond {
    background: var(--side);
    border-radius: 16px;
    padding: 1.8rem 1.9rem 2rem;
}
.comment-respond .comment-reply-title { margin-top: 0; }
.comment-form label { display: block; font-weight: 700; 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%;
    border: 3px solid var(--line);
    border-radius: 14px;
    padding: 0.7rem 1rem;
    font: inherit;
    font-size: 0.95rem;
    background: #fff;
    color: var(--ink);
    margin-bottom: 1rem;
}
.comment-form textarea { border-radius: 16px; min-height: 140px; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--mint); }
.comment-form .submit {
    display: inline-block;
    padding: 0.85rem 1.9rem;
    border-radius: 30px;
    border: 3px solid var(--pink);
    background: var(--pink);
    color: #fff;
    font: 800 0.98rem/1.2 "Inter", Arial, sans-serif;
    cursor: pointer;
}
.comment-form .submit:hover { background: #fff; color: var(--pink); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 2rem 0 1rem; }
.notfound .code {
    font-family: "Inter", Arial, sans-serif;
    font-weight: 900;
    font-size: 7rem;
    line-height: 1;
    background: linear-gradient(120deg, var(--pink), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.notfound .search-form { width: min(100%, 480px); margin: 1.6rem auto 0; }
.notfound-actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

/* ---------- 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;
    gap: 1rem 1.6rem;
    justify-content: space-between;
    background: var(--dark);
    color: #EDEDF5;
    border-top: 4px solid var(--mint);
    padding: 1.1rem 1.6rem;
    font-size: 0.92rem;
}
.cookie-banner p { margin: 0; max-width: 76ch; }
.cookie-banner a { color: var(--mint); }
.cookie-banner .btn { flex: 0 0 auto; }

/* ---------- Подвал ---------- */
.site-footer {
    position: relative;
    overflow: hidden;
    background: var(--dark);
    color: #D8D8E6;
    padding: 3.4rem 0 1.6rem;
    margin-top: 3rem;
}
.site-footer::before {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(255, 71, 126, 0.16);
    left: -130px;
    top: -160px;
    pointer-events: none;
}
.site-footer::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(0, 229, 181, 0.12);
    right: -110px;
    bottom: -150px;
    pointer-events: none;
}
.footer-cols {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
.footer-cols .widget { min-width: 0; color: #D8D8E6; }
.footer-cols .widget-title {
    position: relative;
    font-size: 1.1rem;
    color: #FFFFFF;
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}
.footer-cols .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 13px;
    height: 13px;
    border-radius: 4px;
    background: var(--mint);
}
.footer-cols .widget p, .footer-cols .widget .textwidget { color: #C4C4D4; font-size: 0.94rem; }
.footer-cols .widget ul { list-style: none; margin: 0; padding: 0; }
.footer-cols .widget li { padding: 0.4rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); font-size: 0.94rem; }
.footer-cols .widget li:last-child { border-bottom: 0; }
.footer-cols .widget a { color: #F2F2F8; font-weight: 600; }
.footer-cols .widget a:hover { color: var(--mint); }
.footer-cols .widget .post-date { display: block; color: #9A9AAE; font-size: 0.8rem; }
.footer-bottom {
    position: relative;
    z-index: 2;
    margin-top: 2.6rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.86rem;
    color: #9A9AAE;
}

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    h1 { font-size: 2.6rem; }
    h2 { font-size: 1.95rem; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); }
    .layout-single { width: 100%; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .paper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-inner { grid-template-columns: minmax(0, 1fr); }
    .hero-art img { width: min(100%, 320px); margin-left: auto; margin-right: auto; }
    .thesis-quote { font-size: 2.1rem; }
    .stamp { position: static; display: inline-block; margin-top: 1.6rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.65rem; }
    .entry-title { font-size: 1.8rem; }
    .section { padding: 2.8rem 0; }
    .hero { padding: 3rem 0 3.2rem; }
    .card-grid, .card-list, .paper-grid, .topics { grid-template-columns: minmax(0, 1fr); }
    .topic-tile { transform: none; }
    .topic-tile:nth-child(1), .topic-tile:nth-child(2),
    .topic-tile:nth-child(3), .topic-tile:nth-child(4) { transform: none; }
    .footer-cols { grid-template-columns: minmax(0, 1fr); }
    .thesis { padding: 2.6rem 0; }
    .thesis-plate { padding: 1.8rem 1.5rem 2rem; clip-path: none; }
    .thesis-quote { font-size: 1.7rem; max-width: none; }
    .paper-card { padding: 1.6rem 1.4rem; }
    .comment-respond { padding: 1.4rem 1.3rem 1.6rem; }
    .cookie-banner { padding: 1rem 1.2rem; }
    .entry-content blockquote { padding: 1.3rem 1.3rem; clip-path: none; }
    .sidebar .widget { padding: 1.3rem 1.3rem; }
    .nav-toggle { display: inline-block; order: 2; margin-left: auto; }
    .site-nav { flex: 1 1 100%; order: 3; display: none; }
    .site-nav.is-open { display: block; }
    .site-nav ul { flex-direction: column; gap: 0; }
    .site-nav li { border-bottom: 1px dashed var(--line); }
    .site-nav a { display: block; padding: 0.75rem 0; border-bottom: 0; }
    .masthead-inner { padding: 0.9rem 0; }
    .brand { flex: 1 1 auto; }
    .home .hero-inner,
    .home .section .shell,
    .home .thesis .shell { width: 92%; }
}
