/*
Theme Name: dds_act-live.com
Theme URI: https://act-live.com/
Author: Макаров Роман
Author URI: https://act-live.com/
Description: Тема для сайта о спорте и активном отдыхе. Тёплая, природная палитра (изумруд, терракота, песочный) с акцентом на чтение и подачу контента.
Version: 1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dds_act-live
*/

/* ===== TOKENS ===== */
:root {
    --c-bg: #F9F6F0;
    --c-bg-deep: #F2EDE2;
    --c-primary: #1E6F5C;
    --c-primary-dark: #154E42;
    --c-secondary: #C25A3C;
    --c-secondary-dark: #9C4124;
    --c-sand: #E8DCC4;
    --c-sand-soft: #F0E7D2;
    --c-text: #2C2C2C;
    --c-text-muted: #5A5A5A;
    --c-divider: #B9C4B1;
    --c-copper: #D98A5B;
    --c-white: #ffffff;

    --f-head: 'Montserrat Alternates', 'Helvetica Neue', Arial, sans-serif;
    --f-body: 'Lora', Georgia, 'Times New Roman', serif;

    --r-pill: 40px;
    --r-btn: 28px;
    --r-card: 14px;

    --sh-soft: 0 4px 18px rgba(30, 111, 92, 0.08);
    --sh-card: 0 6px 22px rgba(44, 44, 44, 0.07);
    --sh-deep: 0 12px 36px rgba(30, 111, 92, 0.16);

    --layout-max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--c-text);
    background-color: var(--c-bg);
    background-image:
        radial-gradient(rgba(185, 196, 177, 0.18) 1px, transparent 1px),
        radial-gradient(rgba(217, 138, 91, 0.10) 1px, transparent 1px);
    background-size: 28px 28px, 56px 56px;
    background-position: 0 0, 14px 14px;
    overflow-x: hidden;
}

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

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color .25s ease;
}
a:hover { color: var(--c-secondary); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.25;
    margin: 1.4em 0 0.5em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

hr {
    border: 0;
    height: 1px;
    background: var(--c-divider);
    margin: 2em 0;
}

blockquote {
    margin: 1.5em 0;
    padding: 1em 1.4em;
    background: var(--c-sand-soft);
    border-left: 4px solid var(--c-copper);
    font-style: italic;
    border-radius: 0 var(--r-card) var(--r-card) 0;
}

code, pre {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    background: var(--c-sand);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.92em;
}
pre {
    padding: 1em;
    overflow-x: auto;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    border: 1px solid var(--c-divider);
}
th, td {
    padding: 0.7em 0.9em;
    border: 1px solid var(--c-divider);
    text-align: left;
}
th {
    background: var(--c-sand);
    font-family: var(--f-head);
    font-weight: 600;
}

::selection { background: var(--c-copper); color: var(--c-white); }

/* ===== LAYOUT ===== */
.shell {
    width: min(92%, var(--layout-max));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--c-primary);
    color: var(--c-white);
    padding: .6em 1em;
    z-index: 9999;
}
.skip-link:focus { left: 0; }

/* Decorative copper line before main headings on content */
.section-title,
.entry-title,
.page-title {
    position: relative;
    padding-left: 1.4rem;
}
.section-title::before,
.entry-title::before,
.page-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0.7rem;
    height: 3px;
    background: var(--c-copper);
    transform: translateY(-50%);
    border-radius: 2px;
}

/* ===== HEADER ===== */
.site-head {
    background: var(--c-white);
    border-bottom: 1px solid var(--c-divider);
    box-shadow: var(--sh-soft);
}
.site-head-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}
.brand-logo {
    width: 56px;
    height: 56px;
    display: block;
    flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--c-primary);
}
.brand-tag {
    font-size: 0.82rem;
    color: var(--c-text-muted);
    margin-top: 2px;
}

.primary-nav { margin-left: auto; }
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.primary-nav a {
    display: inline-block;
    padding: 0.55em 1em;
    color: var(--c-text);
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 0.96rem;
    border-radius: var(--r-pill);
    transition: background .25s ease, color .25s ease, transform .25s ease;
    position: relative;
}
.primary-nav a:hover {
    background: var(--c-primary);
    color: var(--c-white);
    transform: translateY(-1px);
}
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
    background: var(--c-sand);
    color: var(--c-primary-dark);
}

/* Burger */
.burger {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    margin-left: auto;
}
.burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--c-primary);
    margin: 5px auto;
    transition: transform .3s ease, opacity .25s ease;
    border-radius: 2px;
}
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== BREADCRUMBS ===== */
.trail {
    margin: 1.5rem 0 0.5rem;
    font-size: 0.9rem;
    color: var(--c-text-muted);
}
.trail ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.trail a { color: var(--c-primary); }
.trail a:hover { color: var(--c-secondary); }
.trail .crumb-sep { color: var(--c-divider); }
.trail [aria-current="page"] { color: var(--c-text); }

/* ===== MAIN GRID ===== */
.site-main { padding: 2rem 0 3rem; }
.layout {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
}
.layout.has-aside {
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
}
.layout.full-width .content-area { max-width: 85%; margin-inline: auto; }
.layout.front .content-area { max-width: 85%; margin-inline: auto; width: 100%; }

@media (max-width: 960px) {
    .layout.has-aside { grid-template-columns: 1fr; }
    .layout.full-width .content-area,
    .layout.front .content-area { max-width: 100%; }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.6em;
    border-radius: var(--r-btn);
    font-family: var(--f-head);
    font-weight: 600;
    font-size: 0.96rem;
    cursor: pointer;
    border: 0;
    text-decoration: none;
    line-height: 1;
    background: var(--c-primary);
    color: var(--c-white);
    transition: background .3s ease, transform .25s ease, box-shadow .3s ease;
    box-shadow: 0 4px 12px rgba(30, 111, 92, 0.25);
}
.btn:hover {
    background: var(--c-secondary);
    color: var(--c-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(194, 90, 60, 0.32);
}
.btn-ghost {
    background: transparent;
    color: var(--c-primary);
    box-shadow: inset 0 0 0 2px var(--c-primary);
}
.btn-ghost:hover {
    background: var(--c-primary);
    color: var(--c-white);
}
.btn-secondary { background: var(--c-secondary); }
.btn-secondary:hover { background: var(--c-primary); }

/* Pill category buttons */
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0 0;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55em 1.1em;
    background: var(--c-sand);
    color: var(--c-text);
    border-radius: var(--r-pill);
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background .25s ease, color .25s ease;
    border: 0;
    cursor: pointer;
}
.pill:hover, .pill.is-active {
    background: var(--c-primary);
    color: var(--c-white);
}

/* Read-more link in cards */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--c-secondary);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color .25s ease;
}
.read-more .arrow { transition: transform .25s ease; }
.read-more:hover { color: var(--c-secondary-dark); }
.read-more:hover .arrow { transform: translateX(4px); }

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

.card {
    display: flex;
    flex-direction: column;
    background: var(--c-white);
    border-radius: var(--r-card);
    overflow: hidden;
    box-shadow: var(--sh-card);
    transition: transform .3s ease, box-shadow .3s ease;
    border: 1px solid rgba(185, 196, 177, 0.4);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-deep);
}

.card-thumb-wrap {
    flex: 0 0 auto;
    overflow: hidden;
    background: var(--c-sand);
}
.card-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.04); }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2rem 1.3rem 1.4rem;
}
.card-meta {
    font-size: 0.82rem;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    font-family: var(--f-head);
}
.card-meta a { color: var(--c-primary); }
.card-title {
    font-family: var(--f-head);
    font-size: 1.18rem;
    margin: 0 0 0.6rem;
    line-height: 1.3;
}
.card-title a { color: var(--c-text); }
.card-title a:hover { color: var(--c-primary); }

.card-excerpt {
    color: var(--c-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}
.card-excerpt p:last-child { margin-bottom: 0; }

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 1rem;
}

/* Horizontal card variant (single columns / archives) */
.card-horiz {
    flex-direction: row;
    align-items: stretch;
}
.card-horiz .card-thumb-wrap {
    flex: 0 0 280px;
    position: relative;
}
.card-horiz .card-thumb-wrap a {
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
.card-horiz .card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
    display: block;
}

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

/* ===== FRONT PAGE ===== */
.hero {
    background:
        linear-gradient(135deg, rgba(30, 111, 92, 0.92) 0%, rgba(21, 78, 66, 0.95) 100%),
        radial-gradient(circle at 20% 80%, rgba(217, 138, 91, 0.4), transparent 50%);
    color: var(--c-white);
    padding: 3.5rem 0 4rem;
    border-radius: var(--r-card);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(232, 220, 196, 0.25), transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 0 2rem;
}
.hero h1 {
    color: var(--c-white);
    font-size: 2.6rem;
    margin: 0 0 0.6rem;
    padding-left: 0;
}
.hero h1::before { display: none; }
.hero p {
    font-size: 1.15rem;
    color: var(--c-sand-soft);
    margin-bottom: 1.6rem;
}
.hero .pill { background: rgba(255,255,255,0.15); color: var(--c-white); }
.hero .pill:hover { background: var(--c-copper); color: var(--c-white); }

.section {
    margin: 3.5rem 0;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.section-head p { margin: 0; color: var(--c-text-muted); }

/* Activity grid */
.activity-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.activity-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1.4rem 1.2rem;
    background: var(--c-sand);
    border-radius: var(--r-card);
    transition: transform .3s ease, background .3s ease, color .3s ease;
    text-decoration: none;
    color: var(--c-text);
    min-height: 160px;
}
.activity-card:hover {
    background: var(--c-primary);
    color: var(--c-white);
    transform: translateY(-3px);
}
.activity-card .ico {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    transition: background .3s ease;
}
.activity-card:hover .ico { background: rgba(255,255,255,0.2); }
.activity-card .ico svg { width: 24px; height: 24px; }
.activity-card h3 {
    font-family: var(--f-head);
    font-size: 1.05rem;
    margin: 0;
    padding-left: 0;
    color: inherit;
}
.activity-card h3::before { display: none; }
.activity-card p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    opacity: 0.85;
}

/* Steps block — "Как выбрать направление" */
.steps {
    background: var(--c-sand-soft);
    border-radius: var(--r-card);
    padding: 2.2rem 2rem;
}
.steps-progress {
    height: 6px;
    background: rgba(194, 90, 60, 0.15);
    border-radius: 3px;
    margin: 1.4rem 0 2rem;
    overflow: hidden;
}
.steps-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--c-secondary), var(--c-copper));
    border-radius: 3px;
    width: 33%;
    transition: width .4s ease;
}
.steps-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: stepc;
}
.step-card {
    background: var(--c-white);
    border-radius: var(--r-card);
    padding: 1.3rem 1.2rem;
    counter-increment: stepc;
    position: relative;
    border: 1px solid var(--c-divider);
}
.step-card::before {
    content: counter(stepc);
    position: absolute;
    top: -12px;
    left: 16px;
    background: var(--c-secondary);
    color: var(--c-white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 0.9rem;
}
.step-card h4 {
    margin: 0.4rem 0 0.4rem;
    font-size: 1rem;
}
.step-card p {
    font-size: 0.9rem;
    color: var(--c-text-muted);
    margin: 0;
}

/* "Совет от Романа" — author block */
.author-tip {
    background: linear-gradient(135deg, rgba(194, 90, 60, 0.10), rgba(217, 138, 91, 0.18));
    border-radius: var(--r-card);
    padding: 2rem 2.2rem;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1.6rem;
    align-items: center;
    position: relative;
    border: 1px solid rgba(194, 90, 60, 0.25);
}
.author-tip::before {
    content: '';
    position: absolute;
    right: 1.4rem;
    top: 1.2rem;
    width: 36px;
    height: 36px;
    background: var(--c-white);
    border-radius: 50%;
    box-shadow: var(--sh-soft);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C25A3C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
}
.author-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-white);
    font-family: var(--f-head);
    font-size: 2.4rem;
    font-weight: 700;
    box-shadow: var(--sh-soft);
    border: 4px solid var(--c-white);
}
.author-tip-body h3 {
    margin: 0 0 0.4rem;
    padding-left: 0;
    font-size: 1.1rem;
    color: var(--c-secondary-dark);
}
.author-tip-body h3::before { display: none; }
.author-tip-body blockquote {
    margin: 0;
    padding: 0;
    background: transparent;
    border-left: 0;
    font-size: 1.04rem;
    color: var(--c-text);
    line-height: 1.6;
}
.author-tip-body cite {
    display: block;
    margin-top: 0.6rem;
    font-style: normal;
    font-family: var(--f-head);
    font-size: 0.88rem;
    color: var(--c-text-muted);
}

@media (max-width: 600px) {
    .author-tip { grid-template-columns: 1fr; text-align: center; padding: 1.6rem; }
    .author-avatar { margin: 0 auto; }
}

/* Weekend ribbon */
.ribbon-wrap {
    background: var(--c-primary-dark);
    border-radius: var(--r-card);
    padding: 1.6rem 0 1.6rem 2rem;
    color: var(--c-white);
    overflow: hidden;
}
.ribbon-wrap h3 {
    color: var(--c-white);
    margin: 0 2rem 1rem 0;
    padding-left: 0;
    font-size: 1.3rem;
}
.ribbon-wrap h3::before { display: none; }
.ribbon-track {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 0.4rem 1rem 0.8rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.ribbon-track::-webkit-scrollbar { height: 6px; }
.ribbon-track::-webkit-scrollbar-thumb { background: var(--c-copper); border-radius: 3px; }

.ribbon-item {
    flex: 0 0 240px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(232, 220, 196, 0.25);
    padding: 1rem 1.1rem;
    border-radius: 12px;
    scroll-snap-align: start;
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    transition: background .25s ease, transform .25s ease;
}
.ribbon-item:hover {
    background: rgba(217, 138, 91, 0.25);
    transform: translateY(-2px);
}
.ribbon-pin {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--c-copper);
}
.ribbon-item p { margin: 0; font-size: 0.92rem; line-height: 1.5; }

/* Section: recent posts on front page */
.front-recent .cards .card { background: var(--c-white); }

/* ===== ENTRY (single / page) ===== */
.entry {
    background: var(--c-white);
    border-radius: var(--r-card);
    padding: 2rem 2.2rem;
    box-shadow: var(--sh-card);
}
.entry-thumb {
    margin: 0 -2.2rem 1.5rem;
    overflow: hidden;
    border-radius: var(--r-card) var(--r-card) 0 0;
}
.entry-thumb img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}
.entry-meta {
    color: var(--c-text-muted);
    font-size: 0.92rem;
    margin-bottom: 1.2rem;
    font-family: var(--f-head);
}
.entry-meta span { margin-right: 1rem; }
.entry-content { font-size: 1.05rem; }
.entry-content h2,
.entry-content h3 { margin-top: 1.6em; }
.entry-content ul,
.entry-content ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content figure { margin: 1.5em 0; }

.entry-tags {
    margin-top: 2rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--c-divider);
}
.entry-tags a {
    display: inline-block;
    background: var(--c-sand);
    padding: 0.3em 0.9em;
    border-radius: var(--r-pill);
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--c-text);
    text-decoration: none;
    transition: background .25s ease, color .25s ease;
}
.entry-tags a:hover { background: var(--c-primary); color: var(--c-white); }

@media (max-width: 600px) {
    .entry { padding: 1.4rem; }
    .entry-thumb { margin: 0 -1.4rem 1.2rem; }
}

/* ===== SIDEBAR ===== */
.sidebar { font-size: 0.96rem; }
.sidebar .widget {
    background: var(--c-white);
    border-radius: var(--r-card);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.4rem;
    box-shadow: var(--sh-card);
}
.sidebar .widget-title {
    font-family: var(--f-head);
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    padding-left: 0.9rem;
    position: relative;
    color: var(--c-primary);
}
.sidebar .widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--c-copper);
    border-radius: 2px;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--c-divider);
}
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--c-text); }
.sidebar a:hover { color: var(--c-secondary); }

/* ===== PAGINATION ===== */
.pager {
    margin: 2.2rem 0 1rem;
}
.pager ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}
.pager a, .pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.9em;
    border-radius: var(--r-pill);
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    background: var(--c-white);
    color: var(--c-text);
    border: 1px solid var(--c-divider);
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.pager a:hover {
    background: var(--c-primary);
    color: var(--c-white);
    border-color: var(--c-primary);
}
.pager .current {
    background: var(--c-primary);
    color: var(--c-white);
    border-color: var(--c-primary);
}
.pager .dots { background: transparent; border: 0; }

/* ===== COMMENTS ===== */
.comments-area {
    margin-top: 2.5rem;
    background: var(--c-white);
    border-radius: var(--r-card);
    padding: 1.8rem 2rem;
    box-shadow: var(--sh-card);
}
.comments-title {
    font-family: var(--f-head);
    font-size: 1.3rem;
    margin: 0 0 1.4rem;
    padding-left: 1.2rem;
    position: relative;
    color: var(--c-primary);
}
.comments-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    background: var(--c-copper);
    border-radius: 50%;
}
.comments-area ol.comment-list,
.comments-area .comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.8rem;
}
.comment-item {
    border-bottom: 1px dashed var(--c-divider);
    padding: 1.1rem 0;
}
.comment-item:last-child { border-bottom: 0; }
.comment-item .children {
    list-style: none;
    padding: 0 0 0 1.4rem;
    margin: 0.8rem 0 0;
    border-left: 3px solid var(--c-sand);
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}
.comment-meta-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.comment-author {
    font-family: var(--f-head);
    font-weight: 600;
    color: var(--c-text);
}
.comment-date {
    font-size: 0.82rem;
    color: var(--c-text-muted);
}
.comment-content { color: var(--c-text); }
.comment-content p { margin: 0 0 0.6em; }
.comment-actions { margin-top: 0.4rem; }
.comment-reply-link {
    font-size: 0.88rem;
    color: var(--c-secondary);
    font-family: var(--f-head);
}

.comment-form {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}
.comment-form-comment,
.comment-form-cookies-consent,
.comment-form .form-submit,
.comment-notes,
.logged-in-as { grid-column: 1 / -1; }
.comment-form label {
    display: block;
    font-family: var(--f-head);
    font-weight: 500;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7em 0.9em;
    border: 1px solid var(--c-divider);
    border-radius: 10px;
    background: var(--c-bg);
    font-family: inherit;
    font-size: 1rem;
    color: var(--c-text);
    transition: border-color .25s ease, background .25s ease;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: 0;
    border-color: var(--c-primary);
    background: var(--c-white);
}
.comment-form .form-submit input[type="submit"] {
    height: 48px;
    padding: 0 2em;
    border-radius: var(--r-btn);
    font-family: var(--f-head);
    font-weight: 600;
    background: var(--c-primary);
    color: var(--c-white);
    border: 0;
    cursor: pointer;
    transition: background .3s ease;
}
.comment-form .form-submit input[type="submit"]:hover {
    background: var(--c-secondary);
}

@media (max-width: 600px) {
    .comment-form { grid-template-columns: 1fr; }
    .comments-area { padding: 1.4rem; }
}

/* ===== SEARCH FORM ===== */
.search-form {
    display: flex;
    gap: 0.5rem;
}
.search-form .search-field {
    flex: 1;
    padding: 0.7em 1em;
    border: 1px solid var(--c-divider);
    border-radius: var(--r-pill);
    background: var(--c-white);
    font-size: 0.96rem;
    font-family: inherit;
    color: var(--c-text);
}
.search-form .search-field:focus {
    outline: 0;
    border-color: var(--c-primary);
}
.search-form .search-submit {
    height: 44px;
    padding: 0 1.4em;
    border-radius: var(--r-pill);
    background: var(--c-primary);
    color: var(--c-white);
    border: 0;
    cursor: pointer;
    font-family: var(--f-head);
    font-weight: 500;
}
.search-form .search-submit:hover { background: var(--c-secondary); }

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    background: var(--c-white);
    border-radius: var(--r-card);
    padding: 3.5rem 2rem;
    box-shadow: var(--sh-card);
}
.error-404 h1 {
    font-size: 4rem;
    color: var(--c-primary);
    margin: 0 0 0.4rem;
    padding-left: 0;
}
.error-404 h1::before { display: none; }
.error-404 p { font-size: 1.05rem; color: var(--c-text-muted); }
.error-404 .search-form {
    max-width: 480px;
    margin: 1.6rem auto;
}

/* ===== PAGE TITLE / ARCHIVE HEADER ===== */
.page-title-wrap {
    margin-bottom: 1.5rem;
}
.page-title-wrap .page-title {
    font-size: 2rem;
    margin: 0 0 0.4rem;
}
.archive-description { color: var(--c-text-muted); }

/* ===== FOOTER ===== */
.site-foot {
    background: var(--c-primary-dark);
    color: var(--c-sand-soft);
    padding: 3rem 0 1.4rem;
    margin-top: 3rem;
}
.foot-cols {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 800px) { .foot-cols { grid-template-columns: 1fr; } }

.site-foot .footer-widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
.site-foot .widget-title {
    color: var(--c-white);
    font-family: var(--f-head);
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    padding-left: 1rem;
    position: relative;
}
.site-foot .widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--c-copper);
    border-radius: 2px;
}
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { padding: 0.3rem 0; }
.site-foot a { color: var(--c-sand-soft); }
.site-foot a:hover { color: var(--c-copper); }
.site-foot p { color: var(--c-sand-soft); margin: 0 0 0.6em; }

.foot-bottom {
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(232, 220, 196, 0.18);
    text-align: center;
    font-size: 0.88rem;
    color: rgba(232, 220, 196, 0.7);
}

/* ===== COOKIE BANNER (rule comes BEFORE main block — see A11) ===== */
.cookie-banner[hidden] { display: none !important; }

.cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--c-text);
    color: var(--c-bg);
    padding: 1rem 1.4rem;
    border-radius: var(--r-card);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.18);
    max-width: 720px;
    margin-inline: auto;
}
.cookie-banner p {
    margin: 0;
    font-size: 0.92rem;
    flex: 1 1 280px;
}
.cookie-banner .btn {
    height: 40px;
    padding: 0 1.4em;
    background: var(--c-copper);
    color: var(--c-text);
    box-shadow: none;
}
.cookie-banner .btn:hover { background: var(--c-secondary); color: var(--c-white); }

/* ===== UTIL ===== */
.alignleft  { float: left;  margin: 0.4em 1.4em 0.6em 0; }
.alignright { float: right; margin: 0.4em 0 0.6em 1.4em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text {
    font-size: 0.86rem;
    color: var(--c-text-muted);
    text-align: center;
    margin-top: 0.4em;
}
.gallery { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.gallery-item { flex: 1 1 120px; }

/* ===== RESPONSIVE — burger toggle ===== */
@media (max-width: 800px) {
    .burger { display: block; }
    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--c-white);
        box-shadow: var(--sh-soft);
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }
    .primary-nav.is-open { max-height: 500px; }
    .primary-nav ul {
        flex-direction: column;
        padding: 1rem 1.2rem;
        gap: 0.2rem;
    }
    .primary-nav a {
        display: block;
        padding: 0.7em 0.9em;
    }
    .site-head-inner { position: relative; flex-wrap: nowrap; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    .hero { padding: 2.4rem 0 2.6rem; }
    .hero-inner { padding: 0 1.4rem; }
    .hero h1 { font-size: 1.9rem; }
    .entry { padding: 1.4rem; }
    .layout { gap: 1.6rem; }
    .ribbon-wrap { padding: 1.4rem 0 1.4rem 1rem; }
    .ribbon-wrap h3 { margin-left: 0.4rem; }
}
