/*
Theme Name: dds_financialomejor.com
Author: Дмитрий Савельев
Description: Тёмная корпоративная тема со стеклянными панелями для информационного сайта об ипотечных программах и расчётах.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ipomejor
*/

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

:root {
    --bg: #0F172A;
    --bg-alt: #1E293B;
    --bg-deep: #0B1120;
    --text: #F1F5F9;
    --muted: #94A3B8;
    --accent: #2DD4BF;
    --accent-soft: #5EEAD4;
    --amber: #FBBF24;
    --hair: rgba(148, 163, 184, 0.15);
    --hair-strong: rgba(148, 163, 184, 0.28);
    --glass: rgba(30, 41, 59, 0.8);
    --shell: min(92%, 1180px);
    --font-head: "Manrope", "Inter", "Segoe UI Variable", "Segoe UI", Roboto, Arial, sans-serif;
    --font-body: "IBM Plex Sans", "Source Sans Pro", "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--bg);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='260' viewBox='0 0 420 260'%3E%3Cpath d='M10 240 L80 196 L150 208 L220 140 L290 156 L360 70 L410 34' fill='none' stroke='%232DD4BF' stroke-width='10' stroke-linecap='round' stroke-linejoin='round' opacity='0.5'/%3E%3Ccircle cx='410' cy='34' r='14' fill='%232DD4BF' opacity='0.5'/%3E%3C/svg%3E"),
        radial-gradient(circle at 12% 8%, rgba(45, 212, 191, 0.05), rgba(45, 212, 191, 0) 60%),
        repeating-linear-gradient(45deg, #1E293B 0, #1E293B 1px, transparent 1px, transparent 24px);
    background-repeat: no-repeat, no-repeat, repeat;
    background-position: right -40px bottom -30px, left top, left top;
    background-size: 460px auto, 900px 700px, auto;
    background-attachment: fixed, fixed, scroll;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
}

/* Цветная полоса по самому верху страницы */
.page-topline {
    position: relative;
    z-index: 5;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--amber) 100%);
}

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

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

figure {
    margin: 1.6rem 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.22;
    letter-spacing: -0.015em;
    margin: 0 0 0.7em;
    font-weight: 700;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.22rem; }

p {
    margin: 0 0 1.1em;
}

a {
    color: var(--accent);
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

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

.entry-content a:hover,
.widget a:hover,
.card-excerpt a:hover {
    background-size: 100% 1px;
    color: var(--accent-soft);
    text-shadow: 0 0 12px rgba(45, 212, 191, 0.45);
}

blockquote {
    margin: 1.8rem 0;
    padding: 0.4rem 0 0.4rem 24px;
    border-left: 3px solid var(--accent);
    color: #E2E8F0;
    font-size: 1.12rem;
    font-style: italic;
}

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

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

pre {
    overflow-x: auto;
    padding: 1rem 1.2rem;
    background: var(--bg-deep);
    border: 1px solid var(--hair);
    border-radius: 12px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6rem 0;
    border: 1px solid var(--hair-strong);
}

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

table th {
    background: rgba(45, 212, 191, 0.1);
    color: var(--text);
    font-family: var(--font-head);
}

.table-scroll {
    overflow-x: auto;
}

/* ============================================================
   2. Кнопки и общие элементы
   ============================================================ */

.btn {
    display: inline-block;
    padding: 0.82rem 1.7rem;
    border-radius: 10px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.btn-fill {
    background: var(--accent);
    color: #06201D;
}

.btn-fill:hover {
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(45, 212, 191, 0.32);
    color: #06201D;
}

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

.btn-line:hover {
    background: var(--accent);
    color: #06201D;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(45, 212, 191, 0.24);
}

/* акцентный CTA — срезанный правый верхний угол */
.btn-cut {
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
    border-radius: 10px;
}

.section-title {
    position: relative;
    padding-left: 16px;
    border-left: 4px solid var(--accent);
    font-size: 2.1rem;
    margin-bottom: 1.6rem;
}

.section-title.is-plated {
    border-left: none;
    padding: 0.55rem 1.1rem;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.22), rgba(45, 212, 191, 0));
}

.entry-content h2 {
    position: relative;
    padding-left: 22px;
    margin-top: 2.2rem;
}

.entry-content h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.52em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(45, 212, 191, 0.75);
}

.entry-content h3 {
    margin-top: 1.8rem;
}

.sect-rule {
    width: 60%;
    height: 1px;
    margin: 0 auto;
    border: 0;
    background: rgba(45, 212, 191, 0.2);
}

.dot-rule {
    height: 2px;
    margin: 0 auto;
    width: 60%;
    background-image: radial-gradient(var(--accent) 1px, transparent 1px);
    background-size: 8px 2px;
    background-repeat: repeat-x;
    opacity: 0.55;
}

.tag-chip {
    display: inline-block;
    padding: 0.2rem 0.62rem;
    border-radius: 6px;
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent);
    font-size: 0.82rem;
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.6;
}

.tag-chip:hover {
    background: rgba(45, 212, 191, 0.28);
    color: var(--accent-soft);
}

.grad-num {
    background: linear-gradient(120deg, var(--accent), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

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

.site-head {
    background: rgba(11, 17, 32, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hair);
}

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

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

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

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

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

.brand-name {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.3;
    color: var(--text);
    letter-spacing: -0.01em;
}

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

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

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

.nav-toggle-bars {
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--accent);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

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

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

.main-nav a {
    display: inline-block;
    padding: 0.35rem 0;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.99rem;
    color: var(--text);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: background-size 0.28s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.main-nav a:hover {
    color: var(--accent);
    background-size: 100% 2px;
    text-shadow: 0 0 12px rgba(45, 212, 191, 0.4);
}

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
    color: var(--accent);
    background-size: 100% 2px;
}

/* ============================================================
   4. Разметка страниц
   ============================================================ */

.site-main {
    padding: 2.6rem 0 4rem;
}

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

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

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

.breadcrumbs {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    line-height: 1.8;
}

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

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

.breadcrumbs .sep {
    color: rgba(45, 212, 191, 0.55);
    margin: 0 0.35rem;
}

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

.page-head h1 {
    font-size: 2.6rem;
    margin-bottom: 0.4rem;
}

.page-head .page-lead {
    color: var(--muted);
    margin: 0;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 1.4rem;
}

.entry-thumb {
    margin: 0 0 1.8rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--hair);
}

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

.entry-content {
    font-size: 1.04rem;
}

.entry-content p {
    margin: 0 0 1.15em;
}

.entry-content img {
    border-radius: 12px;
    display: block;
}

.entry-footer {
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--hair);
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.entry-footer .meta-label {
    color: var(--muted);
    font-size: 0.9rem;
}

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

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

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--hair);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(45, 212, 191, 0.18);
    border-color: rgba(45, 212, 191, 0.4);
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    background: #16202F;
}

.card-thumb-wrap a {
    display: block;
}

.card-thumb-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: brightness(0.86);
    transition: filter 0.25s ease, transform 0.35s ease;
}

.card:hover .card-thumb-wrap img {
    filter: brightness(1);
    transform: scale(1.03);
}

.card-thumb-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease;
}

.card:hover .card-thumb-wrap::after {
    transform: scaleX(1);
}

.card-thumb-blank {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at 78% 22%, rgba(45, 212, 191, 0.18), rgba(45, 212, 191, 0) 58%),
        repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.08) 0, rgba(148, 163, 184, 0.08) 1px, transparent 1px, transparent 14px),
        #16202F;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.3rem 1.35rem 1.45rem;
    min-width: 0;
}

.card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.18rem;
    margin: 0 0 0.6rem;
    line-height: 1.34;
}

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

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

.card-excerpt {
    color: #CBD5E1;
    font-size: 0.96rem;
    margin-bottom: 1rem;
}

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

.card-excerpt p:last-child {
    margin-bottom: 0;
}

.card-meta {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--hair);
}

.card-date {
    color: var(--muted);
    font-size: 0.84rem;
}

.card-more {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent);
}

.card-more:hover {
    color: var(--accent-soft);
    text-shadow: 0 0 12px rgba(45, 212, 191, 0.45);
}

.no-posts {
    padding: 2rem 1.8rem;
    border: 1px solid var(--hair);
    border-radius: 16px;
    background: var(--glass);
}

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

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

.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--hair-strong);
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.7);
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 212, 191, 0.18);
}

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

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

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

.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--hair);
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.6rem;
    color: #DDE5EF;
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.06);
}

.sidebar .widget-title {
    font-size: 1.12rem;
    margin: 0 0 1rem;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
    color: var(--text);
}

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

.sidebar .widget li {
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--hair);
    line-height: 1.5;
}

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

.sidebar .widget a {
    color: #E2E8F0;
    font-size: 0.97rem;
}

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

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

.sidebar .widget p {
    color: #CBD5E1;
}

.site-foot {
    background: var(--bg-deep);
    border-top: 1px solid var(--accent);
    padding: 3rem 0 1.6rem;
    color: #CBD5E1;
}

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

.foot-col .widget + .widget {
    margin-top: 1.6rem;
}

.foot-col .widget-title {
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    color: #F1F5F9;
    position: relative;
    padding-left: 16px;
}

.foot-col .widget-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amber);
}

.foot-col .widget {
    color: #C7D2DF;
    font-size: 0.95rem;
}

.foot-col .widget p {
    color: #C7D2DF;
}

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

.foot-col .widget li {
    padding: 0.36rem 0;
    line-height: 1.5;
}

.foot-col .widget a {
    color: #DCE5F0;
    font-size: 0.95rem;
}

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

.foot-col .widget .post-date {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.foot-bottom {
    margin-top: 2.6rem;
    padding-top: 1.3rem;
    border-top: 1px solid var(--hair);
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.foot-mail {
    color: var(--accent);
}

/* ============================================================
   8. Главная
   ============================================================ */

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

.fp-wide {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.sect-sep {
    padding: 0;
}

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

.fp-hero {
    position: relative;
    padding: 84px 0 0;
    background-color: var(--bg-deep);
    background-image: linear-gradient(90deg, rgba(11, 17, 32, 0.95) 8%, rgba(11, 17, 32, 0.68) 52%, rgba(11, 17, 32, 0.5) 100%), var(--hero-img);
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 2.6rem;
    align-items: center;
    padding-bottom: 76px;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 1.1rem;
    padding: 0.28rem 0.8rem;
    border-radius: 6px;
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(105deg, #F1F5F9 4%, var(--accent) 52%, var(--amber) 96%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    color: #CBD5E1;
    font-size: 1.1rem;
    max-width: 56ch;
    margin-bottom: 1.9rem;
}

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

.hero-panel {
    min-width: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(45, 212, 191, 0.28);
    border-radius: 16px;
    padding: 1.7rem 1.7rem 1.5rem;
    box-shadow: 0 18px 44px rgba(45, 212, 191, 0.12);
}

.hero-panel h2 {
    font-size: 1.16rem;
    margin: 0 0 1.1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px dashed rgba(45, 212, 191, 0.3);
}

.hero-panel ul {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 0;
}

.hero-panel li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.52rem 0;
    border-bottom: 1px solid var(--hair);
    font-size: 0.96rem;
}

.hero-panel li:last-child {
    border-bottom: 0;
}

.hero-panel .p-key {
    color: var(--muted);
    min-width: 0;
}

.hero-panel .p-val {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--accent);
    text-align: right;
    flex: 0 0 auto;
}

.hero-panel .p-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.hero-baseline {
    height: 4px;
    width: 72%;
    margin: 0 auto;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(90deg, rgba(45, 212, 191, 0), var(--accent) 50%, rgba(45, 212, 191, 0));
}

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

.fp-stats {
    background-color: var(--bg-alt);
    background-image: radial-gradient(rgba(45, 212, 191, 0.05) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 2.2rem;
}

.stat-cell {
    position: relative;
    min-width: 0;
    padding: 1.6rem 1.3rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--hair);
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.08);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.stat-cell:hover {
    transform: translateY(-4px);
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow: 0 16px 34px rgba(45, 212, 191, 0.18);
}

.stat-cell + .stat-cell::before {
    content: "";
    position: absolute;
    left: -0.6rem;
    top: 22%;
    bottom: 22%;
    width: 1px;
    background-image: linear-gradient(to bottom, rgba(45, 212, 191, 0.3) 50%, transparent 50%);
    background-size: 1px 9px;
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.9rem;
    line-height: 1.1;
    background: linear-gradient(120deg, var(--accent), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.section-lead {
    color: #CBD5E1;
    max-width: 68ch;
    margin: 0;
}

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

.fp-latest {
    background:
        radial-gradient(circle at 92% 6%, rgba(45, 212, 191, 0.08), rgba(45, 212, 191, 0) 55%),
        linear-gradient(160deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.latest-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.latest-head .section-title {
    margin-bottom: 0;
}

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

.fp-steps {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--hair);
    border-bottom: 1px solid var(--hair);
}

.step-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 2.4rem;
}

.step-row::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 46px;
    height: 2px;
    background-image: radial-gradient(var(--accent) 1.5px, transparent 1.5px);
    background-size: 10px 2px;
    background-repeat: repeat-x;
    opacity: 0.45;
}

.step-cell {
    position: relative;
    min-width: 0;
    padding: 1.7rem 1.5rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--hair);
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.08);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.step-cell:hover {
    transform: translateY(-4px);
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow: 0 16px 34px rgba(45, 212, 191, 0.18);
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 0 1.1rem;
    border-radius: 50%;
    background: linear-gradient(140deg, rgba(45, 212, 191, 0.22), rgba(251, 191, 36, 0.14));
    border: 2px solid rgba(45, 212, 191, 0.55);
    box-shadow: 0 0 18px rgba(45, 212, 191, 0.22);
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
}

.step-icon {
    display: block;
    width: 34px;
    height: 34px;
    margin-bottom: 0.9rem;
    color: var(--amber);
}

.step-cell h3 {
    font-size: 1.22rem;
    margin-bottom: 0.5rem;
}

.step-cell p {
    margin: 0;
    color: #CBD5E1;
    font-size: 0.97rem;
}

/* --- Блок 4: CTA --- */

.fp-cta-wrap {
    background: var(--bg);
}

.fs-cta {
    position: relative;
    overflow: hidden;
    padding: 3.2rem 2.6rem 3rem;
    border-radius: 18px;
    border: 1px solid var(--hair);
    text-align: center;
    background-color: var(--bg-alt);
    background-image:
        radial-gradient(circle at 50% 46%, rgba(45, 212, 191, 0.24), rgba(45, 212, 191, 0) 62%),
        linear-gradient(140deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.fs-cta::before,
.fs-cta::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(45, 212, 191, 0.08);
    filter: blur(6px);
    border: 1px solid rgba(45, 212, 191, 0.14);
    pointer-events: none;
}

.fs-cta::before {
    width: 200px;
    height: 200px;
    left: -70px;
    top: -60px;
}

.fs-cta::after {
    width: 150px;
    height: 150px;
    right: -50px;
    bottom: -44px;
    background: rgba(251, 191, 36, 0.07);
    border-color: rgba(251, 191, 36, 0.16);
}

.fs-cta h2 {
    position: relative;
    font-size: 2.4rem;
    margin-bottom: 0.9rem;
    background: linear-gradient(110deg, var(--accent), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.fs-cta p {
    position: relative;
    margin: 0 auto 1.8rem;
    max-width: 62ch;
    color: #CBD5E1;
}

.fs-cta .btn {
    position: relative;
}

.cta-underline {
    height: 2px;
    width: 46%;
    margin: 2.4rem auto 0;
    background: var(--amber);
    opacity: 0.75;
    border-radius: 2px;
}

/* ============================================================
   9. Комментарии, поиск, 404
   ============================================================ */

.comments-area {
    margin-top: 3rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--hair);
}

.comments-title,
.comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.4rem;
}

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

.comment-list ol.children {
    list-style: none;
    margin: 1rem 0 0 1.2rem;
    padding: 0 0 0 1rem;
    border-left: 1px solid var(--hair);
}

.comment-body {
    background: var(--glass);
    border: 1px solid var(--hair);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.1rem;
}

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

.comment-author .says {
    display: none;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    align-items: baseline;
    margin-bottom: 0.7rem;
    font-size: 0.88rem;
}

.comment-metadata a {
    color: var(--muted);
    font-size: 0.85rem;
}

.comment-metadata a:hover {
    color: var(--accent);
}

.reply a {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.88rem;
}

.comment-respond {
    background: var(--glass);
    border: 1px solid var(--hair);
    border-radius: 16px;
    padding: 1.6rem 1.7rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
    color: #CBD5E1;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-field {
    width: 100%;
    padding: 0.72rem 0.95rem;
    background: rgba(11, 17, 32, 0.8);
    border: 1px solid var(--hair-strong);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus,
.search-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16);
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form .submit,
.search-submit {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--accent);
    color: #06201D;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.comment-form .submit:hover,
.search-submit:hover {
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(45, 212, 191, 0.3);
}

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

.search-form .search-field {
    flex: 1 1 200px;
    min-width: 0;
}

.search-form .search-submit {
    flex: 0 0 auto;
}

.sidebar .search-form {
    gap: 0.5rem;
}

.error-404 {
    padding: 2.4rem 2rem;
    border: 1px solid var(--hair);
    border-radius: 18px;
    background: var(--glass);
}

.error-404 .code-404 {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    background: linear-gradient(120deg, var(--accent), var(--amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-404 .search-form {
    margin: 1.6rem 0;
}

/* ============================================================
   10. 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: center;
    gap: 1rem 1.6rem;
    padding: 1rem 1.4rem;
    background: rgba(11, 17, 32, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(45, 212, 191, 0.35);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
}

.cookie-banner p {
    margin: 0;
    max-width: 78ch;
    color: #CBD5E1;
    font-size: 0.92rem;
}

.cookie-banner .btn {
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
}

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

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

    h1 { font-size: 2.6rem; }
    h2 { font-size: 1.85rem; }

    .hero-title { font-size: 2.7rem; }

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

    .layout-single {
        width: 100%;
    }

    .fp-wide {
        width: 100%;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
        padding-bottom: 60px;
    }

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

    .stat-cell + .stat-cell::before {
        display: none;
    }

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

    .step-row::before {
        display: none;
    }

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

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

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

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

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

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

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

@media (max-width: 600px) {
    body {
        background-size: 280px auto, 600px 500px, auto;
    }

    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.55rem; }
    h3 { font-size: 1.24rem; }

    .hero-title { font-size: 2.1rem; }

    .page-head h1 { font-size: 1.95rem; }

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

    .fp-hero {
        padding-top: 56px;
    }

    .hero-grid {
        padding-bottom: 46px;
    }

    .hero-panel {
        padding: 1.3rem 1.2rem;
    }

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

    .stat-num { font-size: 2.4rem; }

    .fs-cta {
        padding: 2.1rem 1.4rem 2rem;
    }

    .fs-cta h2 { font-size: 1.75rem; }

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

    .error-404 {
        padding: 1.8rem 1.3rem;
    }

    .error-404 .code-404 { font-size: 3.6rem; }

    .comment-respond {
        padding: 1.2rem 1.1rem;
    }

    .comment-body {
        padding: 1rem 1.1rem;
    }

    .sidebar .widget {
        padding: 1.2rem 1.2rem;
    }

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