/* =========================================================
   BASE
========================================================= */
:root {
    --bg: #faf7f4;
    --bg-2: #f4efea;
    --surface: #ffffff;
    --surface-2: #faf6f2;
    --surface-3: #f0e9e3;

    /* Динамические — подставляет php.txt перед подключением этого файла */
    --orange-dark: #c2691c;
    --orange: #e67e22;
    --orange-light: #f39c12;
    --border: rgba(30,15,10,.09);
    --text: #1f1411;
    --text-2: #5a4842;
    --text-3: #2d231e;

    --gradient: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);

    --nav-bg: #ffffff;
    --nav-text: #3d2e28;
    --nav-hover-bg: #f4efea;
    --nav-hover-text: var(--primary-dark);
    --nav-active-bg: var(--primary);
    --nav-active-text: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        'Helvetica Neue',
        Arial,
        sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(var(--primary-rgb), .07), transparent 30%),
        radial-gradient(circle at 88% 15%, rgba(230,126,34,.06), transparent 28%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font-family: inherit; }

/* =========================================================
   SVG ICONS
========================================================= */
.ico, .ico-xs, .ico-sm, .ico-md, .ico-lg, .ico-xl, .ico-xxl {
    display: inline-block;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ico-xs  { width: 14px; height: 14px; }
.ico-sm  { width: 16px; height: 16px; }
.ico     { width: 18px; height: 18px; }
.ico-md  { width: 22px; height: 22px; }
.ico-lg  { width: 32px; height: 32px; }
.ico-xl  { width: 48px; height: 48px; }
.ico-xxl { width: 64px; height: 64px; }

/* =========================================================
   HEADER
========================================================= */
.header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(250,247,244,.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1280px; min-height: 76px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
    display: flex; align-items: center; gap: 12px;
    font-size: 20px; font-weight: 900; letter-spacing: -.5px;
    white-space: nowrap; color: var(--text);
}
.logo-img {
    width: 42px; height: 42px;
}

.nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border-radius: 10px;
    color: var(--nav-text); background: var(--nav-bg);
    font-size: 14px; font-weight: 600;
    border: 1px solid transparent;
    transition: background-color .2s, color .2s, border-color .2s;
}
.nav a:hover { background: var(--nav-hover-bg); color: var(--nav-hover-text); }
.nav a.active { background: var(--nav-active-bg); color: var(--nav-active-text); border-color: var(--nav-active-bg); }
.nav a.active svg { stroke: #fff; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.search {
    width: 260px; display: flex; align-items: center;
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    transition: border-color .2s, box-shadow .2s;
}
.search:focus-within {
    border-color: rgba(var(--primary-rgb), .55);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .08);
}
.search form { display: flex; width: 100%; }
.search input {
    width: 100%; background: transparent; border: none; outline: none;
    padding: 11px 12px; color: var(--text); font-size: 14px;
}
.search input::placeholder { color: var(--text-3); }
.search button {
    width: 44px; background: transparent; border: none; color: var(--text-2);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.search button:hover { color: var(--primary); }

.menu-toggle {
    display: none; width: 40px; height: 40px; border-radius: 10px;
    background: #fff; border: 1px solid var(--border); cursor: pointer;
    align-items: center; justify-content: center; color: var(--text);
}
.mobile-nav {
    display: none; flex-direction: column; gap: 4px;
    padding: 12px 24px 16px; border-top: 1px solid var(--border); background: #fff;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    padding: 10px 14px; border-radius: 10px; font-size: 15px; font-weight: 600;
    color: var(--nav-text); display: flex; align-items: center; gap: 8px;
}
.mobile-nav a:hover { background: var(--nav-hover-bg); color: var(--nav-hover-text); }
.mobile-nav a.active { background: var(--nav-active-bg); color: var(--nav-active-text); }
.mobile-nav a.active svg { stroke: #fff; }

/* =========================================================
   BREADCRUMBS
========================================================= */
.breadcrumbs {
    max-width: 1280px; margin: 0 auto; padding: 18px 24px 0;
    color: var(--text-3); font-size: 13px;
}
.breadcrumbs a { color: var(--text-2); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 8px; color: #c9b8ae; }

/* =========================================================
   CONTAINER / PAGE HEADER
========================================================= */
.container { max-width: 1280px; margin: 0 auto; padding: 28px 24px 70px; }

.page-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 25px; margin-bottom: 25px;
}
.page-title {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    color: var(--text); font-size: 34px; font-weight: 900;
    line-height: 1.15; letter-spacing: -1.2px;
}
.page-title::before {
    content: ""; width: 5px; height: 34px; border-radius: 10px;
    background: var(--gradient);
}
.page-title .count {
    font-size: 13px; font-weight: 700; color: var(--orange-dark);
    padding: 5px 11px; border-radius: 20px;
    background: rgba(230,126,34,.12); border: 1px solid rgba(230,126,34,.25);
}
.page-subtitle { margin-top: 8px; color: var(--text-2); font-size: 14px; }

/* =========================================================
   CATEGORIES BAR
========================================================= */
.categories-bar {
    display: flex; gap: 8px; flex-wrap: nowrap; align-items: center;
    padding: 12px 14px; margin-bottom: 22px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: 0 4px 18px rgba(60,30,20,.04);
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.categories-bar::-webkit-scrollbar { height: 6px; }
.categories-bar::-webkit-scrollbar-thumb { background: #e2d6cd; border-radius: 6px; }
.categories-bar::-webkit-scrollbar-track { background: transparent; }

.categories-bar a {
    display: inline-flex; align-items: center; gap: 7px;
    flex: 0 0 auto; padding: 9px 15px; border-radius: 10px;
    font-size: 13px; font-weight: 600; line-height: 1;
    white-space: nowrap; text-decoration: none; border: 1px solid transparent;
    color: var(--text-2); background: var(--surface-2);
    transition: background-color .18s, color .18s, border-color .18s;
}
.categories-bar a .cat-label { color: inherit; }
.categories-bar a svg {
    width: 16px; height: 16px; flex: 0 0 auto;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.categories-bar a:hover {
    color: var(--primary-dark);
    background: rgba(var(--primary-rgb), .09);
    border-color: rgba(var(--primary-rgb), .35);
}
.categories-bar a:hover svg { stroke: var(--primary-dark); }
.categories-bar a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .25); }
.categories-bar a.is-active {
    color: #fff !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), .28);
}
.categories-bar a.is-active svg { stroke: #fff !important; }
.categories-bar a.is-active:hover {
    color: #fff !important;
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}
.categories-bar a.is-active:hover svg { stroke: #fff !important; }

.categories-bar a.cat-all {
    color: var(--text); background: var(--surface-3); border-color: var(--border);
}
.categories-bar a.cat-all:hover {
    color: var(--primary-dark);
    background: rgba(var(--primary-rgb), .09);
    border-color: rgba(var(--primary-rgb), .35);
}

/* =========================================================
   GRID + CARD
========================================================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: 17px;
    box-shadow: 0 4px 18px rgba(60,30,20,.04);
    transition: border-color .2s, box-shadow .2s;
}
.card:hover {
    border-color: rgba(var(--primary-rgb), .4);
    box-shadow: 0 14px 34px rgba(60,30,20,.09);
}
.card .card-img {
    position: relative; height: 205px; overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(var(--primary-rgb), .08), transparent 60%), var(--surface-3);
    padding: 4px 4px 0 4px;
}
.card .card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 13px 13px 0 0; }
.card .card-img .card-icon {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; color: var(--text-3); opacity: .55;
}
.card-body { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; padding: 17px 18px 18px; }
.card-cat {
    display: inline-flex; align-items: center; gap: 5px; width: fit-content;
    padding: 4px 9px; margin-bottom: 9px;
    background: rgba(230,126,34,.08); border: 1px solid rgba(230,126,34,.18); border-radius: 6px;
    font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
}
.card-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 7px; color: var(--text);
    font-size: 18px; font-weight: 800; line-height: 1.3;
}
.card:hover .card-title { color: var(--primary); }
.card-excerpt {
    flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; color: var(--text-2); font-size: 13px; line-height: 1.55;
}
.card-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
    color: var(--text-3); font-size: 11px;
}
.card-meta span, .card-meta time { display: inline-flex; align-items: center; gap: 5px; }

/* =========================================================
   ARTICLE
========================================================= */
.article-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-category {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 13px; margin-bottom: 13px; border-radius: 7px;
    font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase;
    background: rgba(var(--primary-rgb), .08);
    color: var(--primary-dark);
    border: 1px solid rgba(var(--primary-rgb), .2);
}
.article-title {
    color: var(--text); font-size: 48px; font-weight: 900;
    line-height: 1.08; letter-spacing: -2px; margin-bottom: 15px;
}
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--text-3); font-size: 13px; }
.article-meta span, .article-meta time { display: inline-flex; align-items: center; gap: 5px; }
.article-meta time.updated { color: var(--orange-dark); }
.badge-green {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 6px;
    color: var(--orange-dark); background: rgba(230,126,34,.1);
    border: 1px solid rgba(230,126,34,.2); font-size: 11px; font-weight: 800;
}
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tags span {
    padding: 5px 10px; border-radius: 7px; color: var(--text-2);
    background: var(--surface-2); border: 1px solid var(--border); font-size: 12px;
}
.article-img {
    width: 100%; max-height: 560px; object-fit: cover; border-radius: 18px;
    margin-bottom: 25px; border: 1px solid var(--border);
}
.toc {
    max-width: 900px; margin: 0 0 25px; padding: 18px 22px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
}
.toc-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 13px; }
.toc a { color: var(--text-2); }
.toc a:hover { color: var(--primary); }

.article-content { max-width: 900px; color: #3d2e28; font-size: 15px; line-height: 1.85; }
.article-content h2 {
    position: relative; margin: 40px 0 16px; padding-left: 16px;
    color: var(--text); font-size: 28px; font-weight: 800; line-height: 1.25;
}
.article-content h2::before {
    content: ""; position: absolute; left: 0; top: 3px; bottom: 3px;
    width: 4px; border-radius: 5px; background: var(--gradient);
}
.article-content h3 { color: var(--text); font-size: 21px; font-weight: 800; margin: 28px 0 12px; }
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 15px 0 20px; padding-left: 25px; }
.article-content li { margin-bottom: 7px; }
.article-content blockquote {
    margin: 25px 0; padding: 18px 22px; border-left: 3px solid var(--primary);
    border-radius: 0 12px 12px 0;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), .06), rgba(var(--primary-rgb), .015));
    color: var(--text-2); font-style: italic;
}
.article-content table {
    width: 100%; margin: 22px 0; border-collapse: separate; border-spacing: 0;
    overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: 13px;
}
.article-content th { padding: 12px 15px; text-align: left; color: #fff; background: var(--surface-3); font-size: 13px; font-weight: 800; }
.article-content td { padding: 12px 15px; color: var(--text-2); border-top: 1px solid var(--border); font-size: 13px; }

/* =========================================================
   SOURCES
========================================================= */
.sources-section { margin-top: 32px; padding: 20px 22px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.sources-section h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: var(--text); font-size: 15px; font-weight: 800; }
.sources-section ul { list-style: none; padding: 0; margin: 0; }
.sources-section li { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.sources-section li:last-child { border-bottom: none; }
.sources-section a { flex: 1; color: var(--orange-dark); word-break: break-all; }
.sources-section a:hover { color: var(--primary); }
.sources-section .source-type { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 5px; color: var(--text-3); background: #fff; border: 1px solid var(--border); white-space: nowrap; font-size: 10px; }

/* =========================================================
   SHARE
========================================================= */
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 28px 0; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.share span { margin-right: 4px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.share a { padding: 7px 14px; border-radius: 8px; color: #fff; font-size: 12px; font-weight: 700; transition: filter .2s; }
.share a:hover { filter: brightness(1.08); }
.share .vk { background: #2787f5; }
.share .tg { background: #229ed9; }
.share .wa { background: #25d366; }

/* =========================================================
   RELATED
========================================================= */
.related { margin: 42px 0; }
.related h3 { margin-bottom: 17px; color: var(--text); font-size: 22px; font-weight: 800; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.related-card { padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 4px 16px rgba(60,30,20,.04); transition: border-color .2s, box-shadow .2s; }
.related-card:hover { border-color: rgba(var(--primary-rgb), .4); box-shadow: 0 10px 28px rgba(60,30,20,.08); }
.related-card h4 { margin-bottom: 6px; color: var(--text); font-size: 15px; }
.related-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-2); font-size: 13px; }
.related-card .related-meta { display: flex; align-items: center; gap: 5px; margin-top: 9px; color: var(--text-3); font-size: 11px; }

/* =========================================================
   PAGINATION
========================================================= */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 35px; }
.pagination a, .pagination span { min-width: 42px; padding: 9px 14px; text-align: center; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); background: #fff; border: 1px solid var(--border); border-radius: 9px; font-size: 13px; font-weight: 600; transition: background-color .2s, color .2s, border-color .2s; }
.pagination a:hover { color: var(--primary); background: rgba(var(--primary-rgb), .06); border-color: rgba(var(--primary-rgb), .35); }
.pagination .current { color: #fff; background: var(--gradient); border-color: transparent; }

/* =========================================================
   EMPTY / BTN
========================================================= */
.empty { padding: 90px 20px; text-align: center; color: var(--text-3); }
.empty-icon { margin-bottom: 15px; display: flex; justify-content: center; color: var(--text-3); }
.empty h2 { margin-bottom: 8px; color: var(--text); font-size: 25px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding: 11px 22px; color: #fff; background: var(--gradient); border: none; border-radius: 10px; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 30px rgba(var(--primary-rgb), .18); transition: filter .2s, box-shadow .2s; }
.btn:hover { filter: brightness(1.06); box-shadow: 0 14px 36px rgba(var(--primary-rgb), .26); }

/* =========================================================
   STATIC PAGES
========================================================= */
.static-page { max-width: 900px; }
.static-page .article-title { margin-bottom: 20px; }
.static-page .article-content { font-size: 16px; line-height: 1.8; }
.static-page .article-content h2 { margin-top: 32px; }
.static-page .article-content ul { margin: 12px 0 18px; }
.static-page .article-content a { color: var(--orange-dark); text-decoration: underline; text-underline-offset: 2px; }
.static-page .article-content a:hover { color: var(--primary); }

.contact-form { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin-top: 15px; }
.contact-form label { font-size: 13px; font-weight: 700; color: var(--text); }
.contact-form input, .contact-form textarea { padding: 11px 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s; }
.contact-form input:focus, .contact-form textarea:focus { border-color: rgba(var(--primary-rgb), .55); box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .08); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .btn { align-self: flex-start; }
.form-success, .form-error { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 15px; }
.form-success { color: #1e6b3a; background: rgba(46,160,80,.08); border: 1px solid rgba(46,160,80,.25); }
.form-error { color: var(--primary-dark); background: rgba(var(--primary-rgb), .06); border: 1px solid rgba(var(--primary-rgb), .25); }

/* =========================================================
   FOOTER
========================================================= */
.footer { position: relative; padding: 35px 20px; color: var(--text-3); background: linear-gradient(to bottom, rgba(255,255,255,.5), rgba(240,233,227,.8)); border-top: 1px solid var(--border); text-align: center; font-size: 12px; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--primary); }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.footer-links a { font-size: 11px; display: inline-flex; align-items: center; gap: 5px; }

/* =========================================================
   404
========================================================= */
.error-404 { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 40px 20px; }
.error-404-content { max-width: 600px; text-align: center; }
.error-404-icon { display: flex; justify-content: center; margin-bottom: 20px; color: var(--text-3); }
.error-404-title { font-size: 120px; font-weight: 900; line-height: 1; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 10px; }
.error-404-subtitle { color: var(--text); font-size: 28px; font-weight: 700; margin-bottom: 15px; }
.error-404-text { color: var(--text-2); font-size: 16px; margin-bottom: 30px; line-height: 1.6; }
.error-404-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 12px; font-size: 14px; font-weight: 700; transition: background-color .2s, color .2s, border-color .2s; }
.btn-primary { color: #fff; background: var(--gradient); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { color: var(--text-2); background: #fff; border: 1px solid var(--border); }
.btn-secondary:hover { color: var(--primary); border-color: rgba(var(--primary-rgb), .4); }
.error-404-suggestions { padding-top: 30px; border-top: 1px solid var(--border); }
.error-404-suggestions h3 { color: var(--text-2); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.error-404-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.error-404-links a { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; color: var(--text-2); background: #fff; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; transition: background-color .2s, color .2s, border-color .2s; }
.error-404-links a:hover { color: var(--primary); border-color: rgba(var(--primary-rgb), .4); background: rgba(var(--primary-rgb), .05); }

/* =========================================================
   UTILS
========================================================= */
.reading-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--gradient); width: 0; z-index: 2000; transition: width .1s linear; }
.to-top { position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%; background: var(--gradient); color: #fff; border: none; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(var(--primary-rgb), .35); z-index: 1500; }
.to-top.visible { opacity: 1; pointer-events: auto; }
.to-top svg { stroke: #fff; }

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 680px) {
    .categories-bar { padding: 10px 12px; gap: 6px; border-radius: 12px; }
    .categories-bar a { padding: 8px 12px; font-size: 12px; }
    .categories-bar a svg { width: 14px; height: 14px; }
}
@media (max-width: 440px) {
    .categories-bar a { padding: 7px 10px; font-size: 11px; gap: 5px; }
    .categories-bar a svg { width: 13px; height: 13px; }
}
@media (max-width: 1080px) {
    .nav { display: none; }
    .menu-toggle { display: inline-flex; }
}
@media (max-width: 900px) {
    .header-inner { flex-wrap: wrap; min-height: auto; padding-top: 12px; padding-bottom: 12px; }
    .header-actions { flex: 1; justify-content: flex-end; }
    .search { width: 100%; max-width: 100%; }
    .page-header { flex-direction: column; align-items: stretch; }
    .article-title { font-size: 38px; }
}
@media (max-width: 680px) {
    .header-inner { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
    .logo { justify-content: flex-start; flex: 1; min-width: 0; font-size: 18px; }
    .header-actions { width: 100%; order: 3; }
    .container { padding: 20px 15px 45px; }
    .breadcrumbs { padding-left: 15px; padding-right: 15px; }
    .page-title { font-size: 27px; }
    .page-title::before { height: 28px; }
    .grid { grid-template-columns: 1fr; }
    .article-title { font-size: 32px; letter-spacing: -1px; }
    .article-content h2 { font-size: 24px; }
    .related-grid { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
    .logo-img { width: 38px; height: 38px; }
    .page-title { font-size: 24px; }
    .article-title { font-size: 27px; }
    .card .card-img { height: 195px; }
    .share { flex-direction: column; align-items: stretch; }
    .share a { text-align: center; }
    .error-404-title { font-size: 80px; }
    .error-404-subtitle { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}