/*
Theme Name: dds_gwendal-sartre.com
Author: Гвендаль Сартр
Description: Кураторская тема о доме как произведении искусства: эксклюзивная недвижимость, коллекционный дизайн, инсталляции и скульптура для резиденций.
Version: 1.2
Text Domain: gsartre
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ============================ Токены ============================ */
:root {
    --ink:        #16130d;
    --ink-soft:   #3a352b;
    --muted:      #6f685b;
    --paper:      #f4efe6;
    --paper-2:    #ebe3d5;
    --paper-3:    #e2d8c6;
    --line:       #d7cbb5;
    --accent:     #9a7842;
    --accent-dk:  #7a5d30;
    --dark:       #1c1912;
    --dark-2:     #262119;
    --white:      #fbf8f2;
    --shell:      min(92%, 1180px);
    --serif:      Georgia, "Times New Roman", "PT Serif", serif;
    --sans:       "Helvetica Neue", Arial, "Segoe UI", system-ui, sans-serif;
}

/* ============================ Сброс ============================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dk); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.22;
    color: var(--ink);
    margin: 0 0 .6em;
    letter-spacing: .2px;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

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

/* ============================ Шапка ============================ */
.site-head {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.head-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.1rem 0;
    min-width: 0;
}
.brand { display: flex; align-items: center; gap: .95rem; min-width: 0; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 52px; width: auto; }
.brand-svg { display: block; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: var(--serif);
    font-size: 1.28rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.1;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46vw;
}
.brand-tag {
    display: block;
    font-size: .74rem;
    color: var(--muted);
    letter-spacing: .5px;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46vw;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .5rem .65rem;
    cursor: pointer;
    color: var(--ink);
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.7rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    color: var(--ink-soft);
    font-size: .93rem;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: .3rem 0;
    border-bottom: 1px solid transparent;
    text-decoration: none;
}
.main-nav a:hover,
.main-nav .current-menu-item > a { color: var(--accent-dk); border-bottom-color: var(--accent); }

/* ============================ Каркас страницы ============================ */
.site-main { padding: 2.6rem 0 3.4rem; }
.home .site-main { padding: 0; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3rem;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area { width: 85%; margin-inline: auto; }
.content-area { min-width: 0; }

/* ============================ Хлебные крошки ============================ */
.crumbs {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 1.6rem;
    letter-spacing: .3px;
}
.crumbs a { color: var(--accent-dk); }
.crumbs .sep { margin: 0 .45rem; color: var(--line); }

/* ============================ Записи ============================ */
.entry-header { margin-bottom: 1.4rem; }
.entry-title { font-size: 2.2rem; margin-bottom: .4rem; }
.entry-meta { font-size: .85rem; color: var(--muted); letter-spacing: .3px; }
.entry-thumb { margin: 0 0 1.6rem; }
.entry-thumb img { display: block; width: 100%; border-radius: 8px; }

.entry-content { font-size: 1.06rem; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content img { border-radius: 8px; display: block; }
.entry-content a { text-decoration: underline; }
.entry-content blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.5rem;
    background: var(--paper-2);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    font-family: var(--serif);
    font-style: italic;
    color: var(--ink-soft);
}
.entry-content blockquote p { margin: 0; background: none; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: .96rem;
}
.entry-content table th,
.entry-content table td {
    border: 1px solid var(--line);
    padding: .6rem .8rem;
    text-align: left;
}
.entry-content table th { background: var(--paper-2); font-family: var(--serif); }

.tags-line { margin-top: 2rem; font-size: .88rem; color: var(--muted); }
.tags-line a { display: inline-block; margin: 0 .3rem .3rem 0; padding: .2rem .6rem; background: var(--paper-2); border-radius: 4px; }

/* ============================ Карточка записи ============================ */
.cards { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
}
.card:hover { box-shadow: 0 14px 34px rgba(30, 24, 12, .12); transform: translateY(-2px); }

.card-thumb-wrap {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.card-thumb-wrap a { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.card-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb-ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--paper-3), var(--paper-2));
    color: var(--accent);
}

.card-body { flex: 1; display: flex; flex-direction: column; padding: 1.4rem 1.5rem 1.6rem; min-width: 0; }
.card-title { font-size: 1.4rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent-dk); }
.card-meta { font-size: .8rem; color: var(--muted); letter-spacing: .3px; margin-bottom: .7rem; }
.card-excerpt { color: var(--ink-soft); font-size: .98rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    margin-top: auto;
    padding-top: 1rem;
    font-size: .84rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent-dk);
    align-self: flex-start;
}
.card-more:hover { color: var(--ink); text-decoration: none; }

/* Горизонтальные карточки на широких экранах */
@media (min-width: 720px) {
    .cards-list .card { flex-direction: row; }
    .cards-list .card-thumb-wrap { flex: 0 0 300px; aspect-ratio: auto; }
    .cards-list .card-body { padding: 1.6rem 1.8rem; }
}

/* ============================ Пагинация ============================ */
.pager { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.6rem; }
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 .8rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    color: var(--ink-soft);
    font-size: .92rem;
    text-decoration: none;
}
.pager a.page-numbers:hover { border-color: var(--accent); color: var(--accent-dk); }
.pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--white); }
.pager .page-numbers.dots { border-color: transparent; background: none; }

/* ============================ Сайдбар / виджеты ============================ */
.sidebar { min-width: 0; }
.widget {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.6rem;
    color: var(--ink-soft);
}
.widget-title {
    font-size: 1.12rem;
    margin: 0 0 1rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.widget a { color: var(--accent-dk); }
.widget a:hover { color: var(--ink); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: .5rem 0; border-bottom: 1px dotted var(--line); font-size: .95rem; }
.widget ul li:last-child { border-bottom: none; }
.widget .post-date { display: block; font-size: .78rem; color: var(--muted); margin-top: .2rem; }

/* ============================ Подвал ============================ */
.site-foot { background: var(--dark); color: #cdc5b4; margin-top: 3rem; }
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding: 3rem 0 2.4rem;
}
.site-foot .widget {
    background: var(--dark-2);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #cdc5b4;
}
.site-foot .widget-title { color: var(--white); border-bottom-color: rgba(255, 255, 255, .12); }
.site-foot .widget a { color: #d9cba9; }
.site-foot .widget a:hover { color: var(--white); }
.site-foot .widget ul li { border-bottom-color: rgba(255, 255, 255, .09); }
.site-foot .widget .post-date { color: #9a9284; }
.foot-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 1.3rem 0;
    font-size: .84rem;
    color: #9a9284;
    text-align: center;
}

/* ============================ Главная ============================ */
.home-wrap { padding: 0 0 3rem; }
.fs { padding: 3.4rem 0; }
.fs-head { text-align: center; max-width: 720px; margin: 0 auto 2.2rem; }
.fs-head .eyebrow {
    display: inline-block;
    font-size: .78rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-dk);
    margin-bottom: .8rem;
}
.fs-head h2 { font-size: 2.1rem; }
.fs-head p { color: var(--muted); }

/* Слайдер */
.slider {
    position: relative;
    overflow: hidden;
    background: var(--dark);
}
.slides { position: relative; }
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .9s ease;
    pointer-events: none;
}
.slide.is-active { position: relative; opacity: 1; pointer-events: auto; }
.slide img { display: block; width: 100%; height: 62vh; max-height: 620px; min-height: 380px; object-fit: cover; }
.slide-cap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2.6rem 0;
    background: linear-gradient(to top, rgba(15, 12, 7, .82), rgba(15, 12, 7, 0));
}
.slide-cap .shell { color: var(--white); }
.slide-cap .eyebrow { display: inline-block; font-size: .76rem; letter-spacing: 3px; text-transform: uppercase; color: #e4cfa2; margin-bottom: .6rem; }
.slide-cap h2 { color: var(--white); font-size: 2.3rem; margin: 0 0 .4rem; max-width: 640px; }
.slide-cap p { color: #e8e1d3; max-width: 560px; margin: 0; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 1.1rem; display: flex; justify-content: center; gap: .55rem; z-index: 3; }
.slider-dots button {
    width: 11px; height: 11px; padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .8);
    background: transparent;
    cursor: pointer;
}
.slider-dots button.is-active { background: var(--white); }

/* Текст + иллюстрация */
.fs-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; align-items: center; }
.fs-split.rev .fs-split-media { order: 2; }
.fs-split-media img { display: block; width: 100%; border-radius: 12px; }
.fs-split-text h2 { font-size: 1.9rem; }
.fs-split-text p { color: var(--ink-soft); }
.fs-btn {
    display: inline-block;
    margin-top: .6rem;
    padding: .8rem 1.6rem;
    background: var(--ink);
    color: var(--white);
    border-radius: 6px;
    font-size: .84rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.fs-btn:hover { background: var(--accent-dk); color: var(--white); text-decoration: none; }

/* Последние записи на главной */
.fs-latest { background: var(--paper-2); }
.latest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.8rem; }

/* Галерея / мозаика */
.fs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 180px;
    gap: 1rem;
}
.gal-item { position: relative; overflow: hidden; border-radius: 10px; }
.gal-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gal-item:hover img { transform: scale(1.05); }
.gal-item.wide { grid-column: span 2; }
.gal-item.tall { grid-row: span 2; }

/* CTA */
.fs-cta-inner {
    background: var(--dark);
    color: var(--white);
    border-radius: 14px;
    padding: 3rem 2.6rem;
    text-align: center;
}
.fs-cta-inner h2 { color: var(--white); font-size: 2rem; }
.fs-cta-inner p { color: #ddd4c0; max-width: 620px; margin: 0 auto 1.6rem; }
.fs-cta-inner .fs-btn { background: var(--accent); }
.fs-cta-inner .fs-btn:hover { background: var(--white); color: var(--ink); }

/* ============================ Комментарии ============================ */
.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; padding: 0; }
.comment-list .children { list-style: none; margin: 1rem 0 0 1.6rem; padding: 0; }
.comment-body { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.comment-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; flex-wrap: wrap; }
.comment-author { font-family: var(--serif); font-weight: 600; }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-await { font-size: .84rem; color: var(--accent-dk); }
.comment-reply { margin-top: .5rem; font-size: .84rem; }
.comment-respond { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.6rem 1.7rem; margin-top: 1.5rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--paper);
    font: inherit;
    min-width: 0;
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form .form-submit input,
.form-submit input[type="submit"] {
    background: var(--ink);
    color: var(--white);
    border: none;
    padding: .8rem 1.8rem;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: .84rem;
}

/* ============================ Форма поиска ============================ */
.search-form { display: flex; gap: .6rem; min-width: 0; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: .7rem .9rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    font: inherit;
}
.search-form .search-submit {
    padding: .7rem 1.3rem;
    background: var(--ink);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: .5px;
}

/* ============================ 404 ============================ */
.err-block { text-align: center; padding: 2rem 0 1rem; }
.err-code { font-family: var(--serif); font-size: 5rem; color: var(--accent); line-height: 1; margin-bottom: .5rem; }
.err-block .search-form { max-width: 440px; margin: 1.6rem auto 0; }
.err-links { margin-top: 1.4rem; }

/* ============================ Контакты (статичные) ============================ */
.contact-static { margin: 1.4rem 0; }
.contact-static a { text-decoration: underline; }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.social-links a { padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; }

/* ============================ Cookie-баннер ============================ */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    flex-wrap: wrap;
    background: var(--dark);
    color: #e3dccb;
    padding: 1.1rem 1.4rem;
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .3);
    max-width: 1180px;
    margin: 0 auto;
}
.cookie-banner p { margin: 0; font-size: .9rem; min-width: 0; flex: 1; }
.cookie-banner a { color: #e4cfa2; text-decoration: underline; }
.cookie-accept {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: .7rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: .82rem;
    white-space: nowrap;
}
.cookie-accept:hover { background: var(--white); color: var(--ink); }

/* ============================ Адаптив ============================ */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 2.4rem; }
    .latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fs-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; }
    h1 { font-size: 2.1rem; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        width: 100%;
        margin-top: .8rem;
    }
    .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: .8rem 0; }
    .head-inner { flex-wrap: wrap; }
    .brand-name, .brand-tag { max-width: 62vw; }

    .layout-single .content-area { width: 100%; }
    .fs { padding: 2.4rem 0; }
    .fs-split { grid-template-columns: 1fr; gap: 1.6rem; }
    .fs-split.rev .fs-split-media { order: 0; }
    .latest-grid { grid-template-columns: 1fr; }
    .fs-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
    .gal-item.wide, .gal-item.tall { grid-column: auto; grid-row: auto; }
    .foot-cols { grid-template-columns: 1fr; gap: 1.6rem; padding: 2.2rem 0 1.8rem; }

    .cards-list .card { flex-direction: column; }
    .cards-list .card-thumb-wrap { flex: none; width: 100%; position: static; aspect-ratio: 16 / 9; }
    .cards-list .card-thumb-wrap a { position: static; }
    .cards-list .card-thumb-wrap img { width: 100%; height: auto; aspect-ratio: 16 / 9; }

    .slide img { height: 52vh; min-height: 300px; }
    .slide-cap h2 { font-size: 1.6rem; }
    .fs-cta-inner { padding: 2rem 1.4rem; }
    .fs-cta-inner h2 { font-size: 1.6rem; }
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
    .cookie-accept { width: 100%; }
}
