/*
Theme Name: dds_twitterrati.com
Theme URI: https://twitterrati.com
Author: Илья Корнеев
Author URI: https://twitterrati.com
Description: Контентный блог о ремонте и интерьере с упором на практичные решения для квартир и домов.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: twrati
*/

/* ======== CSS RESET / BASE ======== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: #F7F5F0;
    color: #2A2B26;
    font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: #5E6A47;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
a:hover { color: #7A4C3A; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Spectral', 'Literata', 'Source Serif 4', Georgia, serif;
    color: #7A4C3A;
    font-weight: 600;
    line-height: 1.25;
    margin: 1.4em 0 0.5em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

blockquote {
    margin: 1.5em 0;
    padding: 0.4em 1.2em;
    border-left: 3px solid #7A4C3A;
    background: #F0EDE4;
    font-style: italic;
    color: #2A2B26;
}

code, pre {
    font-family: 'JetBrains Mono', 'Source Code Pro', Menlo, Consolas, monospace;
    background: #F0EDE4;
    border-radius: 4px;
}
code { padding: 0.1em 0.35em; font-size: 0.9em; }
pre { padding: 1em; overflow-x: auto; font-size: 0.95em; }

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #D9D2C3;
    margin: 1.5em 0;
    background: #F7F5F0;
}
th, td {
    border: 1px solid #D9D2C3;
    padding: 0.7em 0.9em;
    text-align: left;
    vertical-align: top;
}
th {
    background: #F0EDE4;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    color: #7A4C3A;
    font-weight: 600;
}

hr {
    border: 0;
    border-top: 1px dashed #D9D2C3;
    margin: 2em 0;
}

/* ======== LAYOUT ======== */
.wrap {
    width: 92%;
    max-width: 1180px;
    margin: 0 auto;
}

.site-main {
    padding: 2.2rem 0 3rem;
}

.layout-with-sidebar {
    display: flex;
    gap: 3.5%;
    align-items: flex-start;
}
.layout-with-sidebar .content-area { width: 67%; }
.layout-with-sidebar .sidebar-area { width: 27%; }

.layout-no-sidebar .content-area { width: 85%; margin: 0 auto; }

@media (max-width: 960px) {
    .layout-with-sidebar { flex-direction: column; gap: 2.5rem; }
    .layout-with-sidebar .content-area,
    .layout-with-sidebar .sidebar-area { width: 100%; }
    .layout-no-sidebar .content-area { width: 100%; }
}

/* ======== HEADER ======== */
.site-header {
    background: #F7F5F0;
    border-bottom: 1px solid #D9D2C3;
    position: relative;
}

.site-header::before {
    /* «Цифровое наследие» — едва заметная пиксельная сетка */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(122, 76, 58, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(122, 76, 58, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.4rem 0;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
.brand:hover { color: inherit; }

.brand-logo {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    object-fit: contain;
}

.brand-text { min-width: 0; }
.brand-name {
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #7A4C3A;
    line-height: 1.2;
    margin: 0 0 0.15em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-tagline {
    font-size: 0.85rem;
    color: #5E6A47;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.header-search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #D9D2C3;
    background: transparent;
    color: #5E6A47;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.header-search-toggle:hover { color: #7A4C3A; border-color: #7A4C3A; background: #F0EDE4; }

/* nav */
.primary-nav {
    background: #F7F5F0;
    border-top: 1px dashed #D9D2C3;
    border-bottom: 1px dashed #D9D2C3;
}
.primary-nav-inner { position: relative; }

.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.8rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.primary-nav li { flex: 0 0 auto; }
.primary-nav a {
    display: inline-block;
    padding: 0.85rem 0;
    color: #2A2B26;
    text-decoration: none;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.07em;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
    color: #7A4C3A;
}

.header-search-box {
    padding: 0.8rem 0 1rem;
    border-top: 1px dashed #D9D2C3;
}
.header-search-box[hidden] { display: none !important; }

@media (max-width: 600px) {
    .brand-tagline { -webkit-line-clamp: 2; font-size: 0.78rem; }
    .brand-name { font-size: 1.1rem; }
    .primary-nav ul { gap: 1.1rem; }
    .primary-nav a { font-size: 0.88rem; }
}

/* ======== FRONT PAGE ======== */
.front-block {
    padding: 2.2rem 0;
    border-bottom: 1px dashed #D9D2C3;
}
.front-block:last-of-type { border-bottom: none; }

.front-block-title {
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-size: 1.8rem;
    color: #7A4C3A;
    margin: 0 0 0.4em;
}
.front-block-lead {
    font-size: 1.05rem;
    color: #2A2B26;
    margin: 0 0 1.4em;
    max-width: 65ch;
}

.front-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}
.front-grid-item {
    background: #F0EDE4;
    border: 1px solid #D9D2C3;
    border-radius: 6px;
    padding: 1.2rem 1.3rem;
}
.front-grid-item h3 {
    margin: 0 0 0.45em;
    font-size: 1.1rem;
}
.front-grid-item p { margin: 0; font-size: 0.95rem; }

.front-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}
.front-steps li {
    position: relative;
    padding: 0.6rem 0 0.6rem 3.2rem;
    counter-increment: step;
}
.front-steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.4rem;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-size: 1.7rem;
    color: #C9A87C;
    line-height: 1;
}
.front-steps strong { color: #7A4C3A; display: block; margin-bottom: 0.15em; }

.front-tip {
    background: #F0EDE4;
    border-left: 3px solid #7A4C3A;
    padding: 1rem 1.2rem;
    margin: 1.5rem 0 0;
    font-size: 0.97rem;
}
.front-tip strong { font-family: 'Spectral', 'Literata', Georgia, serif; color: #7A4C3A; }

@media (max-width: 960px) {
    .front-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .front-grid, .front-steps { grid-template-columns: 1fr; }
    .front-block-title { font-size: 1.5rem; }
}

/* ======== POST CARDS ======== */
.posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.6rem;
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}

.card {
    display: flex;
    flex-direction: column;
    background: #F0EDE4;
    border: 1px solid #D9D2C3;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(122, 76, 58, 0.08);
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    background: #D9D2C3;
}
.card-thumb-wrap a {
    display: block;
    line-height: 0;
}
.card-thumb-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.03); }

.card-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(122, 76, 58, 0.55);
    color: #F7F5F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.card:hover .card-thumb-overlay { opacity: 1; }

.card-body {
    flex: 1;
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
}

.card-meta {
    font-size: 0.82rem;
    color: #5E6A47;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    margin: 0 0 0.5em;
}
.card-meta a { color: #5E6A47; text-decoration: none; }
.card-meta a:hover { color: #7A4C3A; }
.card-meta-sep { margin: 0 0.4em; color: #D9D2C3; }

.card-title {
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-size: 1.2rem;
    color: #7A4C3A;
    margin: 0 0 0.6em;
    line-height: 1.3;
}
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: #5E6A47; }

.card-excerpt {
    font-size: 0.95rem;
    color: #2A2B26;
    margin: 0 0 1em;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-more {
    display: inline-block;
    align-self: flex-start;
    background: #C9A87C;
    color: #2A2B26;
    border-radius: 8px;
    padding: 0.55em 1.1em;
    font-size: 0.9rem;
    text-decoration: none;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    transition: background 0.2s ease;
}
.card-more:hover { background: #B8996B; color: #2A2B26; }

/* Horizontal card variant — for future use, see A10 */
.card.card-horizontal {
    flex-direction: row;
}
.card.card-horizontal .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}
.card.card-horizontal .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card.card-horizontal .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: auto;
}

@media (max-width: 600px) {
    .card.card-horizontal {
        flex-direction: column;
    }
    .card.card-horizontal .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card.card-horizontal .card-thumb-wrap a {
        position: static;
    }
    .card.card-horizontal .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ======== SINGLE / PAGE ======== */
.entry-header {
    margin: 0 0 1.4rem;
    padding: 0 0 1rem;
    border-bottom: 1px dashed #D9D2C3;
}
.entry-title {
    font-size: 2.2rem;
    margin: 0 0 0.4em;
}
.entry-meta {
    color: #5E6A47;
    font-size: 0.9rem;
    font-variant: small-caps;
    letter-spacing: 0.07em;
}
.entry-meta a { color: #5E6A47; text-decoration: none; }
.entry-meta a:hover { color: #7A4C3A; text-decoration: underline; }

.entry-thumbnail {
    margin: 0 0 1.6rem;
    border-radius: 8px;
    overflow: hidden;
}
.entry-thumbnail img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.entry-content > * { max-width: 70ch; }
.entry-content > .alignwide,
.entry-content > .alignfull,
.entry-content > figure,
.entry-content > .wp-block-image { max-width: 100%; }

.entry-content figure { margin: 1.5em 0; }
.entry-content figcaption {
    font-size: 0.85rem;
    color: #5E6A47;
    text-align: center;
    margin-top: 0.5em;
    font-style: italic;
}

/* «Разумный ремонт» — спецблок */
.smart-tip {
    background: #F0EDE4;
    border-left: 3px solid #7A4C3A;
    padding: 1rem 1.3rem;
    margin: 1.6em 0;
}
.smart-tip-label {
    display: inline-block;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    color: #7A4C3A;
    font-size: 0.85rem;
    margin: 0 0 0.4em;
}
.smart-tip p { margin: 0 0 0.5em; }
.smart-tip p:last-child { margin: 0; }

.entry-tags {
    margin: 2em 0 0;
    padding: 1em 0 0;
    border-top: 1px dashed #D9D2C3;
    font-size: 0.9rem;
    color: #5E6A47;
}
.entry-tags a {
    display: inline-block;
    margin-right: 0.4em;
    color: #5E6A47;
    text-decoration: none;
    border-bottom: 1px solid #D9D2C3;
}
.entry-tags a:hover { color: #7A4C3A; border-color: #7A4C3A; }

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2.5em 0;
    padding: 1.2em 0;
    border-top: 1px dashed #D9D2C3;
    border-bottom: 1px dashed #D9D2C3;
}
.post-nav-link {
    display: block;
    padding: 0.6em 0.8em;
    background: #F0EDE4;
    color: #2A2B26;
    border-radius: 6px;
    text-decoration: none;
}
.post-nav-link.next { text-align: right; }
.post-nav-link span {
    display: block;
    font-size: 0.78rem;
    color: #5E6A47;
    font-variant: small-caps;
    letter-spacing: 0.08em;
    margin-bottom: 0.2em;
}
.post-nav-link strong {
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-weight: 600;
    color: #7A4C3A;
    font-size: 1rem;
}

@media (max-width: 600px) {
    .entry-title { font-size: 1.7rem; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav-link.next { text-align: left; }
}

/* ======== BREADCRUMBS ======== */
.breadcrumbs {
    margin: 1.4rem 0 0;
    padding: 0 0 0.6rem;
    font-size: 0.85rem;
    color: #5E6A47;
    border-bottom: 1px dashed #D9D2C3;
    font-variant: small-caps;
    letter-spacing: 0.06em;
}
.breadcrumbs a { color: #5E6A47; text-decoration: none; }
.breadcrumbs a:hover { color: #7A4C3A; }
.breadcrumbs-sep { margin: 0 0.5em; color: #D9D2C3; }
.breadcrumbs-current { color: #7A4C3A; }

/* ======== PAGINATION ======== */
.pagination {
    margin: 2.5em 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    justify-content: center;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.7em;
    border-radius: 4px;
    text-decoration: none;
    color: #2A2B26;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-size: 0.95rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.pagination .page-numbers:hover {
    background: #F0EDE4;
}
.pagination .current {
    background: #7A4C3A;
    color: #F7F5F0;
}
.pagination .current:hover { background: #7A4C3A; }
.pagination .dots {
    background: transparent;
    pointer-events: none;
}

/* ======== SIDEBAR ======== */
.sidebar-area {
    font-size: 0.97rem;
}
.widget {
    background: #F0EDE4;
    border: 1px solid #D9D2C3;
    border-radius: 6px;
    padding: 1.1rem 1.2rem;
    margin: 0 0 1.5rem;
}
.widget-title {
    font-family: 'Spectral', 'Literata', Georgia, serif;
    color: #7A4C3A;
    font-size: 1.05rem;
    margin: 0 0 0.7em;
    padding: 0 0 0.4em;
    border-bottom: 1px dashed #D9D2C3;
    font-variant: small-caps;
    letter-spacing: 0.07em;
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget li {
    padding: 0.35em 0;
    border-bottom: 1px dashed #D9D2C3;
}
.widget li:last-child { border-bottom: none; }
.widget li a {
    color: #2A2B26;
    text-decoration: none;
}
.widget li a:hover { color: #7A4C3A; }

.widget select { width: 100%; padding: 0.4em; border: 1px solid #D9D2C3; background: #F7F5F0; }

/* ======== SEARCH FORM ======== */
.search-form {
    display: flex;
    gap: 0.4em;
    align-items: stretch;
}
.search-field {
    flex: 1;
    padding: 0.55em 0.8em;
    border: 1px solid #D9D2C3;
    background: #F7F5F0;
    border-radius: 6px;
    color: #2A2B26;
    font-family: inherit;
    font-size: 0.95rem;
}
.search-field:focus {
    outline: none;
    border-color: #7A4C3A;
}
.search-submit {
    background: #C9A87C;
    color: #2A2B26;
    border: none;
    border-radius: 8px;
    padding: 0 1em;
    cursor: pointer;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.07em;
    transition: background 0.2s ease;
}
.search-submit:hover { background: #B8996B; }

/* ======== COMMENTS ======== */
.comments-area {
    margin: 2.5em 0 0;
    padding: 1.5em 0 0;
    border-top: 1px dashed #D9D2C3;
}
.comments-title {
    font-family: 'Spectral', 'Literata', Georgia, serif;
    color: #7A4C3A;
    margin: 0 0 1em;
}
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list li { margin: 0 0 1em; }
.comment-body {
    background: #F0EDE4;
    border: 1px solid #D9D2C3;
    border-radius: 6px;
    padding: 1em 1.2em;
}
.comment-meta {
    font-size: 0.85rem;
    color: #5E6A47;
    margin: 0 0 0.5em;
    font-variant: small-caps;
    letter-spacing: 0.06em;
}
.comment-author { color: #7A4C3A; font-weight: 600; }
.comment-list .children {
    list-style: none;
    margin: 1em 0 0 1.5em;
    padding: 0;
}

.comment-form { margin: 1.5em 0 0; }
.comment-form label {
    display: block;
    margin: 0 0 0.3em;
    font-size: 0.9rem;
    color: #5E6A47;
    font-variant: small-caps;
    letter-spacing: 0.06em;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.55em 0.8em;
    border: 1px solid #D9D2C3;
    background: #F7F5F0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    color: #2A2B26;
    margin: 0 0 1em;
}
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: #7A4C3A; }
.comment-form .submit,
.form-submit input {
    background: #C9A87C;
    color: #2A2B26;
    border: none;
    border-radius: 8px;
    padding: 0.6em 1.4em;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.07em;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.comment-form .submit:hover,
.form-submit input:hover { background: #B8996B; }

/* ======== 404 ======== */
.error-404 {
    text-align: center;
    padding: 3em 1em;
}
.error-404 .error-code {
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-size: 6rem;
    color: #C9A87C;
    line-height: 1;
    margin: 0 0 0.2em;
}
.error-404 h1 {
    margin: 0 0 0.5em;
}
.error-404 .search-form {
    max-width: 460px;
    margin: 1.5em auto;
}
.btn-home {
    display: inline-block;
    background: #C9A87C;
    color: #2A2B26;
    border-radius: 8px;
    padding: 0.6em 1.4em;
    text-decoration: none;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.07em;
    transition: background 0.2s ease;
}
.btn-home:hover { background: #B8996B; color: #2A2B26; }

/* ======== FOOTER ======== */
.site-footer {
    background: #F0EDE4;
    color: #2A2B26;
    margin: 3rem 0 0;
    border-top: 1px solid #D9D2C3;
    position: relative;
}
.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(94, 106, 71, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.7;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.2rem;
    padding: 2.5rem 0 1.5rem;
    position: relative;
}
.footer-col .widget {
    background: transparent;
    border: none;
    padding: 0;
}
.footer-col .widget-title {
    color: #7A4C3A;
    border-color: #D9D2C3;
}
.footer-col li {
    border-color: #D9D2C3;
}
.footer-col li::before {
    /* Маленькая галочка перед элементами списка — оливковая */
    content: "✓ ";
    color: #5E6A47;
    margin-right: 0.3em;
    font-size: 0.85em;
}

.site-info {
    text-align: center;
    padding: 1.2rem 0 1.6rem;
    font-size: 0.85rem;
    color: #5E6A47;
    border-top: 1px dashed #D9D2C3;
    position: relative;
}

@media (max-width: 960px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* ======== COOKIE BANNER ======== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 9000;
    background: #2A2B26;
    color: #F7F5F0;
    border-radius: 10px;
    padding: 1rem 1.3rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.cookie-banner p {
    margin: 0;
    flex: 1 1 320px;
    font-size: 0.9rem;
    color: #F7F5F0;
    background: none;
}
.cookie-banner a {
    color: #C9A87C;
    text-decoration: underline;
}
.cookie-accept {
    background: #C9A87C;
    color: #2A2B26;
    border: none;
    border-radius: 8px;
    padding: 0.55em 1.4em;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.07em;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.cookie-accept:hover { background: #B8996B; }

@media (max-width: 600px) {
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
    .cookie-accept { align-self: stretch; }
}

/* ======== UTILITIES ======== */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin: 1em auto; }
.alignwide, .alignfull { margin: 1.5em 0; }

.wp-caption { max-width: 100%; }
.wp-caption-text {
    font-size: 0.85rem;
    color: #5E6A47;
    text-align: center;
    margin-top: 0.4em;
    font-style: italic;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
    margin: 1.5em 0;
}
.gallery-item img { display: block; width: 100%; height: auto; border-radius: 4px; }

/* ======== CATEGORY LABELS ======== */
.cat-label {
    display: inline-block;
    font-family: 'Spectral', 'Literata', Georgia, serif;
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
    color: #5E6A47;
    text-decoration: none;
    border-bottom: 1px solid #D9D2C3;
    padding: 0 0 0.05em;
}
.cat-label:hover { color: #7A4C3A; border-color: #7A4C3A; }
