/*
Theme Name: dds_igraphartwork.com
Author: Михаил Ковалёв
Description: Информационная тема персонального бренда риелтора и агентства недвижимости с дизайнерским взглядом на подачу объектов. Редакторская эстетика, тёплая палитра, адаптивная вёрстка.
Version: 1.2
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: igart
*/

/* ============================ Токены ============================ */
:root {
    --ink: #1b1c20;
    --ink-soft: #3c3d43;
    --muted: #6f6d67;
    --bg: #f5f1ea;
    --surface: #ffffff;
    --surface-2: #efe8dc;
    --accent: #a5673f;
    --accent-deep: #7d4a2c;
    --line: #e4ddd0;
    --footer-bg: #1e1f24;
    --footer-text: #cbc6bb;
    --footer-title: #ffffff;
    --serif: Georgia, "Times New Roman", serif;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius: 12px;
    --shadow: 0 14px 40px rgba(27, 28, 32, 0.08);
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
    font-family: var(--serif);
    color: var(--ink);
    line-height: 1.2;
    font-weight: 600;
    margin: 0 0 0.6em;
}

h1 { font-size: 2.15rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p {
    margin: 0 0 1.1em;
}

a {
    color: var(--accent-deep);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

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

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

/* ============================ Кнопки ============================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    line-height: 1.2;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

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

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

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

.eyebrow {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.eyebrow.center,
.center {
    text-align: center;
}

/* ============================ Шапка ============================ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: relative;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 0;
    flex-wrap: wrap;
}

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

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

.brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.site-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.primary-nav {
    flex-shrink: 0;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
}

.nav-list a {
    color: var(--ink);
    font-weight: 500;
    font-size: 0.98rem;
    padding: 0.3rem 0;
    position: relative;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.nav-list a:hover::after,
.nav-list .current-menu-item > a::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    padding: 0 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================ Главная ============================ */
.front {
    width: min(90%, 1180px);
    margin-inline: auto;
    padding: 3rem 0 4rem;
}

.fs {
    margin-bottom: 4.5rem;
}

.fs:last-child {
    margin-bottom: 0;
}

/* Слайдер */
.slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface-2);
}

.slides {
    position: relative;
    aspect-ratio: 16 / 8;
}

.slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.4rem 2.2rem;
    background: linear-gradient(to top, rgba(24, 20, 16, 0.72), rgba(24, 20, 16, 0));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.slide-kicker {
    font-size: 0.76rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #e9c9ac;
    font-weight: 700;
}

.slide-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    line-height: 1.25;
    max-width: 26ch;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.slider-btn:hover { background: #fff; }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }

.slider-dots {
    position: absolute;
    bottom: 1rem;
    right: 1.6rem;
    display: flex;
    gap: 0.5rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
}

.slider-dot.is-active {
    background: #fff;
}

/* Текст + иллюстрация */
.fs-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.split-text h2 {
    font-size: 2rem;
}

.split-media img {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Последние записи */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
}

.section-head h2 {
    margin: 0;
}

.section-link {
    font-weight: 600;
    white-space: nowrap;
}

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

/* Шаги */
.fs-steps > .eyebrow,
.fs-steps > h2 {
    display: block;
    text-align: center;
}

.fs-steps > h2 {
    margin-bottom: 2.2rem;
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}

.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 1.6rem;
    min-width: 0;
}

.step-num {
    font-family: var(--serif);
    font-size: 1.6rem;
    color: var(--accent);
    font-weight: 700;
    display: block;
    margin-bottom: 0.6rem;
}

.step h3 {
    font-size: 1.12rem;
    margin-bottom: 0.4rem;
}

.step p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* CTA */
.fs-cta .cta-inner {
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: 3rem 2.6rem;
    text-align: center;
}

.fs-cta h2 {
    color: #fff;
    font-size: 1.9rem;
    max-width: 22ch;
    margin-inline: auto;
}

.fs-cta p {
    color: #d9d5cd;
    max-width: 48ch;
    margin-inline: auto;
    margin-bottom: 1.6rem;
}

.cta-actions {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}

.fs-cta .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

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

/* ============================ Раскладки ============================ */
.page-wrap {
    padding: 2rem 0 4rem;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    gap: 2.6rem;
    align-items: start;
}

.layout-single {
    display: block;
}

.layout-single .content-area {
    max-width: 860px;
    margin-inline: auto;
}

/* ============================ Хлебные крошки ============================ */
.breadcrumbs {
    font-size: 0.86rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
}

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

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

.breadcrumbs .sep {
    color: var(--line);
    margin: 0 0.15rem;
}

/* ============================ Карточки записей ============================ */
.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
}

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

.card-thumb {
    display: block;
}

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

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

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

.card-cat a {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.74rem;
}

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

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

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

.card-excerpt {
    color: var(--ink-soft);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

.card-more {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.92rem;
}

.empty-note {
    color: var(--muted);
}

/* ============================ Архивы / заголовки ============================ */
.archive-head {
    margin-bottom: 2rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--line);
}

.archive-head h1 {
    margin-bottom: 0.4rem;
}

.archive-desc {
    color: var(--ink-soft);
}

/* ============================ Запись / страница ============================ */
.post-head {
    margin-bottom: 1.4rem;
}

.post-meta,
.card-meta {
    font-size: 0.85rem;
}

.post-meta {
    display: flex;
    gap: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-cat a {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.76rem;
}

.post-title {
    font-size: 2.3rem;
}

.post-cover {
    margin: 0 0 1.8rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-cover img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.post-content {
    font-size: 1.05rem;
    color: var(--ink-soft);
}

.post-content h2,
.post-content h3 {
    color: var(--ink);
    margin-top: 1.6em;
}

.post-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content img {
    border-radius: 8px;
    height: auto;
}

.post-content blockquote {
    margin: 1.6em 0;
    padding: 1.4rem 1.6rem;
    background: var(--surface-2);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.15rem;
}

.post-content blockquote p {
    margin: 0;
}

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

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}

.post-content table,
.post-content th,
.post-content td {
    border: 1px solid var(--line);
}

.post-content th,
.post-content td {
    padding: 0.7rem 0.9rem;
    text-align: left;
}

.post-content th {
    background: var(--surface-2);
    font-family: var(--sans);
    font-weight: 700;
}

.post-tags {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-chip {
    background: var(--surface-2);
    color: var(--ink-soft);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

.tag-chip:hover {
    background: var(--accent);
    color: #fff;
}

.page-links {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* ============================ Сайдбар ============================ */
.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.6rem;
    color: var(--ink);
}

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

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

.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
}

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

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

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

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

/* ============================ Пагинация (type=plain → .page-numbers) ============================ */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 2.5rem;
    justify-content: center;
}

.pager .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(--ink);
    font-weight: 600;
    font-size: 0.95rem;
}

.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

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

/* ============================ Формы (поиск/комментарии) ============================ */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 420px;
}

.search-field {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
}

.search-submit {
    padding: 0.7rem 1.3rem;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.search-submit:hover {
    background: var(--accent-deep);
}

/* Комментарии */
.comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.comments-title {
    font-size: 1.4rem;
    margin-bottom: 1.4rem;
}

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

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

.comment-inner {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 700;
}

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

.comment-await {
    font-size: 0.85rem;
    color: var(--accent);
}

.comment-form {
    max-width: 640px;
}

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

.comment-form label {
    display: block;
    font-size: 0.9rem;
    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;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--ink);
}

.comment-form textarea {
    min-height: 130px;
    resize: vertical;
}

/* ============================ 404 ============================ */
.error-404 {
    text-align: center;
    padding: 2rem 0;
}

.error-code {
    font-family: var(--serif);
    font-size: 5rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    line-height: 1;
}

.error-404 .search-form {
    margin: 1.5rem auto;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 2rem 0;
}

.empty-state .search-form {
    margin: 1.4rem auto 0;
}

/* ============================ Подвал ============================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: 3rem;
    padding-top: 3rem;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding-bottom: 2.5rem;
}

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

.footer-col .widget {
    color: var(--footer-text);
    margin-bottom: 1.4rem;
}

.footer-col .widget-title {
    color: var(--footer-title);
    font-size: 1.1rem;
    margin: 0 0 0.9rem;
}

.footer-col .widget p,
.footer-col .widget li,
.footer-col .textwidget {
    color: var(--footer-text);
}

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

.footer-col .widget li {
    padding: 0.35rem 0;
}

.footer-col .widget a {
    color: var(--footer-text);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.4rem 0;
}

.copyright {
    margin: 0;
    font-size: 0.86rem;
    color: var(--footer-text);
}

/* ============================ Cookie-баннер ============================ */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    max-width: 720px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--ink);
    color: #fff;
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.cookie-text {
    margin: 0;
    font-size: 0.9rem;
    color: #e6e2da;
    min-width: 0;
}

.cookie-accept {
    flex-shrink: 0;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.cookie-accept:hover {
    background: var(--accent-deep);
}

/* ============================ Адаптив ============================ */
@media (max-width: 960px) {
    .fs-split {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }
    .split-media {
        order: -1;
    }
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }
    .sidebar {
        border-top: 1px solid var(--line);
        padding-top: 1.5rem;
    }
    .footer-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }
    h1 { font-size: 1.8rem; }
    .post-title { font-size: 1.7rem; }

    .nav-toggle {
        display: flex;
    }
    .primary-nav {
        flex-basis: 100%;
        display: none;
    }
    .primary-nav.is-open {
        display: block;
    }
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding-top: 0.6rem;
    }
    .nav-list li {
        border-top: 1px solid var(--line);
    }
    .nav-list a {
        display: block;
        padding: 0.75rem 0;
    }
    .brand {
        flex: 1 1 auto;
    }

    .cards-grid,
    .steps,
    .footer-cols {
        grid-template-columns: 1fr;
    }

    .slides {
        aspect-ratio: 4 / 5;
    }
    .slide-title {
        font-size: 1.15rem;
    }
    .slide-cap {
        padding: 1.4rem 1.2rem;
    }

    .fs-cta .cta-inner {
        padding: 2rem 1.4rem;
    }
    .fs-cta h2 {
        font-size: 1.5rem;
    }
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
