/*
Theme Name: dds_helwacenter.com
Author: Марина Левченко
Description: Тема для информационно-сервисного портала о жилье для студентов за рубежом.
Version: 1.1
Text Domain: hstay
*/

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

:root {
    --bg: #F7F5FB;
    --bg-alt: #EDE9F5;
    --bg-white: #FFFFFF;
    --header-bg: #2D2A4A;
    --footer-bg: #1F1D33;
    --ink: #2D2A4A;
    --accent: #7C5CBF;
    --accent-2: #4ECDC4;
    --muted: #8E8AA3;
    --line: #C5BEDB;
    --line-soft: #D5CEE8;
    --shadow-card: 0 2px 8px rgba(45, 42, 74, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(124, 92, 191, 0.15);
    --shadow-btn: 0 4px 12px rgba(124, 92, 191, 0.3);
    --radius: 12px;
    --radius-btn: 8px 8px 8px 0;
    --shell: min(92%, 1180px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.72;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%237C5CBF' stroke-width='6' opacity='0.03'%3E%3Crect x='90' y='140' width='240' height='180' rx='18'/%3E%3Cpath d='M160 140v-34a16 16 0 0 1 16-16h68a16 16 0 0 1 16 16v34'/%3E%3Cpath d='M90 210h240'/%3E%3Cpath d='M150 320v26M270 320v26'/%3E%3C/g%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, rgba(237, 233, 245, 0.4) 0 2px, rgba(247, 245, 251, 0) 2px 20px);
    background-repeat: no-repeat, repeat;
    background-position: right -40px bottom -30px, left top;
    background-attachment: fixed, scroll;
}

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

a {
    color: var(--accent);
    text-decoration: none;
}

p {
    margin: 0 0 1.05em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Playfair Display", Georgia, serif;
    color: var(--ink);
    line-height: 1.25;
    margin: 0 0 0.6em;
    font-weight: 600;
}

h1 {
    font-size: 3.2rem;
}

h2 {
    font-size: 1.95rem;
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.15rem;
}

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

li {
    margin-bottom: 0.4em;
}

blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem;
    border-left: 3px solid var(--accent);
    background: var(--bg);
    font-style: italic;
    color: var(--ink);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--line);
}

th, td {
    border: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
}

th {
    background: var(--bg-alt);
    font-weight: 600;
}

code, pre {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.92em;
}

pre {
    overflow-x: auto;
    background: var(--bg-alt);
    padding: 1rem 1.2rem;
    border-radius: var(--radius);
}

/* Цветная полоса сверху страницы */
.topline {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

.shell {
    width: var(--shell);
    margin-inline: auto;
}

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

/* ==================================================================
   2. Ссылки и кнопки
   ================================================================== */

.entry-content a,
.widget a,
.crumbs a,
.card-excerpt a {
    position: relative;
    background-image: linear-gradient(var(--accent-2), var(--accent-2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.28s ease;
}

.entry-content a:hover,
.widget a:hover,
.crumbs a:hover,
.card-excerpt a:hover {
    background-size: 100% 2px;
}

.btn {
    display: inline-block;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.72rem 1.5rem;
    border-radius: var(--radius-btn);
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
    color: #fff;
}

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

.btn-ghost:hover {
    background: var(--accent);
    color: #fff;
}

.btn-outline-light {
    background: transparent;
    border-color: #EDE9F5;
    color: #EDE9F5;
}

.btn-outline-light:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #16303a;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.35);
}

.btn-light {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #16303a;
}

.btn-light:hover {
    color: #16303a;
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.35);
}

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

.site-header {
    background: var(--header-bg);
    color: #fff;
    padding: 1.4rem 0 1.5rem;
    position: static;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    flex-wrap: wrap;
}

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

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

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

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

.brand-name {
    display: block;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.brand-tagline {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #B7B1CE;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-btn);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: "Inter", Arial, sans-serif;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent-2);
    box-shadow: 0 5px 0 var(--accent-2), 0 -5px 0 var(--accent-2);
}

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

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

.main-nav a {
    display: inline-block;
    padding: 0.3rem 0;
    color: #EDE9F5;
    font-size: 0.97rem;
    font-weight: 500;
    background-image: linear-gradient(var(--accent-2), var(--accent-2));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.28s ease, color 0.22s ease;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: #fff;
    background-size: 100% 2px;
}

/* ==================================================================
   4. Раскладка страниц
   ================================================================== */

.site-main {
    padding: 2.4rem 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%);
    justify-content: space-between;
    gap: 2.5rem;
}

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

.sidebar {
    min-width: 0;
}

.crumbs {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
    line-height: 1.7;
}

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

.crumbs-sep {
    color: var(--line);
    margin: 0 0.2rem;
}

.page-title {
    font-size: 2.4rem;
    margin-bottom: 1.4rem;
    padding-left: 12px;
    border-left: 2px solid var(--accent);
}

.page-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    margin-right: 10px;
    vertical-align: baseline;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.7em;
}

.entry-content h2::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    margin-right: 10px;
    vertical-align: baseline;
}

.entry-content img {
    display: block;
    border-radius: var(--radius);
}

.entry-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1.6rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-meta a {
    color: var(--accent);
}

.post-meta-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-2);
}

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

.entry-tags a {
    display: inline-block;
    margin: 0 0.35rem 0.35rem 0;
    padding: 0.25rem 0.7rem;
    background: var(--bg-alt);
    border-radius: 999px;
    color: var(--accent);
}

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

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.7rem;
    margin-bottom: 2.4rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--accent);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.card:nth-child(even) {
    border-top-color: var(--accent-2);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

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

.card-thumb-link {
    display: block;
}

.card-thumb-empty {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 26% 30%, rgba(78, 205, 196, 0.35) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 64%, rgba(124, 92, 191, 0.3) 0 2px, transparent 3px),
        linear-gradient(135deg, #EDE9F5 0%, #F7F5FB 100%);
    background-size: 26px 26px, 32px 32px, 100% 100%;
}

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

.card-title {
    font-size: 1.22rem;
    margin: 0 0 0.6rem;
}

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

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

.card-excerpt {
    color: #4b4767;
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
}

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

.card-more {
    margin-top: auto;
    align-self: flex-start;
}

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

.front-wrap {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.front-section {
    padding: 80px 0;
}

.fs-topics {
    border-top: 1px dashed var(--line);
}

.section-head {
    margin-bottom: 2.4rem;
}

.section-title {
    font-size: 2.05rem;
    margin: 0 0 0.6rem;
    padding-left: 12px;
    border-left: 2px solid var(--accent);
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    margin-right: 10px;
    vertical-align: baseline;
}

.section-lead {
    color: var(--muted);
    max-width: 70ch;
    margin: 0;
}

.pause-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 0 1.2rem;
}

.pause-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    opacity: 0.45;
}

/* --- Блок 1: hero --- */

.fs-hero {
    padding: 0;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    margin-top: 0.6rem;
    margin-bottom: 0.4rem;
}

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

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 5.2rem 3rem;
    display: flex;
    justify-content: flex-start;
}

.hero-plate {
    background: rgba(45, 42, 74, 0.85);
    border-radius: var(--radius);
    padding: 2.6rem 2.4rem;
    max-width: 660px;
    min-width: 0;
}

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

.hero-plate h1::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    margin-right: 12px;
    vertical-align: baseline;
}

.hero-plate p {
    color: #D9D4EA;
    font-size: 1.04rem;
    margin-bottom: 1.6rem;
}

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

/* --- Блок 2: шаги --- */

.fs-steps {
    background: var(--bg-alt);
    background-image: radial-gradient(circle, var(--line-soft) 1px, transparent 1px);
    background-size: 16px 16px;
    border-radius: var(--radius);
    padding: 80px 2.4rem;
}

.steps-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 42px;
    position: relative;
}

.steps-list::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 14px;
    bottom: 14px;
    border-left: 2px dashed var(--line);
}

.step-item {
    position: relative;
    margin: 0 0 1.5rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    border-top: 3px solid var(--accent);
    box-shadow: var(--shadow-card);
    padding: 1.4rem 1.6rem;
    min-width: 0;
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.step-item:nth-child(even) {
    border-top-color: var(--accent-2);
}

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

.step-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.step-bullet {
    position: absolute;
    left: -42px;
    top: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-alt);
    border-radius: 50%;
}

.step-bullet svg {
    display: block;
    width: 22px;
    height: 22px;
}

.step-item h3 {
    font-size: 1.24rem;
    margin-bottom: 0.45rem;
}

.step-item p {
    margin: 0;
    color: #4b4767;
    font-size: 0.97rem;
}

/* --- Блок 3: статистика --- */

.fs-stats {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 3.2rem 2.4rem;
    box-shadow: var(--shadow-card);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.stat-cell {
    min-width: 0;
    text-align: center;
    padding: 0.6rem 1.1rem;
    border-left: 1px solid var(--line);
}

.stat-cell:first-child {
    border-left: none;
}

.stat-num {
    display: block;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 3rem;
    line-height: 1.1;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.stat-label {
    display: block;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
}

/* --- Блок 4: рубрикатор --- */

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

.topic-tile {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.9rem;
    min-width: 0;
    aspect-ratio: 1 / 1;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    padding: 1.5rem 1.4rem;
    color: var(--ink);
    transition: background 0.24s ease, color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.topic-tile svg {
    display: block;
    width: 38px;
    height: 38px;
    stroke: var(--accent-2);
    fill: none;
    stroke-width: 1.6;
    transition: stroke 0.24s ease;
}

.topic-tile span {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.3;
}

.topic-tile small {
    display: block;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.3rem;
    transition: color 0.24s ease;
}

.topic-tile:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.topic-tile:hover svg {
    stroke: #fff;
}

.topic-tile:hover small {
    color: rgba(255, 255, 255, 0.8);
}

/* --- Блок последних записей --- */

.fs-latest .section-head {
    margin-bottom: 2rem;
}

.latest-more {
    text-align: center;
}

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

.sidebar .widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
}

.sidebar .widget-title {
    font-size: 1.15rem;
    margin: 0 0 1rem;
    padding-left: 10px;
    border-left: 2px solid var(--accent);
    color: var(--ink);
}

.sidebar .widget a {
    color: var(--ink);
}

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

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

.sidebar .widget li {
    padding: 0.5rem 0 0.5rem 16px;
    position: relative;
    border-bottom: 1px dashed var(--line);
    font-size: 0.95rem;
}

.sidebar .widget li:last-child {
    border-bottom: none;
}

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

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

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

.site-footer {
    background: var(--footer-bg);
    color: #CFCADF;
    padding: 3rem 0 1.6rem;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
    padding-bottom: 2.2rem;
    border-bottom: 1px dashed rgba(197, 190, 219, 0.3);
}

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

.site-footer .widget {
    color: #CFCADF;
    font-size: 0.94rem;
}

.site-footer .widget-title {
    font-size: 1.1rem;
    color: #fff;
    margin: 0 0 1rem;
    padding-left: 10px;
    border-left: 2px solid var(--accent-2);
}

.site-footer .widget a {
    color: #DDD8EC;
}

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

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

.site-footer .widget li {
    padding: 0.35rem 0 0.35rem 16px;
    position: relative;
    font-size: 0.94rem;
}

.site-footer .widget li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.95em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.site-footer .widget .post-date {
    display: block;
    font-size: 0.8rem;
    color: #9A94B4;
}

.copyright {
    padding-top: 1.4rem;
    font-size: 0.85rem;
    color: #918BAC;
}

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

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

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

.cookie-banner p {
    margin: 0;
    min-width: 0;
    flex: 1;
}

.cookie-banner a {
    color: var(--accent-2);
}

/* ==================================================================
   10. Пагинация, поиск, комментарии
   ================================================================== */

.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 2.2rem 0 0.6rem;
}

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px 8px 8px 0;
    background: var(--bg-white);
    color: var(--ink);
    font-size: 0.93rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

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

.pager .page-numbers.dots {
    border: none;
    background: transparent;
    min-width: 24px;
}

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

.search-form label {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.search-field {
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: 8px 8px 8px 0;
}

.search-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.15);
}

.comments-area {
    margin-top: 3rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.8rem 1.9rem 2rem;
}

.comments-title,
.comment-reply-title {
    font-size: 1.45rem;
    padding-left: 12px;
    border-left: 2px solid var(--accent);
}

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

.comment-list ul.children {
    list-style: none;
    margin: 1rem 0 0;
    padding-left: 1.4rem;
    border-left: 2px solid var(--bg-alt);
}

.comment-item {
    padding: 1.1rem 0;
    border-bottom: 1px dashed var(--line);
}

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

.comment-author {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
}

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

.comment-actions {
    font-size: 0.86rem;
}

.comment-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    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.7rem 1rem;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px 8px 8px 0;
    margin-bottom: 1rem;
}

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

.comment-form input[type="submit"],
.comment-form .submit {
    display: inline-block;
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.72rem 1.5rem;
    border-radius: var(--radius-btn);
    border: 2px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}

.comment-notes,
.logged-in-as {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ==================================================================
   11. 404 и служебные экраны
   ================================================================== */

.notfound {
    text-align: center;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 3rem 2.2rem;
}

.notfound-code {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 5rem;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.notfound .search-form {
    justify-content: center;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.no-results {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.8rem 1.9rem;
}

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

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

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

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

    .layout-single,
    .front-wrap {
        width: 100%;
    }

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

    .stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.4rem 0;
    }

    .stat-cell:nth-child(odd) {
        border-left: none;
    }

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

    .hero-inner {
        padding: 3.4rem 2rem;
    }
}

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .page-title {
        font-size: 1.85rem;
    }

    .section-title {
        font-size: 1.62rem;
    }

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

    .main-nav {
        width: 100%;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        margin-top: 0.8rem;
        border-top: 1px dashed rgba(197, 190, 219, 0.3);
    }

    .main-nav li {
        margin: 0;
        border-bottom: 1px dashed rgba(197, 190, 219, 0.3);
    }

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

    .front-section {
        padding: 48px 0;
    }

    .fs-steps {
        padding: 44px 1.3rem;
    }

    .fs-stats {
        padding: 2rem 1.4rem;
    }

    .hero-inner {
        padding: 2rem 1.1rem;
    }

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

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

    .stats-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat-cell {
        border-left: none;
        border-top: 1px solid var(--line);
        padding-top: 1.1rem;
    }

    .stat-cell:first-child {
        border-top: none;
    }

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

    .topic-tile {
        aspect-ratio: auto;
        padding: 1.3rem 1.2rem;
    }

    .steps-list {
        padding-left: 34px;
    }

    .steps-list::before {
        left: 11px;
    }

    .step-bullet {
        left: -34px;
        width: 26px;
        height: 26px;
    }

    .step-bullet svg {
        width: 18px;
        height: 18px;
    }

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

    .comments-area {
        padding: 1.3rem 1.2rem 1.5rem;
    }

    .cookie-banner {
        padding: 0.9rem 1.1rem;
    }
}
