/*
Theme Name: dds_ekoplant-vakansii.rf
Author: Раиса Корнилова
Description: Информационная тема о питомниках и ландшафтной сфере: саженцы, посадка, полив, адаптация растений, сезонность и навыки для работы в отрасли.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ekoplant
*/

/* ============ Базовые переменные и сброс ============ */
:root {
    --green-900: #14351f;
    --green-800: #1b4d2e;
    --green-700: #256b40;
    --green-600: #2e7d4f;
    --green-500: #3d9163;
    --leaf-400: #6fae5f;
    --leaf-300: #9ac47f;
    --sand-100: #f3f0e6;
    --bg: #f6f9f2;
    --surface: #ffffff;
    --ink: #26302a;
    --ink-soft: #52605a;
    --line: #dfe6d8;
    --accent: #c8862a;
    --shadow: 0 6px 22px rgba(20, 53, 31, 0.08);
    --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
    overflow-x: hidden;
}

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

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--green-900); margin: 0 0 0.6em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }

/* Контейнер ширины — единый источник (A12.7) */
.shell {
    width: min(92%, 1180px);
    margin-inline: auto;
}

/* ============ Шапка ============ */
.site-header {
    background: var(--surface);
    border-bottom: 3px solid var(--green-600);
    box-shadow: 0 2px 10px rgba(20, 53, 31, 0.05);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.brand-logo, .brand-logo svg { display: block; width: 54px; height: 54px; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name { font-size: 1.2rem; font-weight: 700; color: var(--green-800); line-height: 1.2; display: block; }
.brand-name a { color: inherit; }
.brand-desc { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    margin: 0;
    padding: 0;
}
.main-nav a {
    color: var(--green-800);
    font-weight: 600;
    padding: 0.35rem 0.2rem;
    display: inline-block;
}
.main-nav a:hover { color: var(--green-600); text-decoration: none; }
.main-nav .current-menu-item > a { color: var(--green-600); border-bottom: 2px solid var(--leaf-400); }

.nav-toggle {
    display: none;
    background: var(--green-700);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 1rem;
    cursor: pointer;
}

/* ============ Основной макет ============ */
.site-main { padding: 2rem 0 3rem; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 2.4rem;
    align-items: start;
}
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
@media (max-width: 960px) {
    .layout-single .content-area { width: 100%; }
}

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

/* ============ Хлебные крошки ============ */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--ink-soft);
    margin: 0 0 1.4rem;
    padding: 0.6rem 0;
}
.breadcrumbs a { color: var(--green-700); }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--leaf-400); }

/* ============ Карточки записей ============ */
.card-list { display: flex; flex-direction: column; gap: 1.6rem; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    background: var(--sand-100);
}
.card-thumb-wrap a { display: block; }
.card-thumb-wrap img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.card-body {
    flex: 1;
    padding: 1.3rem 1.5rem 1.6rem;
    min-width: 0;
}
.card-title { font-size: 1.3rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--green-900); }
.card-title a:hover { color: var(--green-600); text-decoration: none; }
.card-meta { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.8rem; }
.card-meta a { color: var(--ink-soft); }
.card-excerpt { color: var(--ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    display: inline-block;
    margin-top: 0.7rem;
    font-weight: 600;
    color: var(--green-600);
}
.card-more:hover { text-decoration: none; color: var(--green-800); }

/* Горизонтальные карточки на широких экранах */
@media (min-width: 720px) {
    .card { flex-direction: row; }
    .card-thumb-wrap {
        flex: 0 0 300px;
        position: relative;
    }
    .card-thumb-wrap a {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
    }
    .card-thumb-wrap img { width: 100%; height: 100%; }
}
@media (max-width: 600px) {
    .card-thumb-wrap { flex: none; width: 100%; position: static; }
    .card-thumb-wrap a { position: static; }
    .card-thumb-wrap img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}

/* ============ Одиночная запись / страница ============ */
.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    box-shadow: var(--shadow);
}
.entry-header { margin-bottom: 1.2rem; }
.entry-title { font-size: 1.9rem; }
.entry-meta { font-size: 0.83rem; color: var(--ink-soft); }
.entry-thumb { margin: 0 0 1.5rem; border-radius: 10px; overflow: hidden; }
.entry-thumb img { width: 100%; display: block; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 1.1rem 1.4rem;
    background: var(--sand-100);
    border-left: 4px solid var(--leaf-400);
    border-radius: 8px;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}
.entry-content table th,
.entry-content table td {
    border: 1px solid var(--line);
    padding: 0.6rem 0.8rem;
    text-align: left;
}
.entry-content table th { background: var(--sand-100); }

@media (max-width: 600px) {
    .entry { padding: 1.4rem 1.2rem; }
}

/* ============ Сайдбар и виджеты ============ */
.sidebar { min-width: 0; }
.widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.widget-title {
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--leaf-300);
    color: var(--green-800);
}
.sidebar .widget { color: var(--ink); }
.sidebar .widget a { color: var(--green-700); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 0.45rem 0; border-bottom: 1px dashed var(--line); }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget .post-date { display: block; font-size: 0.76rem; color: var(--ink-soft); }

/* ============ Подвал ============ */
.site-footer {
    background: var(--green-900);
    color: #d6e4d3;
    margin-top: 3rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 2.6rem 0 2rem;
}
.footer-cols .widget {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: #d6e4d3;
}
.footer-cols .widget-title { color: #ffffff; border-bottom-color: var(--green-600); }
.footer-cols .widget a { color: #bcd6b7; }
.footer-cols .widget a:hover { color: #ffffff; }
.footer-cols .widget ul { list-style: none; margin: 0; padding: 0; }
.footer-cols .widget li { padding: 0.35rem 0; }
.footer-cols .widget .post-date { display: block; font-size: 0.76rem; color: #93b28f; }
.site-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.2rem 0;
    font-size: 0.85rem;
    color: #9fbb9b;
    text-align: center;
}

/* ============ Пагинация (type => plain, .page-numbers) ============ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 2.2rem 0 0;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--green-800);
    font-weight: 600;
    text-decoration: none;
}
.pagination a.page-numbers:hover { background: var(--sand-100); border-color: var(--leaf-400); text-decoration: none; }
.pagination .page-numbers.current {
    background: var(--green-600);
    border-color: var(--green-600);
    color: #fff;
}
.pagination .page-numbers.dots { border: 0; background: none; }

/* ============ Форма поиска ============ */
.search-form { display: flex; gap: 0.5rem; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
}
.search-form button {
    padding: 0.6rem 1.1rem;
    border: 0;
    border-radius: 8px;
    background: var(--green-600);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.search-form button:hover { background: var(--green-700); }

/* ============ Главная ============ */
.home-wrap { width: 85%; margin-inline: auto; }
@media (max-width: 960px) { .home-wrap { width: 100%; } }

.front-section { padding: 2.8rem 0; }
.front-section + .front-section { border-top: 1px solid var(--line); }

/* Блок: текст + иллюстрация */
.fs-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.4rem;
    align-items: center;
}
.fs-split.reverse .fs-split-media { order: 2; }
.fs-split-media img, .fs-split-media svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}
.fs-split-text h2 { font-size: 1.7rem; }
@media (max-width: 720px) {
    .fs-split { grid-template-columns: 1fr; }
    .fs-split.reverse .fs-split-media { order: 0; }
}

/* Блок: сетка карточек-направлений */
.section-head { text-align: center; max-width: 760px; margin: 0 auto 2rem; }
.section-head p { color: var(--ink-soft); }
.dir-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
}
.dir-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.dir-card .dir-icon {
    width: 56px; height: 56px;
    margin: 0 auto 0.9rem;
    display: block;
}
.dir-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.dir-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 960px) { .dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .dir-grid { grid-template-columns: 1fr; } }

/* Блок: пошаговый (сезоны) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.3rem 1.4rem;
    position: relative;
    box-shadow: var(--shadow);
}
.step .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.7rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: 0.35rem; }
.step p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 960px) { .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .steps-grid { grid-template-columns: 1fr; } }

/* Блок: последние записи на главной */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 1.6rem;
}
.latest-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.latest-card .latest-thumb { display: block; overflow: hidden; background: var(--sand-100); }
.latest-card .latest-thumb img {
    width: 100%; height: 190px; object-fit: cover; display: block;
}
.latest-card .latest-body { flex: 1; padding: 1.1rem 1.2rem 1.3rem; min-width: 0; }
.latest-card h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.latest-card h3 a { color: var(--green-900); }
.latest-card .latest-meta { font-size: 0.76rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.latest-card .card-excerpt { font-size: 0.92rem; }
.latest-card .card-excerpt p { margin: 0 0 0.4em; background: none; }
@media (max-width: 960px) { .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .latest-grid { grid-template-columns: 1fr; } }

/* Блок: CTA */
.fs-cta {
    background: linear-gradient(135deg, var(--green-800), var(--green-600));
    color: #eaf5e6;
    padding: 2.8rem 2.4rem;
    border-radius: 16px;
    text-align: center;
}
.fs-cta h2 { color: #fff; }
.fs-cta p { color: #d8ecd3; max-width: 620px; margin-left: auto; margin-right: auto; }
.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.8rem;
    background: #fff;
    color: var(--green-800);
    border-radius: 30px;
    font-weight: 700;
}
.btn:hover { background: var(--sand-100); text-decoration: none; }
@media (max-width: 600px) { .fs-cta { padding: 2rem 1.4rem; } }

/* Галерея / мозаика */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-grid img { display: block; width: 100%; height: 200px; object-fit: cover; }
@media (max-width: 720px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .gallery-grid { grid-template-columns: 1fr; } }

/* ============ 404 ============ */
.error-404 {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow);
}
.error-404 .big { font-size: 4rem; color: var(--leaf-400); margin: 0; }
.error-404 .search-form { max-width: 420px; margin: 1.6rem auto 0; }

/* ============ Cookie-баннер ============ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--green-900);
    color: #e6f0e2;
    padding: 1rem 1.2rem;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 900px; }
.cookie-banner a { color: var(--leaf-300); }
.cookie-accept {
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: var(--leaf-400);
    color: var(--green-900);
    font-weight: 700;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
}
.cookie-accept:hover { background: var(--leaf-300); }

/* ============ Адаптив шапки ============ */
@media (max-width: 780px) {
    .nav-toggle { display: inline-block; }
    .main-nav {
        flex-basis: 100%;
        order: 3;
        display: none;
    }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--line); }
    .main-nav a { display: block; padding: 0.7rem 0.2rem; }
}
