/*
Theme Name: dds_giovannaoliva.com
Theme URI: https://giovannaoliva.com
Author: Джованна Олива
Author URI: https://giovannaoliva.com
Description: Независимый визуальный журнал о строительстве и ремонте, построенный вокруг реальных кейсов «до — во время — после». Личный фотодневник процесса: бетон, пыль, дерево и честная фиксация без постановки.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: betonlog
*/

/* ==================================================================
   1. Переменные и сброс
   ================================================================== */
:root {
    --bg-canvas: #F7F5F0;
    --bg-concrete: #1E1E1C;
    --text-base: #2A2A28;
    --rust: #C95D3A;
    --copper: #B86B3F;
    --wood: #D6B17E;
    --gray-1: #9A9A96;
    --gray-2: #D1CFC5;
    --gray-3: #E5E2D8;
    --ochre: #E3B23C;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --mono: "IBM Plex Mono", "Courier New", monospace;
    --serif: "Cormorant Garamond", "Times New Roman", serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg-canvas);
    color: var(--text-base);
    font-family: var(--serif);
    font-size: 1.25rem;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--rust);
    text-decoration: none;
    transition: color 0.6s var(--ease);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--mono);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-base);
    margin: 0 0 0.6em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p {
    margin: 0 0 1.1em;
}

time, .date, .meta-date {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

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

.front-shell {
    width: min(85%, 1120px);
    margin-inline: auto;
}

/* ==================================================================
   3. Cookie-баннер — правило [hidden] раньше основного блока (A11)
   ================================================================== */
.cookie-banner[hidden] {
    display: none !important;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
    padding: 18px 24px;
    background: var(--bg-concrete);
    color: var(--gray-3);
    border-top: 3px solid var(--rust);
    font-size: 0.95rem;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
    min-width: 240px;
    color: var(--gray-3);
}

.cookie-banner a {
    color: var(--wood);
}

/* ==================================================================
   4. Шапка
   ================================================================== */
.site-header {
    border-bottom: 1px solid var(--gray-2);
    background: var(--bg-canvas);
    padding: 22px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

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

.brand-logo {
    display: block;
    flex: 0 0 auto;
}

.brand-text {
    min-width: 0;
}

.site-title {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-title a {
    color: var(--text-base);
}

.site-desc {
    font-size: 0.98rem;
    color: var(--gray-1);
    margin: 6px 0 0;
    line-height: 1.45;
}

/* Навигация */
.main-nav {
    width: 100%;
    margin-top: 16px;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 28px;
}

.main-nav a {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--text-base);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.6s var(--ease), color 0.6s var(--ease);
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--rust);
    border-color: var(--rust);
}

.nav-toggle {
    display: none;
    font-family: var(--mono);
    font-size: 0.85rem;
    background: none;
    border: 1.5px solid var(--rust);
    color: var(--rust);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 0 0 12px 12px;
}

/* ==================================================================
   5. Кнопки
   ================================================================== */
.btn-primary {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    padding: 15px 38px;
    background: transparent;
    color: var(--rust);
    border: 1.5px solid var(--rust);
    border-radius: 40px 4px 4px 40px;
    cursor: pointer;
    transition: background 0.6s var(--ease), color 0.6s var(--ease), border-radius 0.6s var(--ease);
}

.btn-primary:hover {
    background: var(--rust);
    color: #fff;
    border-radius: 0;
}

.btn-filter {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.82rem;
    text-transform: lowercase;
    padding: 9px 18px;
    background: var(--gray-3);
    color: var(--gray-1);
    border: none;
    border-radius: 0 0 12px 12px;
    cursor: pointer;
    transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

.btn-filter:hover {
    color: var(--text-base);
}

.btn-filter.is-active {
    background: var(--rust);
    color: #fff;
}

.btn-note {
    display: inline-block;
    height: 32px;
    line-height: 30px;
    font-family: var(--mono);
    font-size: 0.82rem;
    padding: 0 4px;
    background: none;
    border: none;
    border-bottom: 1px dashed var(--copper);
    color: var(--copper);
    cursor: pointer;
}

/* Внешняя ссылка — серая пометка на полях */
.ext-link {
    font-family: var(--mono);
    font-size: 0.88rem;
    color: var(--gray-1);
}

.ext-link::after {
    content: " ⤴";
    color: var(--copper);
}

.ext-link:hover {
    color: var(--copper);
}

/* ==================================================================
   6. Макет страниц
   ================================================================== */
.site-main {
    padding: 38px 0 72px;
}

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

.layout-single {
    display: block;
}

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

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

/* ==================================================================
   7. Хлебные крошки
   ================================================================== */
.breadcrumbs {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--gray-1);
    margin-bottom: 26px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-2);
}

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

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

.breadcrumbs .sep {
    color: var(--gray-2);
    margin: 0 6px;
}

.breadcrumbs span:last-child {
    color: var(--text-base);
}

/* ==================================================================
   8. Карточки записей (вертикальные)
   ================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 34px;
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--gray-2);
}

.card-thumb-wrap {
    overflow: hidden;
}

.card-thumb-wrap a,
.card-thumb-wrap img {
    display: block;
}

.card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: filter 0.6s var(--ease);
}

.card:hover .card-thumb-wrap img {
    filter: saturate(0.7) brightness(0.95);
}

.card-thumb-empty {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gray-3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 22px 24px 26px;
    min-width: 0;
}

.card-cat {
    font-family: var(--mono);
    font-size: 0.74rem;
    text-transform: lowercase;
    color: var(--rust);
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.2rem;
    margin: 0 0 10px;
}

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

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

.card-meta {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--gray-1);
    margin-bottom: 12px;
}

.card-excerpt {
    color: var(--text-base);
    font-size: 1.05rem;
    line-height: 1.55;
}

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

.card-readmore {
    margin-top: auto;
    padding-top: 16px;
}

/* ==================================================================
   9. Одиночная запись и страницы
   ================================================================== */
.entry-header {
    margin-bottom: 28px;
}

.entry-title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.entry-meta {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--gray-1);
}

.entry-thumb {
    margin: 0 0 28px;
    position: relative;
}

.entry-thumb img {
    display: block;
    width: 100%;
}

.entry-thumb .shot-mark {
    position: absolute;
    left: 22px;
    bottom: 18px;
    font-family: var(--mono);
    font-size: 0.9rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.entry-content {
    font-size: 1.25rem;
}

.entry-content img {
    height: auto;
}

.entry-content h2,
.entry-content h3 {
    margin-top: 1.5em;
}

.entry-content blockquote {
    margin: 1.6em 0;
    padding: 18px 24px;
    background: var(--gray-3);
    border-left: 4px solid var(--wood);
    font-style: italic;
    color: var(--text-base);
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Выноска-наблюдение */
.site-note {
    background: var(--gray-2);
    border: 1px dashed var(--gray-1);
    padding: 16px 20px;
    font-family: var(--mono);
    font-size: 0.95rem;
    margin: 1.6em 0;
}

.entry-tags {
    margin-top: 30px;
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--gray-1);
}

.entry-tags a {
    color: var(--copper);
}

/* ==================================================================
   10. Таблицы
   ================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 1rem;
}

table, th, td {
    border: 1px solid var(--gray-1);
}

th, td {
    padding: 10px 14px;
    text-align: left;
}

th {
    background: var(--gray-3);
    font-family: var(--mono);
    font-size: 0.9rem;
}

/* ==================================================================
   11. Сайдбар и виджеты
   ================================================================== */
.sidebar {
    min-width: 0;
}

.sidebar .widget {
    background: #fff;
    border: 1px solid var(--gray-2);
    padding: 20px 22px;
    margin-bottom: 26px;
}

.sidebar .widget-title {
    font-size: 1rem;
    color: var(--text-base);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--rust);
}

.sidebar .widget,
.sidebar .widget a,
.sidebar .widget li {
    color: var(--text-base);
}

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

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

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

.sidebar .widget li {
    padding: 7px 0;
    border-bottom: 1px solid var(--gray-3);
    font-size: 1rem;
}

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

.sidebar .widget .post-date,
.sidebar .widget .rss-date {
    display: block;
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--gray-1);
}

/* ==================================================================
   12. Подвал
   ================================================================== */
.site-footer {
    background: var(--bg-concrete);
    color: var(--gray-3);
    padding: 56px 0 28px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
}

.site-footer .widget-title {
    font-size: 1rem;
    color: var(--wood);
    margin-bottom: 14px;
}

.site-footer .widget,
.site-footer .widget p,
.site-footer .widget li,
.site-footer .widget .post-date {
    color: var(--gray-3);
}

.site-footer .widget a {
    color: var(--wood);
}

.site-footer .widget a:hover {
    color: var(--ochre);
}

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

.site-footer .widget li {
    padding: 6px 0;
    border-bottom: 1px solid #34332F;
    font-size: 0.98rem;
}

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

.site-footer .widget .post-date {
    display: block;
    font-family: var(--mono);
    font-size: 0.74rem;
    color: var(--gray-1);
}

.footer-sign {
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid #34332F;
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--gray-1);
}

/* ==================================================================
   13. Пагинация
   ================================================================== */
.pagination {
    margin-top: 44px;
}

.pagination ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.pagination a,
.pagination span {
    display: block;
    font-family: var(--mono);
    font-size: 0.85rem;
    padding: 9px 15px;
    border: 1px solid var(--gray-2);
    color: var(--text-base);
}

.pagination a:hover {
    border-color: var(--rust);
    color: var(--rust);
}

.pagination .current {
    background: var(--rust);
    border-color: var(--rust);
    color: #fff;
}

/* ==================================================================
   14. Главная страница
   ================================================================== */
.front-section {
    margin-bottom: 72px;
}

.section-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rust);
    margin-bottom: 10px;
}

.section-title {
    font-size: 1.9rem;
    margin-bottom: 22px;
}

.front-hero {
    padding: 64px 0 18px;
}

.front-hero .hero-title {
    font-size: 2.5rem;
    line-height: 1.25;
    max-width: 18ch;
}

.front-hero .hero-lead {
    max-width: 60ch;
    color: var(--text-base);
}

.stage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.stage-card {
    position: relative;
    background-color: var(--bg-concrete);
    background-size: cover;
    background-position: center;
    color: var(--gray-3);
    padding: 30px 24px;
    min-height: 220px;
    transition: opacity 0.6s var(--ease);
}
/* Фото стадии стройки как фон карточки; затемняющий слой
   накладывается поверх снимка, чтобы текст оставался читаемым */
.stage-card--before {
    background-image:
        linear-gradient(180deg, rgba(20,18,16,0.55), rgba(20,18,16,0.84)),
        url(images/stage-before.svg);
}
.stage-card--during {
    background-image:
        linear-gradient(180deg, rgba(20,18,16,0.55), rgba(20,18,16,0.84)),
        url(images/stage-during.svg);
}
.stage-card--after {
    background-image:
        linear-gradient(180deg, rgba(20,18,16,0.5), rgba(20,18,16,0.82)),
        url(images/stage-after.svg);
}

.stage-card .stage-num {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--wood);
}

.stage-card h3 {
    color: #fff;
    margin: 12px 0 8px;
}

.stage-card p {
    color: var(--gray-1);
    font-size: 1rem;
}

.stage-card .lock {
    position: absolute;
    top: 18px;
    right: 20px;
    color: var(--rust);
    font-family: var(--mono);
    font-size: 0.9rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 26px;
}

.step-item {
    border-top: 3px solid var(--rust);
    padding-top: 16px;
}

.step-item .step-no {
    font-family: var(--mono);
    font-size: 1.4rem;
    color: var(--rust);
}

.cat-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.cat-cloud span {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-base);
    border-bottom: 1px solid var(--wood);
    padding-bottom: 3px;
}

.front-cta {
    margin-top: 28px;
}

/* ==================================================================
   15. Поиск, комментарии, 404
   ================================================================== */
.search-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    font-family: var(--serif);
    font-size: 1.05rem;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-1);
    background: #fff;
    color: var(--text-base);
}

.search-form button {
    font-family: var(--mono);
    font-size: 0.85rem;
    padding: 10px 20px;
    background: var(--rust);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.6s var(--ease);
}

.search-form button:hover {
    background: var(--copper);
}

.comments-area {
    margin-top: 52px;
    border-top: 1px solid var(--gray-2);
    padding-top: 30px;
}

.comment-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.comment-list ul.children {
    list-style: none;
    margin: 0;
    padding-left: 28px;
}

.comment-item {
    margin-bottom: 22px;
}

.comment-inner {
    background: #fff;
    border: 1px solid var(--gray-2);
    padding: 18px 20px;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-author {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 0.92rem;
}

.comment-date {
    font-size: 0.78rem;
    color: var(--gray-1);
}

.comment-pending {
    color: var(--ochre);
    font-family: var(--mono);
    font-size: 0.85rem;
}

.comment-actions {
    font-family: var(--mono);
    font-size: 0.82rem;
    margin-top: 8px;
}

.comment-respond {
    background: var(--gray-3);
    padding: 24px;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    font-family: var(--serif);
    font-size: 1.05rem;
    padding: 9px 12px;
    border: 1.5px solid var(--gray-1);
    background: #fff;
    margin-bottom: 12px;
}

.comment-respond .form-submit input {
    font-family: var(--mono);
    font-size: 0.88rem;
    padding: 12px 28px;
    background: var(--rust);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 40px 4px 4px 40px;
    transition: background 0.6s var(--ease), border-radius 0.6s var(--ease);
}

.comment-respond .form-submit input:hover {
    background: var(--copper);
    border-radius: 0;
}

.error-404 {
    text-align: center;
    padding: 40px 0;
}

.error-404 .big-code {
    font-family: var(--mono);
    font-size: 5rem;
    color: var(--rust);
    line-height: 1;
}

/* ==================================================================
   16. Адаптив
   ================================================================== */
@media (max-width: 960px) {
    .layout-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
    .footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .front-hero .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 1.15rem;
    }
    .nav-toggle {
        display: inline-block;
    }
    .main-nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 12px;
    }
    .main-nav.is-open ul {
        display: flex;
    }
    .main-nav li {
        border-bottom: 1px solid var(--gray-2);
    }
    .footer-columns {
        grid-template-columns: minmax(0, 1fr);
    }
    .stage-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .entry-title {
        font-size: 1.6rem;
    }
    .front-hero .hero-title {
        font-size: 1.7rem;
    }
}
