/*
Theme Name: dds_teamfiveinc.com
Author: Анна Соболева
Description: Информационная тема для проекта по подбору недвижимости для социального предпринимательства и импакт-проектов.
Version: 1.1
Text Domain: impspace
*/

/* ============ Переменные ============ */
:root {
    --clr-bg: #f6f4ef;
    --clr-surface: #ffffff;
    --clr-ink: #23291f;
    --clr-muted: #5f665a;
    --clr-primary: #2c5f5a;
    --clr-primary-dk: #1f4642;
    --clr-accent: #c9733a;
    --clr-accent-dk: #a95c2a;
    --clr-line: #dfdbd2;
    --clr-dark: #1c2521;
    --clr-dark-soft: #26332d;
    --radius: 12px;
    --shadow: 0 6px 22px rgba(28, 37, 33, 0.08);
    --shell: min(92%, 1180px);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============ База ============ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--clr-ink);
    background: var(--clr-bg);
    overflow-x: hidden;
}

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

a { color: var(--clr-primary); }
a:hover { color: var(--clr-accent); }

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

p { margin: 0 0 1.1em; }

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

/* ============ Шапка ============ */
.site-header {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
}
.brand-logo, .brand-mark {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    display: block;
}
.brand-text { min-width: 0; }
.brand-name {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--clr-ink);
    line-height: 1.3;
    display: block;
}
.brand-desc {
    font-size: 0.78rem;
    color: var(--clr-muted);
    display: block;
    margin-top: 2px;
}

/* ============ Навигация ============ */
.main-nav { width: 100%; }
.nav-toggle {
    display: none;
    background: var(--clr-primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
    cursor: pointer;
}
.menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
}
.menu a {
    text-decoration: none;
    color: var(--clr-ink);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 0.35rem 0;
    display: inline-block;
    border-bottom: 2px solid transparent;
}
.menu a:hover { color: var(--clr-primary); border-bottom-color: var(--clr-accent); }

/* ============ Раскладка ============ */
.site-main { padding: 2.4rem 0 3rem; }

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

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

/* ============ Хлебные крошки ============ */
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--clr-muted);
    margin-bottom: 1.6rem;
}
.breadcrumbs a { color: var(--clr-primary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--clr-accent); }
.breadcrumbs .sep { margin: 0 0.35rem; color: var(--clr-line); }

/* ============ Карточки записей ============ */
.card {
    display: flex;
    flex-direction: column;
    background: var(--clr-surface);
    border: 1px solid var(--clr-line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.6rem;
    box-shadow: var(--shadow);
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
}
.card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.card-thumb-wrap:hover img { transform: scale(1.04); }
.card-body {
    flex: 1;
    padding: 1.3rem 1.5rem 1.5rem;
    min-width: 0;
}
.card-title { font-size: 1.3rem; margin: 0 0 0.5rem; }
.card-title a { color: var(--clr-ink); text-decoration: none; }
.card-title a:hover { color: var(--clr-primary); }
.card-meta {
    font-size: 0.82rem;
    color: var(--clr-muted);
    margin-bottom: 0.7rem;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.read-more {
    display: inline-block;
    margin-top: 0.6rem;
    font-weight: 600;
    color: var(--clr-accent);
    text-decoration: none;
}
.read-more:hover { color: var(--clr-accent-dk); }

/* Горизонтальная карточка (последние записи на главной) */
.post-row {
    display: flex;
    flex-direction: column;
    background: var(--clr-surface);
    border: 1px solid var(--clr-line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-width: 0;
}
.post-row .card-body { padding: 1.2rem 1.3rem 1.4rem; }

/* ============ Сайдбар / виджеты ============ */
.sidebar {
    min-width: 0;
    background: var(--clr-surface);
    border: 1px solid var(--clr-line);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
}
.sidebar .widget { margin-bottom: 1.8rem; }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title {
    font-size: 1.05rem;
    color: var(--clr-ink);
    margin: 0 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--clr-accent);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin-bottom: 0.7rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--clr-line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--clr-ink); text-decoration: none; }
.sidebar a:hover { color: var(--clr-primary); }
.sidebar .post-date, .sidebar .rss-date { color: var(--clr-muted); font-size: 0.8rem; }

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

/* ============ Записи и страницы ============ */
.entry {
    background: var(--clr-surface);
    border: 1px solid var(--clr-line);
    border-radius: var(--radius);
    padding: 1.8rem 2rem 2rem;
    box-shadow: var(--shadow);
}
.entry-title { font-size: 1.9rem; margin-bottom: 0.6rem; }
.entry-meta { font-size: 0.85rem; color: var(--clr-muted); margin-bottom: 1.4rem; }
.entry-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 1.4rem; }
.entry-thumb img { width: 100%; display: block; }
.entry-content { min-width: 0; }
.entry-content img { border-radius: 8px; }
.entry-content h2 { margin-top: 1.6rem; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4rem 0;
}
.entry-content table, .entry-content th, .entry-content td {
    border: 1px solid var(--clr-line);
}
.entry-content th, .entry-content td { padding: 0.6rem 0.8rem; text-align: left; }
.entry-content th { background: #eef0ea; }

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

/* ============ Главная ============ */
.home-wrap { width: 85%; margin-inline: auto; }
.front-section { padding: 2.8rem 0; }

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

/* Блок: сетка карточек-направлений */
.fs-heading { text-align: center; margin-bottom: 1.8rem; }
.fs-heading p { color: var(--clr-muted); max-width: 640px; margin-inline: auto; }
.tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}
.tile {
    background: var(--clr-surface);
    border: 1px solid var(--clr-line);
    border-radius: var(--radius);
    padding: 1.6rem 1.5rem;
    box-shadow: var(--shadow);
    min-width: 0;
}
.tile-ico {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e4efe9;
    color: var(--clr-primary);
    margin-bottom: 1rem;
}
.tile h3 { margin-bottom: 0.5rem; }
.tile p { margin: 0; color: var(--clr-muted); font-size: 0.96rem; }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } }

/* Блок: последние записи */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 1.8rem;
}
@media (max-width: 860px) { .latest-grid { grid-template-columns: 1fr; } }

/* Блок: шаги */
.steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.4rem;
    counter-reset: step;
}
.step {
    background: var(--clr-surface);
    border: 1px solid var(--clr-line);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem;
    min-width: 0;
    position: relative;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--clr-accent);
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.step p { margin: 0; color: var(--clr-muted); font-size: 0.94rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* Блок: CTA */
.fs-cta {
    background: var(--clr-primary);
    color: #eef4f1;
    border-radius: var(--radius);
    padding: 2.6rem 2.4rem;
    text-align: center;
}
.fs-cta h2 { color: #fff; }
.fs-cta p { color: #d3e2dc; max-width: 640px; margin-inline: auto; margin-bottom: 1.6rem; }
.cta-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border-radius: 9px;
    font-weight: 700;
    text-decoration: none;
}
.btn-accent { background: var(--clr-accent); color: #fff; }
.btn-accent:hover { background: var(--clr-accent-dk); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); color: #fff; }
@media (max-width: 600px) {
    .fs-cta { padding: 1.9rem 1.4rem; }
    .front-section { padding: 2rem 0; }
    .home-wrap { width: 100%; }
}

.section-heading { font-size: 1.7rem; text-align: center; margin-bottom: 0.4rem; }

/* ============ 404 ============ */
.notfound { text-align: center; padding: 2rem 0; }
.notfound h1 { font-size: 3.4rem; color: var(--clr-primary); margin-bottom: 0.3rem; }
.notfound .search-form { max-width: 440px; margin: 1.6rem auto 0; }

/* ============ Подвал ============ */
.site-footer {
    background: var(--clr-dark);
    color: #cdd6cf;
    padding: 2.8rem 0 1.4rem;
    margin-top: 2rem;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; gap: 1.6rem; } }

.site-footer .widget-title {
    color: #ffffff;
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
}
.site-footer .widget { min-width: 0; }
.site-footer p { color: #cdd6cf; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a { color: #e7ede8; text-decoration: none; }
.site-footer a:hover { color: var(--clr-accent); }
.site-footer .post-date, .site-footer .rss-date { color: #9aa89e; font-size: 0.8rem; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 2rem;
    padding-top: 1.2rem;
    font-size: 0.85rem;
    color: #9aa89e;
    text-align: center;
}

/* ============ Cookie-баннер ============ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    background: var(--clr-dark-soft);
    color: #e7ede8;
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.28);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 720px;
    margin-inline: auto;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; flex: 1; min-width: 220px; }
.cookie-banner a { color: var(--clr-accent); }
.cookie-accept {
    background: var(--clr-accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0.6rem 1.3rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--clr-accent-dk); }

/* ============ Адаптивная навигация ============ */
@media (max-width: 760px) {
    .nav-toggle { display: inline-block; }
    .menu {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 0.8rem;
    }
    .menu.is-open { display: flex; }
    .menu li { border-bottom: 1px solid var(--clr-line); }
    .menu a { padding: 0.7rem 0; display: block; }
}
