/*
Theme Name: dds_julien-masson.com
Author: Жюльен Массон
Description: Информационный ресурс об архитектурной фотографии и истории зданий. Фотоэссе, справочные материалы и образовательные разделы.
Version: 1.1
Text Domain: jmasson
*/

/* ===== Переменные ===== */
:root {
    --stone:       #4a443c;
    --stone-dark:  #322e29;
    --stone-deep:  #24211d;
    --paper:       #f4f1ea;
    --paper-soft:  #eae5da;
    --line:        #d8d2c5;
    --ink:         #2c2823;
    --muted:       #6f6a60;
    --accent:      #9a5c40;
    --accent-dk:   #7f4a32;
    --sand:        #c9c2b4;
    --shell:       min(92%, 1180px);
    --radius:      6px;
    --shadow:      0 2px 14px rgba(36,33,29,0.10);
}

/* ===== База ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); text-decoration: underline; }

h1,h2,h3,h4 {
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: var(--stone-dark);
    line-height: 1.25;
    font-weight: 700;
}
h1 { font-size: 2.05rem; margin: 0 0 .6em; }
h2 { font-size: 1.6rem; margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }
p { margin: 0 0 1.1em; }

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

table { border-collapse: collapse; width: 100%; margin: 1.2em 0; }
table, th, td { border: 1px solid var(--line); }
th, td { padding: .6em .8em; text-align: left; }
th { background: var(--sand); }

.btn {
    display: inline-block;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: .95rem;
    background: var(--accent);
    color: #fff;
    padding: .7em 1.4em;
    border-radius: var(--radius);
    letter-spacing: .02em;
}
.btn:hover { background: var(--accent-dk); color: #fff; text-decoration: none; }

/* ===== Шапка ===== */
.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 0;
}
.header-inner { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .9rem; min-width: 0; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 52px; height: 52px; display: block; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    color: var(--stone-dark);
    font-size: 1.05rem;
    line-height: 1.2;
    display: block;
}
.brand-desc { font-size: .82rem; color: var(--muted); line-height: 1.35; margin-top: .25rem; }

.nav-toggle {
    display: none;
    margin-left: auto;
    background: var(--stone-dark);
    color: #fff;
    border: 0;
    padding: .55rem .8rem;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
}
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }
.main-nav a {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: .95rem;
    color: var(--stone-dark);
    padding: .5rem .85rem;
    border-radius: var(--radius);
    display: block;
}
.main-nav a:hover { background: var(--sand); text-decoration: none; }
.main-nav .current-menu-item > a { background: var(--stone-dark); color: #fff; }

/* ===== Хлебные крошки ===== */
.breadcrumbs {
    width: var(--shell);
    margin: 1.2rem auto 0;
    font-size: .85rem;
    color: var(--muted);
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs .sep { margin: 0 .35em; color: var(--line); }

/* ===== Раскладка ===== */
.site-main { padding: 2rem 0 3rem; }
.layout-with-sidebar {
    width: var(--shell);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 3%;
    align-items: start;
}
.layout-single { width: var(--shell); margin-inline: auto; }
.content-area { min-width: 0; }

/* ===== Сайдбар ===== */
.sidebar { min-width: 0; }
.widget {
    background: var(--stone-dark);
    color: #e8e3d8;
    padding: 1.3rem 1.4rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.widget-title {
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 .8rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.18);
}
.widget, .widget p, .widget li { color: #d8d2c6; }
.widget a { color: #e6b89e; }
.widget a:hover { color: #f0d2c0; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.10); }
.widget li:last-child { border-bottom: 0; }
.widget .post-date { display: block; font-size: .78rem; color: #a8a196; margin-top: .15rem; }

/* ===== Карточки записей ===== */
.card-list { display: grid; gap: 1.6rem; }
.card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.card-thumb-wrap {
    display: block;
    overflow: hidden;
    background: var(--sand);
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .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 { margin: 0 0 .5rem; font-size: 1.3rem; }
.card-title a { color: var(--stone-dark); }
.card-meta { font-size: .8rem; color: var(--muted); font-family: "Helvetica Neue", Arial, sans-serif; margin-bottom: .7rem; }
.card-excerpt { color: #443f38; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-more {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: .85rem;
    font-weight: 700;
    color: var(--accent);
}

/* ===== Одиночная запись / страница ===== */
.entry {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 2.2rem 2.4rem;
    box-shadow: var(--shadow);
}
.entry-title { font-size: 2rem; }
.entry-meta { font-size: .82rem; color: var(--muted); font-family: "Helvetica Neue", Arial, sans-serif; margin-bottom: 1.3rem; }
.entry-content img { border-radius: var(--radius); }
.entry-featured { margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden; }
.entry-featured img { width: 100%; display: block; }

/* ===== Пагинация ===== */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 2rem;
    justify-content: center;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.pagination .page-numbers {
    display: inline-block;
    padding: .55rem .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--stone-dark);
    font-size: .9rem;
    line-height: 1;
}
.pagination a.page-numbers:hover { background: var(--sand); text-decoration: none; }
.pagination .page-numbers.current { background: var(--stone-dark); color: #fff; border-color: var(--stone-dark); }
.pagination .page-numbers.dots { border: 0; background: none; }

/* ===== Форма поиска ===== */
.search-form { display: flex; gap: .5rem; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: .6rem .8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
}
.search-form button {
    background: var(--stone-dark);
    color: #fff;
    border: 0;
    padding: .6rem 1.1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: "Helvetica Neue", Arial, sans-serif;
}
.widget .search-form input[type="search"] { background: #fff; }

/* ===== Главная: секции ===== */
.front-section { padding: 3rem 0; }
.front-section + .front-section { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 1.6rem; }
.section-head .eyebrow {
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: .78rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: .5rem;
}

/* Слайдер */
.fs-slider .slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--stone-deep);
}
.slider-track { position: relative; }
.slide {
    display: none;
    position: relative;
}
.slide.is-active { display: block; }
.slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2rem 2.2rem 1.6rem;
    background: linear-gradient(to top, rgba(24,21,18,.82), rgba(24,21,18,0));
    color: #f2ede3;
}
.slide-caption h3 { color: #fff; margin: 0 0 .2rem; }
.slide-caption p { margin: 0; color: #d8d2c6; font-size: .9rem; }
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(36,33,29,.55);
    color: #fff;
    border: 0;
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 2;
}
.slider-btn:hover { background: rgba(36,33,29,.85); }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }
.slider-dots { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; }
.slider-dots button {
    width: 10px; height: 10px; border-radius: 50%;
    border: 0; background: var(--line); cursor: pointer; padding: 0;
}
.slider-dots button.is-active { background: var(--accent); }

/* Текст + иллюстрация */
.fs-split .split {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 2.5rem;
    align-items: center;
}
.fs-split.reverse .split .split-media { order: -1; }
.split-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.split-body { min-width: 0; }

/* Сетка фактов */
.fs-facts { background: var(--stone-dark); color: #ece7dc; padding: 3rem 2.2rem; border-radius: var(--radius); }
.fs-facts .section-head h2 { color: #fff; }
.fs-facts .section-head .eyebrow { color: #e6b89e; }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.6rem; }
.fact { min-width: 0; }
.fact .num { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 2.4rem; font-weight: 700; color: #fff; display: block; }
.fact .lbl { font-size: .88rem; color: #c3bcaf; }

/* Галерея */
.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); background: var(--sand); }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform .4s ease; }
.gallery-grid figure:hover img { transform: scale(1.05); }

/* Пошаговый блок */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.6rem; }
.step { min-width: 0; padding: 1.6rem 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step .step-num {
    font-family: "Helvetica Neue", Arial, sans-serif;
    width: 42px; height: 42px; line-height: 42px; text-align: center;
    background: var(--accent); color: #fff; border-radius: 50%; font-weight: 700; margin-bottom: .9rem;
}
.step h3 { margin-bottom: .3rem; }
.step p { margin: 0; font-size: .95rem; color: #4a453d; }

/* Последние записи на главной */
.fs-latest .card-list { grid-template-columns: repeat(3, minmax(0,1fr)); }

/* CTA */
.fs-cta { background: var(--accent); color: #fff; padding: 2.6rem 2.4rem; border-radius: var(--radius); text-align: center; }
.fs-cta h2 { color: #fff; }
.fs-cta p { color: #f6e6dd; max-width: 640px; margin-left: auto; margin-right: auto; }
.fs-cta .btn { background: #fff; color: var(--accent-dk); margin-top: .6rem; }
.fs-cta .btn:hover { background: var(--paper); }

/* ===== Комментарии ===== */
.comments-area { margin-top: 2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 2rem; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.comment-list li:last-child { border-bottom: 0; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%; padding: .6rem .8rem; border: 1px solid var(--line);
    border-radius: var(--radius); font-family: inherit; font-size: .95rem; margin-top: .3rem;
}
.comment-form p { margin-bottom: .9rem; }

/* ===== Подвал ===== */
.site-footer { background: var(--stone-deep); color: #cfc9bd; padding: 2.8rem 0 1.4rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 2rem; }
.footer-col { min-width: 0; }
.site-footer .widget { background: none; padding: 0; margin: 0; }
.site-footer .widget-title { color: #fff; border-color: rgba(255,255,255,.15); }
.site-footer .widget, .site-footer .widget p, .site-footer .widget li { color: #b9b2a5; }
.site-footer .widget a { color: #e6b89e; }
.site-footer .widget a:hover { color: #f0d2c0; }
.site-footer .widget li { border-color: rgba(255,255,255,.10); }
.footer-copy {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 2.2rem;
    padding-top: 1.3rem;
    font-size: .82rem;
    color: #8f887c;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 2rem 0; }
.error-404 .big { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 5rem; color: var(--sand); font-weight: 700; line-height: 1; }
.error-404 .search-form { max-width: 460px; 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(--stone-deep);
    color: #e2ddd2;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 -2px 16px rgba(0,0,0,.25);
}
.cookie-banner p { margin: 0; font-size: .88rem; max-width: 760px; }
.cookie-banner .btn { background: var(--accent); color: #fff; flex: 0 0 auto; }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 2rem; }
    .facts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .gallery-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .fs-latest .card-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    body { font-size: 16.5px; }
    h1 { font-size: 1.7rem; }
    .nav-toggle { display: block; }
    .main-nav { flex-basis: 100%; margin-left: 0; display: none; }
    .main-nav.is-open { display: block; }
    .main-nav ul { flex-direction: column; gap: .2rem; }
    .fs-split .split { grid-template-columns: 1fr; gap: 1.4rem; }
    .fs-split.reverse .split .split-media { order: 0; }
    .facts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .fs-facts { padding: 2rem 1.4rem; }
    .fs-cta { padding: 1.9rem 1.4rem; }
    .fs-latest .card-list { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .entry { padding: 1.4rem 1.3rem 1.6rem; }
    .slide-caption { padding: 1.2rem 1.3rem 1rem; }
    .slide-caption p { display: none; }
    .footer-cols { grid-template-columns: 1fr; gap: 1.6rem; }
}
