/*
Theme Name: dds_gea275.com
Author: Павел Зотов
Description: Тема для мультитематического ресурса gea275.com — научная аналитика климатических технологий и каталог игр о спасении планеты. Тёмная океаническая палитра, кораллово-оранжевые акценты, эстетика панели управления климатом.
Version: 1.1
Text Domain: gea275
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ============ ПЕРЕМЕННЫЕ ============ */
:root {
    --bg-deep: #0B2B2B;
    --bg-panel: #1E3E3E;
    --bg-panel-soft: #234747;
    --accent: #FF6B4A;
    --accent-bright: #FF8366;
    --text-main: #F0F6F0;
    --text-soft: #AFC5C5;
    --line: #2F5151;
    --shell: min(92%, 1180px);
    --font-head: 'Archivo', 'Trebuchet MS', sans-serif;
    --font-body: 'Mulish', 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
}

/* ============ БАЗА ============ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .18s ease;
}
a:hover { color: var(--accent-bright); }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.01em;
    color: var(--text-main);
    margin: 0 0 .6em;
}
h1 { font-size: 2.15rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.28rem; }

p { margin: 0 0 1.1em; }

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

blockquote {
    margin: 1.4em 0;
    padding: .8em 1.2em;
    border-left: 3px solid var(--accent);
    background: var(--bg-panel);
    color: var(--text-soft);
    font-style: italic;
}

code, pre {
    font-family: var(--font-mono);
    background: var(--bg-panel);
    border-radius: 6px;
}
code { padding: .12em .4em; font-size: .9em; }
pre { padding: 1em; overflow-x: auto; }
pre code { background: none; padding: 0; }

/* ============ КОНТЕЙНЕР ============ */
.shell {
    width: var(--shell);
    margin-inline: auto;
}

/* ============ ШАПКА ============ */
.site-header {
    background: linear-gradient(180deg, #0E3232 0%, var(--bg-deep) 100%);
    border-bottom: 1px solid var(--line);
}

.co2-line {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg,
        #2F8F6B 0%, #5BB37A 30%, #E0C24A 60%, var(--accent) 100%);
    background-size: 220% 100%;
    animation: co2drift 14s ease-in-out infinite alternate;
}
@keyframes co2drift {
    from { background-position: 0% 0; }
    to { background-position: 100% 0; }
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 0;
    flex-wrap: wrap;
}

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

.brand-logo,
.brand-svg {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: block;
}
.brand-svg {
    border-radius: 10px;
    background: var(--bg-panel);
    padding: 6px;
}

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

.site-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.18rem;
    line-height: 1.3;
    margin: 0;
}
.site-title a { color: var(--text-main); }
.site-title a:hover { color: var(--accent); }

.site-desc {
    margin: 4px 0 0;
    font-size: .82rem;
    color: var(--text-soft);
    line-height: 1.5;
}

/* ============ НАВИГАЦИЯ ============ */
.main-nav {
    border-top: 1px solid var(--line);
    background: var(--bg-deep);
}
.nav-toggle {
    display: none;
    margin: 12px 0;
    padding: 9px 16px;
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--text-main);
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
}
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.nav-menu li { margin: 0; }
.nav-menu a {
    display: block;
    padding: 15px 16px;
    color: var(--text-soft);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .96rem;
    border-bottom: 2px solid transparent;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    color: var(--text-main);
    border-bottom-color: var(--accent);
}

/* ============ РАСКЛАДКИ ============ */
.site-main { padding: 38px 0 56px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 67fr 27fr;
    gap: 6%;
    align-items: start;
}
.layout-with-sidebar .content-area { min-width: 0; }

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

/* ============ САЙДБАР ============ */
.sidebar {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px;
    min-width: 0;
}
.sidebar,
.sidebar a,
.sidebar li { color: var(--text-soft); }
.sidebar a:hover { color: var(--accent); }
.widget { margin-bottom: 26px; }
.widget:last-child { margin-bottom: 0; }
.widget-title,
.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: .7em;
    padding-bottom: .4em;
    border-bottom: 1px solid var(--line);
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar li {
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-size: .94rem;
}
.sidebar li:last-child { border-bottom: none; }
.sidebar .post-date,
.sidebar .rss-date {
    display: block;
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--text-soft);
    opacity: .8;
}

/* ============ КАРТОЧКИ ЗАПИСЕЙ ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.05); }

.card-thumb-placeholder {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(135deg, #214444 0 14px, #1B3B3B 14px 28px);
    color: var(--accent);
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
    min-width: 0;
}
.card-cat {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}
.card-title {
    font-size: 1.18rem;
    margin: 0 0 .4em;
}
.card-title a { color: var(--text-main); }
.card-title a:hover { color: var(--accent); }
.card-meta {
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--text-soft);
    margin-bottom: 10px;
}
.card-excerpt {
    color: var(--text-soft);
    font-size: .95rem;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-more {
    margin-top: auto;
    align-self: flex-start;
    padding: 9px 18px 11px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .85rem;
    color: var(--text-main);
    background: var(--bg-panel-soft);
    border: none;
    border-bottom: 3px solid var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%);
    transition: background .18s ease;
}
.card-more:hover { background: #2C5454; color: var(--text-main); }

/* ============ КОНТЕНТ ЗАПИСИ / СТРАНИЦЫ ============ */
.entry {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 30px 34px;
    margin-bottom: 30px;
}
.entry-header { margin-bottom: 18px; }
.entry-title { font-size: 2rem; }
.entry-meta {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-soft);
    margin-top: 6px;
}
.entry-thumb {
    margin: 0 0 22px;
    border-radius: 10px;
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.5em; }
.entry-content a { text-decoration: underline; }

/* ============ ТАБЛИЦЫ ============ */
.entry-content table,
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--line);
}
th, td {
    border: 1px solid var(--line);
    padding: 10px 13px;
    text-align: left;
}
th {
    background: var(--bg-panel-soft);
    font-family: var(--font-head);
}

/* ============ ХЛЕБНЫЕ КРОШКИ ============ */
.breadcrumbs {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--text-soft);
    margin-bottom: 22px;
}
.breadcrumbs a { color: var(--text-soft); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 7px; color: var(--accent); }
.breadcrumbs span:last-child { color: var(--text-main); }

/* ============ ЗАГОЛОВКИ СЕКЦИЙ ============ */
.page-heading {
    font-size: 2rem;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--line);
}
.page-heading::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    background: var(--accent);
    margin-top: 12px;
}

/* ============ ГЛАВНАЯ ============ */
.home-wrap { width: 85%; margin-inline: auto; }

.hero {
    background:
        radial-gradient(circle at 80% 10%, rgba(255,107,74,.16), transparent 55%),
        var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 48px 44px;
    margin-bottom: 38px;
}
.hero .kicker {
    font-family: var(--font-mono);
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.hero h1 { font-size: 2.5rem; max-width: 22ch; }
.hero p {
    color: var(--text-soft);
    max-width: 62ch;
    font-size: 1.05rem;
}
.cta {
    display: inline-block;
    margin-top: 14px;
    padding: 13px 30px 16px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: .95rem;
    color: var(--text-main);
    background: var(--bg-deep);
    border-bottom: 3px solid var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 20px 100%);
}
.cta:hover { background: #0F3636; color: var(--text-main); }

.home-section { margin-bottom: 44px; }
.home-section > h2 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}
.home-section .section-lead {
    color: var(--text-soft);
    margin-bottom: 22px;
}

.feature-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}
.feature {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px 22px;
    min-width: 0;
}
.feature .feature-ico {
    width: 42px; height: 42px;
    margin-bottom: 12px;
    color: var(--accent);
}
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--text-soft); font-size: .94rem; margin: 0; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    counter-reset: step;
}
.step {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    border-radius: 40px 12px 12px 12px;
    padding: 22px 20px;
    min-width: 0;
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    margin-bottom: 12px;
    font-family: var(--font-head);
    font-weight: 800;
    color: var(--bg-deep);
    background: var(--accent);
    border-radius: 50%;
}
.step h3 { font-size: 1.04rem; }
.step p { color: var(--text-soft); font-size: .9rem; margin: 0; }

/* ============ СЛАЙДЕР ============ */
.slider {
    position: relative;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}
.slides {
    display: flex;
    transition: transform .5s ease;
}
.slide {
    flex: 0 0 100%;
    min-width: 0;
    padding: 40px 44px;
}
.slide .slide-tag {
    font-family: var(--font-mono);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}
.slide h3 { font-size: 1.5rem; margin: 10px 0; }
.slide p { color: var(--text-soft); margin: 0; max-width: 60ch; }
.slider-dots {
    display: flex;
    gap: 9px;
    justify-content: center;
    padding: 0 0 20px;
}
.slider-dot {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: none;
    background: var(--line);
    cursor: pointer;
    padding: 0;
    transition: background .2s ease, box-shadow .2s ease;
}
.slider-dot.is-active {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(255,107,74,.22);
}

/* ============ ПАГИНАЦИЯ ============ */
.pagination {
    margin: 34px 0 0;
}
/* paginate_links(type=list) даёт <ul class="page-numbers">,
   и внутренним ссылкам — тот же класс page-numbers.
   Контейнер делаем flex-строкой, оформляем только элементы в <li>. */
.pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.pagination li {
    margin: 0;
}
.pagination li .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-family: var(--font-mono);
    font-size: .9rem;
    color: var(--text-soft);
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.pagination li a.page-numbers:hover {
    color: var(--text-main);
    border-color: var(--accent);
}
.pagination li .page-numbers.current {
    color: var(--bg-deep);
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
}
.pagination li .page-numbers.dots {
    background: transparent;
    border-color: transparent;
}

/* ============ КОММЕНТАРИИ ============ */
.comments-area {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 26px 30px;
}
.comments-title { font-size: 1.4rem; }
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list ul.children {
    list-style: none;
    margin: 0;
    padding-left: 28px;
}
.comment-body {
    padding: 16px 0;
    border-bottom: 1px dashed var(--line);
}
.comment-author { font-family: var(--font-head); font-weight: 700; }
.comment-meta {
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--text-soft);
}
.comment-respond {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-field {
    width: 100%;
    padding: 11px 13px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: .95rem;
}
.comment-form textarea { min-height: 130px; }
.comment-form p { margin-bottom: 12px; }
.comment-form .form-submit input,
.search-submit,
.btn {
    padding: 11px 26px;
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--bg-deep);
    background: var(--accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .18s ease;
}
.comment-form .form-submit input:hover,
.search-submit:hover,
.btn:hover { background: var(--accent-bright); }

/* ============ ФОРМА ПОИСКА ============ */
.search-form {
    display: flex;
    gap: 8px;
}
.search-form .search-field { flex: 1; min-width: 0; }

/* ============ 404 ============ */
.error-404 {
    text-align: center;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 54px 34px;
}
.error-404 .big {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 5rem;
    color: var(--accent);
    line-height: 1;
}
.error-404 .search-form {
    max-width: 420px;
    margin: 22px auto 0;
}

/* ============ ПОДВАЛ ============ */
.site-footer {
    background: #082020;
    border-top: 1px solid var(--line);
    padding-top: 44px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
    padding-bottom: 36px;
}
.footer-col { min-width: 0; }
.footer-col,
.footer-col p,
.footer-col li { color: var(--text-soft); }
.footer-col a { color: var(--text-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-col .widget-title {
    color: var(--text-main);
    font-size: 1.02rem;
    margin-bottom: .7em;
    padding-bottom: .4em;
    border-bottom: 1px solid var(--line);
}
.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-col li { padding: 6px 0; font-size: .92rem; }

.footer-scheme {
    display: flex;
    justify-content: center;
    gap: 46px;
    padding: 26px 0;
    border-top: 1px solid var(--line);
}
.scheme-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.scheme-node svg {
    width: 40px; height: 40px;
    color: var(--accent);
    animation: spin 18s linear infinite;
}
.scheme-node:nth-child(2) svg { animation-duration: 24s; animation-direction: reverse; }
.scheme-node:nth-child(3) svg { animation-duration: 30s; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-copy {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    font-size: .84rem;
    color: var(--text-soft);
}

/* ============ COOKIE-БАННЕР ============ */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 22px;
    background: #061A1A;
    border-top: 2px solid var(--accent);
}
.cookie-banner p {
    margin: 0;
    color: var(--text-soft);
    font-size: .9rem;
    max-width: 70ch;
}
.cookie-accept {
    padding: 10px 24px;
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--bg-deep);
    background: var(--accent);
    border: none;
    border-radius: 40px;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--accent-bright); }

/* ============ АДАПТИВ ============ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 30px; }
    .layout-single .content-area,
    .home-wrap { width: 100%; }
    .feature-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero h1 { font-size: 2rem; }
    .hero { padding: 36px 28px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .card-grid { grid-template-columns: 1fr; }
    .feature-cols,
    .steps { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; gap: 26px; }
    .footer-scheme { gap: 26px; flex-wrap: wrap; }
    .entry { padding: 22px 20px; }
    .slide { padding: 28px 24px; }
    .header-inner { flex-direction: column; align-items: flex-start; }
    .nav-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        padding-bottom: 10px;
    }
    .nav-menu.is-open { display: flex; }
    .nav-menu a { padding: 12px 4px; }
    .hero h1 { font-size: 1.7rem; }
}
