:root {
    --bg: #0f1115;
    --surface: #171b22;
    --surface-soft: #222834;
    --text: #f3f4f6;
    --muted: #a1a1aa;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #c7a76a;
    --accent-dark: #a88a4d;
    --radius: 24px;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #0f1115, #1b1f27);
    color: var(--text);
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

code {
    padding: 0.18rem 0.38rem;
    border-radius: 0.45rem;
    background: rgba(199, 167, 106, 0.15);
    color: var(--accent);
}

.site-header {
    padding: 28px clamp(18px, 4vw, 56px) 34px;
}

.site-header.compact {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 0 10px;
}

.nav-wrap {
    max-width: 1100px;
    margin: 0 auto 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand::before {
    content: "";
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #f1d99c);
    box-shadow: 0 10px 25px rgba(199, 167, 106, 0.25);
}

.nav-note {
    color: var(--muted);
    font-size: 0.95rem;
}

.hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 30px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
}

.hero h1,
.article-body h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero-text {
    max-width: 800px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.container {
    width: min(1100px, 92%);
    margin: auto;
}

main.container {
    padding: 0 0 80px;
}

.toolbar {
    position: sticky;
    top: 12px;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, 0.6fr));
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 27, 34, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.field {
    display: grid;
    gap: 7px;
}

.field span {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #11151c;
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(199, 167, 106, 0.13);
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 2px 16px;
    color: var(--muted);
}

.summary-row p {
    margin: 0;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 22px;
}

.catalog-card,
.empty-state,
.article-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .30);
}

.catalog-card {
    display: flex;
    flex-direction: column;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.catalog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(199, 167, 106, 0.35);
    box-shadow: var(--shadow);
}

.thumb-link {
    height: 240px;
    background: var(--surface-soft);
    overflow: hidden;
}

.thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 250ms ease;
}

.catalog-card:hover .thumb-link img {
    transform: scale(1.04);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.card-meta,
.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.83rem;
    font-weight: 700;
}

.card-body h2 {
    margin: 0 0 10px;
    font-size: 1.22rem;
    line-height: 1.25;
}

.card-body h2 a:hover {
    color: var(--accent);
}

.card-body p {
    margin: 0 0 16px;
    color: var(--muted);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(199, 167, 106, 0.14);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
}

.read-more,
.pagination button,
.pagination a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 14px;
    background: #222834;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.read-more {
    margin-top: 18px;
}

.read-more:hover,
.pagination button:hover,
.pagination a:hover {
    background: #2e3646;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 28px 0 0;
}

.pagination-top {
    margin: 0 0 22px;
}

.pagination button[aria-current="page"] {
    background: var(--accent);
    color: #111;
}

.pagination button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
}

.article-shell {
    max-width: 1100px;
    margin: 24px auto 80px;
}

.article-card {
    border-radius: var(--radius);
}

.article-hero {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.article-body {
    padding: clamp(22px, 4vw, 36px);
}

.article-body h1 {
    margin-bottom: 18px;
}

.lead {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 1.08rem;
}

.content-prose {
    margin-top: 26px;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
}

.content-prose p {
    margin: 0 0 22px;
}

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

.site-footer {
    padding: 32px 18px 110px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Item navigation and floating WhatsApp */
.item-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 28px 0 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 14px;
    background: #222834;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    transition: background 180ms ease, transform 180ms ease;
}

.btn:hover {
    background: #2e3646;
    transform: translateY(-1px);
}

.btn-home {
    background: var(--accent);
    color: #111;
}

.btn-home:hover {
    background: #f1d99c;
}

.wa {
    position: fixed;
    right: 20px;
    bottom: 90px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 18px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}

.wa:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

@media (max-width: 960px) {
    .toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .field-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding-inline: 18px;
    }

    .site-header.compact {
        width: min(1100px, 92%);
        padding-inline: 0;
    }

    .nav-wrap {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 34px;
    }

    .toolbar {
        position: static;
        grid-template-columns: 1fr;
    }

    .field-search {
        grid-column: auto;
    }

    .summary-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .thumb-link {
        height: 220px;
    }

    .content-prose {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .item-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .item-nav .btn {
        width: 100%;
    }

    .wa {
        right: 16px;
        bottom: 18px;
    }
}
