/* ============================================================
   Sliv Telega — клиентские стили
   ============================================================ */

/* ============================================================
   1. ТЕМЫ
   ============================================================ */

:root,
html[data-theme="light"] {
    --bg:        #f5f5f7;
    --bg-2:      #ffffff;
    --card:      #ffffff;
    --accent:    #d81b60;
    --accent-2:  #b8154f;
    --accent-ui: #ff2d6f;
    --text:      #1a1a1f;
    --muted:     #5a5a65;
    --border:    #e5e5eb;
    --shadow:    0 2px 12px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
    --header-bg: rgba(255, 255, 255, 0.85);
    --container: 1140px;
    --radius:    16px;
    --radius-sm: 10px;
}

html[data-theme="dark"] {
    --bg:        #0d0d0f;
    --bg-2:      #16161a;
    --card:      #1c1c22;
    --accent:    #ff5c8a;
    --accent-2:  #ff7fa3;
    --accent-ui: #ff2d6f;
    --text:      #eaeaea;
    --muted:     #a8a8b3;
    --border:    #2a2a32;
    --shadow:    0 2px 12px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.5);
    --header-bg: rgba(22, 22, 26, 0.85);
    --container: 1140px;
    --radius:    16px;
    --radius-sm: 10px;
}

/* ============================================================
   2. FONT AWESOME
   ============================================================ */

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fontawesome/webfonts/fa-brands-400.woff2') format('woff2'),
         url('/assets/fontawesome/webfonts/fa-brands-400.ttf') format('truetype');
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('/assets/fontawesome/webfonts/fa-solid-900.woff2') format('woff2'),
         url('/assets/fontawesome/webfonts/fa-solid-900.ttf') format('truetype');
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/assets/fontawesome/webfonts/fa-regular-400.woff2') format('woff2'),
         url('/assets/fontawesome/webfonts/fa-regular-400.ttf') format('truetype');
}

/* ============================================================
   3. БАЗОВОЕ
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html.nav-locked,
html.nav-locked body {
    overflow: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    transition: background .2s, color .2s;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .15s;
}
a:hover {
    color: var(--accent-2);
}

h1, h2, h3, h4 {
    color: var(--text);
    line-height: 1.3;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   4. HEADER
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    border-bottom: 1px solid transparent;
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.site-header.is-scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, .06);
}
html[data-theme="dark"] .site-header.is-scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 72px;
    transition: height .2s;
    width: 100%;
}

.site-header.is-scrolled .header-inner {
    height: 64px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .3px;
    flex-shrink: 0;
    transition: opacity .15s;
}
.logo:hover {
    color: var(--text);
    opacity: .85;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-ui) 0%, var(--accent-2) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(255, 45, 111, .3);
    flex-shrink: 0;
}

.logo-text {
    white-space: nowrap;
    line-height: 1;
}
.logo-text b {
    color: var(--accent);
    font-weight: 800;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    flex: 1;
    min-width: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: .15s;
    white-space: nowrap;
}
.nav-link i {
    font-size: 13px;
    opacity: .85;
}
.nav-link:hover {
    background: var(--bg);
    color: var(--text);
}
.nav-link:hover i {
    color: var(--accent);
}

.nav-mobile-actions {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
}
.header-search input {
    width: 200px;
    height: 38px;
    padding: 0 40px 0 36px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: width .2s, border-color .2s, box-shadow .2s, background .2s;
    outline: none;
    line-height: 38px;
}
.header-search input::placeholder {
    color: var(--muted);
}
.header-search input:focus {
    width: 260px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 45, 111, .12);
    background: var(--card);
}
.header-search input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
    pointer-events: none;
    transition: color .15s;
    z-index: 1;
}
.header-search input:focus ~ .search-icon {
    color: var(--accent);
}

.search-kbd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 6px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 11px;
    font-family: inherit;
    color: var(--muted);
    pointer-events: none;
    transition: opacity .15s;
    z-index: 1;
}
.header-search input:focus ~ .search-kbd {
    opacity: 0;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: .15s;
    flex-shrink: 0;
    font-family: inherit;
    line-height: 1;
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}
.theme-toggle:active {
    transform: scale(.95);
}
.theme-toggle i {
    font-size: 15px;
    line-height: 1;
    transition: transform .3s;
}
.theme-toggle:hover i {
    transform: rotate(15deg) scale(1.1);
}

.burger {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: .15s;
    flex-shrink: 0;
}
.burger span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: .25s;
}
.burger span:nth-child(1) { top: 12px; }
.burger span:nth-child(2) { top: 18px; }
.burger span:nth-child(3) { top: 24px; }

.burger:hover {
    border-color: var(--accent);
}

.burger.is-open span:nth-child(1) {
    top: 18px;
    transform: translateX(-50%) rotate(45deg);
}
.burger.is-open span:nth-child(2) {
    opacity: 0;
}
.burger.is-open span:nth-child(3) {
    top: 18px;
    transform: translateX(-50%) rotate(-45deg);
}

/* ============================================================
   5. MAIN
   ============================================================ */

main {
    padding: 40px 0 0;
}

/* ============================================================
   6. HERO
   ============================================================ */

.hero {
    text-align: center;
    padding: 32px 0 16px;
}
.hero h1 {
    font-size: 34px;
    margin-bottom: 14px;
    letter-spacing: -.5px;
}
.hero h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-ui);
    margin: 18px auto 0;
    border-radius: 2px;
}
.hero p {
    color: var(--muted);
    max-width: 720px;
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.7;
}

section > h2 {
    font-size: 22px;
    margin: 40px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
section > h2::before {
    content: '';
    width: 4px;
    height: 22px;
    background: var(--accent-ui);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ============================================================
   7. СЕТКА КАТЕГОРИЙ
   ============================================================ */

.grid-cats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.cat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, background .2s, transform .15s;
}

.cat-card:hover {
    border-color: var(--accent);
    background: var(--card);
    color: var(--text);
    transform: translateY(-2px);
}

.cat-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.cat-card:hover .cat-card-icon {
    background: var(--accent-ui);
    color: #fff;
}

.cat-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cat-card-text h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-card-count {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.3;
}

.cat-card-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 12px;
    flex-shrink: 0;
    transition: color .2s, transform .2s;
}

.cat-card:hover .cat-card-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* ============================================================
   8. СЕТКА ПОСТОВ
   ============================================================ */

.grid-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.post-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.post-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-2);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.post-card:hover .post-card-image img {
    transform: scale(1.06);
}

.post-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 40px;
    background: var(--bg-2);
}

/* --- КАРТОЧКА: NEW — СПРАВА СВЕРХУ --- */
.post-card-new {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 8px;
    background: linear-gradient(135deg, var(--accent-ui) 0%, var(--accent-2) 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .6px;
    line-height: 1.4;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(255, 45, 111, .4);
    z-index: 2;
    text-transform: uppercase;
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
    pointer-events: none;
    user-select: none;
}

/* --- КАРТОЧКА: ЗАГОЛОВОК — СЛЕВА СНИЗУ --- */
.post-card-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 60px 16px 44px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.55) 40%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
    z-index: 1;
    text-align: left;
}

.post-card-title h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -.3px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- КАРТОЧКА: СТАТИСТИКА — СЛЕВА СНИЗУ --- */
.post-card-stats {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    z-index: 3;
    pointer-events: none;
}

.post-card-stats .stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.post-card-stats .stat i {
    font-size: 14px;
}

.post-card .post-info { display: none; }

/* ============================================================
   9. ХЛЕБНЫЕ КРОШКИ
   ============================================================ */

.breadcrumbs {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    line-height: 1.6;
}
.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs > span:last-child {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 420px;
}

/* ============================================================
   10. СТРАНИЦА ПОСТА
   ============================================================ */

.post-single { width: 100%; }

.post-hero {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 28px;
    align-items: start;
    padding: 0 0 28px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.post-hero-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}
html[data-theme="dark"] .post-hero-cover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
}

.post-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-hero-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 48px;
    background: var(--bg-2);
}

.post-hero-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding-top: 4px;
}

.post-hero-top {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.post-hero-top h1 {
    font-size: 28px;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -.5px;
    font-weight: 800;
    word-break: break-word;
}

.post-hero-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.post-hero-stats {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    flex-wrap: wrap;
    min-width: 0;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.hero-stat-value {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
}

.hero-stat-value i {
    font-size: 13px;
    color: var(--muted);
    opacity: .8;
}

.hero-stat:first-child .hero-stat-value i {
    color: #d81b60;
    opacity: 1;
}

.hero-stat-label {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.2;
    white-space: nowrap;
}

.post-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--accent-ui);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .15s;
    user-select: none;
    box-shadow: 0 2px 8px rgba(255, 45, 111, .3);
    white-space: nowrap;
}

.like-btn:hover {
    background: var(--accent-2);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 45, 111, .4);
}

.like-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 45, 111, .3);
}

.like-btn i {
    font-size: 15px;
    color: #fff;
    transition: transform .25s;
}

.like-btn-count {
    padding: 2px 8px;
    background: rgba(255, 255, 255, .22);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    min-width: 32px;
    text-align: center;
    transition: background .2s;
}

.like-btn.is-liked {
    background: #ff4f8b;
    box-shadow: 0 2px 8px rgba(255, 79, 139, .4);
}
.like-btn.is-liked i { transform: scale(1.15); }
.like-btn.is-liked .like-btn-count { background: rgba(255, 255, 255, .3); }

.like-btn.pulse i { animation: likePulseBig .5s ease; }
@keyframes likePulseBig {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.4); }
    100% { transform: scale(1.15); }
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: .15s;
    user-select: none;
    text-decoration: none;
    white-space: nowrap;
}

.ghost-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-2);
}

.ghost-btn i { font-size: 14px; color: var(--muted); }
.ghost-btn:hover i { color: var(--accent); }

.post-hero-desc {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    max-width: 100%;
}

/* ============================================================
   11. ГАЛЕРЕЯ — PINTEREST (CSS COLUMNS)
   ============================================================ */

.gallery {
    column-count: 4;
    column-gap: 12px;
    margin: 32px 0;
}

.gallery-item {
    display: block;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 12px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-2);
    transition: opacity .2s, transform .15s;
    position: relative;
}

.gallery-item:hover {
    opacity: .92;
    transform: translateY(-2px);
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    background: var(--bg-2);
}

@media (max-width: 1024px) {
    .gallery { column-count: 3; }
}

@media (max-width: 640px) {
    .gallery {
        column-count: 2;
        column-gap: 8px;
        margin: 24px 0;
    }
    .gallery-item {
        margin: 0 0 8px;
        border-radius: 10px;
    }
}

@media (max-width: 400px) {
    .gallery { column-count: 1; }
}

/* ============================================================
   12. ТЕКСТ В КОНЦЕ ПОСТА
   ============================================================ */

.post-footer-text {
    margin: 40px 0 32px;
    padding: 0;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    background: transparent;
    border-radius: 0;
    font-size: 15px;
    line-height: 1.8;
    color: var(--muted);
}
.post-footer-text h2 { font-size: 20px; margin: 24px 0 12px; color: var(--text); }
.post-footer-text h2:first-child { margin-top: 0; }
.post-footer-text h3 { font-size: 17px; margin: 20px 0 10px; color: var(--text); }
.post-footer-text h3:first-child { margin-top: 0; }
.post-footer-text p { margin-bottom: 14px; }
.post-footer-text p:last-child { margin-bottom: 0; }
.post-footer-text a { color: var(--accent); }
.post-footer-text a:hover { text-decoration: underline; }
.post-footer-text strong { color: var(--text); font-weight: 600; }
.post-footer-text img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
.post-footer-text ul,
.post-footer-text ol { margin: 12px 0 12px 22px; }
.post-footer-text li { margin-bottom: 6px; }
.post-footer-text blockquote {
    border-left: 2px solid var(--accent);
    padding: 4px 16px;
    margin: 16px 0;
    color: var(--muted);
    background: transparent;
    border-radius: 0;
    font-style: italic;
}

/* ============================================================
   13. ПОХОЖИЕ ПОСТЫ
   ============================================================ */

.related {
    margin-top: 64px;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}

.related-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.related-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.related-header h2 i { color: var(--accent); font-size: 20px; }

.related-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: .15s;
    white-space: nowrap;
}

.related-more:hover { border-color: var(--accent); color: var(--accent); }
.related-more i { font-size: 12px; transition: transform .2s; }
.related-more:hover i { transform: translateX(3px); }

/* ============================================================
   14. СТРАНИЦА КАТЕГОРИИ
   ============================================================ */

.cat-header { margin-bottom: 28px; }
.cat-header h1 { font-size: 28px; margin-bottom: 10px; }
.cat-desc {
    color: var(--muted);
    font-size: 14px;
    max-width: 720px;
    line-height: 1.7;
}

.empty {
    color: var(--muted);
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
}

/* ============================================================
   15. ПАГИНАЦИЯ
   ============================================================ */

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

.pagination a,
.pagination span {
    padding: 9px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: .15s;
    min-width: 40px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.pagination .active {
    background: var(--accent-ui);
    border-color: var(--accent-ui);
    color: #fff;
    font-weight: 600;
}

.pagination .pagination-arrow { padding: 9px 12px; min-width: 38px; color: var(--muted); }
.pagination .pagination-arrow:hover { color: var(--accent); }
.pagination .pagination-dots {
    padding: 9px 4px;
    background: transparent;
    border: none;
    color: var(--muted);
    min-width: 20px;
    cursor: default;
}
.pagination .pagination-dots:hover { color: var(--muted); transform: none; }

/* ============================================================
   16. КНОПКИ
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    line-height: 1;
    transition: .15s;
    white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn-accent {
    background: var(--accent-ui);
    border-color: var(--accent-ui);
    color: #fff;
    font-weight: 500;
}
.btn-accent:hover {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: #fff;
}
.btn i { font-size: 14px; }

/* ============================================================
   17. 404
   ============================================================ */

.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 {
    font-size: 80px;
    color: var(--accent);
    margin-bottom: 16px;
    line-height: 1;
    font-weight: 800;
}
.error-404 p { color: var(--muted); margin-bottom: 24px; font-size: 15px; }

/* ============================================================
   18. FOOTER
   ============================================================ */

.site-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    margin-top: 64px;
    padding: 48px 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 40px;
}

.footer-col h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted);
    margin-bottom: 16px;
    font-weight: 700;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col ul a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    opacity: .85;
    transition: .15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-col ul a:hover { color: var(--accent); opacity: 1; transform: translateX(3px); }

.footer-brand { padding-right: 24px; }
.footer-logo { font-size: 20px; margin-bottom: 14px; }
.footer-desc {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
    max-width: 340px;
}

.footer-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-decoration: none;
    transition: .2s;
}
.social-btn:hover {
    background: var(--accent-ui);
    border-color: var(--accent-ui);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 45, 111, .3);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    background: var(--bg);
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-copy { color: var(--muted); font-size: 13px; margin: 0; }
.footer-age {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    margin: 0;
}
.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 22px;
    padding: 0 8px;
    background: #c2185b;
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    border-radius: 6px;
    letter-spacing: .5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

/* ============================================================
   19. УТИЛИТЫ
   ============================================================ */

.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }

/* ============================================================
   20. СКРОЛЛБАР
   ============================================================ */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   21. ICONS
   ============================================================ */

i.fa-solid,
i.fa-regular,
i.fa-brands {
    line-height: 1;
    vertical-align: -.125em;
}

.notice i { margin-right: 6px; font-size: 16px; }

/* ============================================================
   22. ЛАЙКИ, ПРОСМОТРЫ И ФОТО В КАРТОЧКАХ
   ============================================================ */

.post-card-stats .stat-likes {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    font-family: inherit;
    color: #fff;
    transition: transform .15s;
}
.post-card-stats .stat-likes:hover { transform: scale(1.1); }
.post-card-stats .stat-likes:active { transform: scale(0.95); }

.post-card-stats .stat-likes i {
    color: #ffffff;
    opacity: .95;
    transition: color .2s, transform .3s;
}
.post-card-stats .stat-likes.is-liked i {
    color: #ff4f8b;
    opacity: 1;
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(255, 79, 139, .6));
}
.post-card-stats .stat-likes.pulse i { animation: likePulse .4s ease; }
@keyframes likePulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1.15); }
}

.post-card-stats .stat-views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.post-card-stats .stat-views i {
    font-size: 14px;
    color: #a8a8b3;
    opacity: .95;
}

.post-card-stats .stat-photos {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.post-card-stats .stat-photos i {
    font-size: 14px;
    color: #ffd166;
    opacity: .95;
}

/* ============================================================
   23. СТАТИСТИКА КАТЕГОРИИ
   ============================================================ */

.cat-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0 0 32px;
}

.cat-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s, transform .15s, box-shadow .2s;
    min-height: 72px;
}

.cat-stat:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.cat-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

.cat-stat:hover .cat-stat-icon {
    background: var(--accent-ui);
    color: #fff;
}

.cat-stat-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.cat-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -.3px;
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-stat-label {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   24. LIGHTBOX
   ============================================================ */

html.lightbox-locked,
html.lightbox-locked body { overflow: hidden !important; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(8, 8, 10, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
    padding: 20px;
}

.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.lightbox-stage {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    cursor: zoom-in;
    transition: transform .15s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-img:active { transform: scale(.99); }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: inherit;
    line-height: 1;
}

.lightbox-close {
    top: 20px;
    right: 20px;
    transform: none;
    font-size: 22px;
}
.lightbox-close:hover {
    background: var(--accent-ui);
    border-color: var(--accent-ui);
    transform: scale(1.08) rotate(90deg);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent-ui);
    border-color: var(--accent-ui);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev:active,
.lightbox-next:active { transform: translateY(-50%) scale(0.95); }

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2;
}

/* ============================================================
   25. SCROLL TOP
   ============================================================ */

.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent-ui);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(255, 45, 111, .4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: .25s;
    z-index: 900;
    font-family: inherit;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover {
    background: var(--accent-2);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 45, 111, .5);
}
.scroll-top:active { transform: translateY(0); }

/* ============================================================
   26. SEO-БЛОК
   ============================================================ */

.cat-seo,
.seo-block {
    margin: 64px 0 0;
    padding: 32px 36px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 15px;
    line-height: 1.75;
}

.seo-block-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}
.seo-block-title i { color: var(--accent-ui); font-size: 20px; }

.cat-seo h2,
.cat-seo h3,
.seo-block-text h2,
.seo-block-text h3 { color: var(--text); display: block; }
.cat-seo h2,
.seo-block-text h2 { font-size: 18px; font-weight: 700; margin: 24px 0 12px; }
.cat-seo h2:first-child,
.seo-block-text h2:first-child { margin-top: 0; }
.cat-seo h3,
.seo-block-text h3 { font-size: 16px; font-weight: 600; margin: 20px 0 10px; }

.cat-seo p,
.seo-block-text p { margin-bottom: 14px; color: var(--text); opacity: .92; }
.cat-seo p:last-child,
.seo-block-text p:last-child { margin-bottom: 0; }

.cat-seo strong,
.seo-block-text strong { color: var(--text); font-weight: 600; }

.cat-seo a,
.seo-block-text a { color: var(--accent); }
.cat-seo a:hover,
.seo-block-text a:hover { text-decoration: underline; }

.cat-seo ul,
.cat-seo ol,
.seo-block-text ul,
.seo-block-text ol { margin: 12px 0 16px 22px; padding: 0; }
.cat-seo li,
.seo-block-text li {
    margin-bottom: 8px;
    color: var(--text);
    opacity: .92;
    line-height: 1.7;
}

.cat-seo blockquote,
.seo-block-text blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 20px;
    margin: 20px 0;
    color: var(--muted);
    background: var(--bg-2);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.seo-block + .pagination { margin-top: 32px; }

/* ============================================================
   27. АДАПТИВ
   ============================================================ */

@media (max-width: 900px) {
    .header-search { display: none; }
    .burger { display: block; }

    .site-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: auto;
        height: auto;
        max-height: calc(100dvh - 72px);
        background: var(--bg-2);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 16px;
        margin: 0;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform .3s ease;
        z-index: 999;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
    }
    html[data-theme="dark"] .site-nav {
        box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
    }
    .site-nav.is-open { transform: translateX(0); }

    .nav-link {
        padding: 14px 16px;
        font-size: 15px;
        font-weight: 500;
        border-radius: 10px;
        gap: 12px;
    }
    .nav-link i { font-size: 16px; width: 20px; text-align: center; }
    .nav-link span { display: inline; }

    .nav-mobile-actions { display: none; }

    .header-actions { margin-left: auto; }

    .hero h1 { font-size: 28px; }
    section > h2 { font-size: 20px; }
    .grid-posts { gap: 16px; }
    .post-card-title h3 { font-size: 18px; }

    .post-hero { grid-template-columns: 160px 1fr; gap: 24px; }
    .post-hero-top h1 { font-size: 24px; }
    .post-hero-stats { gap: 22px; }
    .hero-stat-value { font-size: 16px; gap: 6px; }
    .hero-stat-value i { font-size: 13px; }
    .hero-stat-label { font-size: 11px; }

    .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-brand { grid-column: 1 / -1; padding-right: 0; }
}

@media (max-width: 640px) {
    .container { padding: 0 14px; }

    .site-header .header-inner { height: 60px; gap: 12px; }
    .site-header.is-scrolled .header-inner { height: 56px; }

    .site-nav { top: 60px; max-height: calc(100dvh - 60px); }

    .logo { font-size: 18px; gap: 8px; }
    .logo-icon { width: 32px; height: 32px; font-size: 14px; border-radius: 9px; }

    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 13px;
        border-width: 1px;
        box-shadow: none;
        border-radius: 9px;
    }
    .theme-toggle i { font-size: 11px; }

    .burger {
        width: 32px;
        height: 32px;
        border-width: 1px;
        box-shadow: none;
        border-radius: 9px;
    }
    .burger span { width: 14px; height: 2px; }
    .burger span:nth-child(1) { top: 10px; }
    .burger span:nth-child(2) { top: 15px; }
    .burger span:nth-child(3) { top: 20px; }
    .burger.is-open span:nth-child(1) { top: 15px; }
    .burger.is-open span:nth-child(3) { top: 15px; }

    .header-actions { margin-left: auto; }

    main { padding: 20px 0 0; }

    /* ↓↓↓ КОМПАКТНЫЙ HERO ↓↓↓ */
    .hero { padding: 8px 0 4px; }
    .hero h1 { font-size: 22px; margin-bottom: 10px; }
    .hero h1::after { margin-top: 12px; width: 48px; }
    .hero p { font-size: 13.5px; line-height: 1.55; }

    /* ↓↓↓ УМЕНЬШИЛИ ОТСТУПЫ У ЗАГОЛОВКОВ СЕКЦИЙ ↓↓↓ */
    section > h2 {
        font-size: 19px;
        margin: 22px 0 12px;
        gap: 10px;
    }
    section > h2::before { height: 19px; }

    /* ↓↓↓ КОМПАКТНАЯ СЕТКА КАТЕГОРИЙ: 2 колонки ↓↓↓ */
    .grid-cats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .grid-posts {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .cat-card {
        padding: 10px 12px;
        gap: 10px;
        min-height: 64px;
        border-radius: var(--radius-sm);
    }
    .cat-card-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
        border-radius: 9px;
    }
    .cat-card-text { gap: 1px; }
    .cat-card-text h3 {
        font-size: 13px;
        font-weight: 600;
        line-height: 1.25;
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-word;
    }
    .cat-card-count {
        font-size: 11px;
        line-height: 1.2;
    }
    .cat-card-arrow { display: none; }

    /* ↓↓↓ КОМПАКТНАЯ СТАТИСТИКА КАТЕГОРИИ ↓↓↓ */
    .cat-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 24px;
    }
    .cat-stat {
        padding: 10px 12px;
        gap: 10px;
        min-height: 64px;
        border-radius: var(--radius-sm);
    }
    .cat-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
        border-radius: 9px;
    }
    .cat-stat-body { gap: 1px; }
    .cat-stat-value {
        font-size: 15px;
        letter-spacing: -.2px;
    }
    .cat-stat-label {
        font-size: 10px;
        line-height: 1.2;
    }

    .post-card-new {
        top: 8px;
        right: 8px;
        padding: 2px 6px;
        font-size: 9px;
        letter-spacing: .5px;
        border-radius: 5px;
    }

    .post-card-title { padding: 40px 12px 52px; }
    .post-card-title h3 { font-size: 16px; }

    .post-card-stats {
        padding: 0 12px 12px;
        gap: 8px;
    }
    .post-card-stats .stat { font-size: 12px; }
    .post-card-stats .stat i { font-size: 12px; }

    .post-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 24px;
        margin-bottom: 24px;
    }
    .post-hero-cover { max-width: 180px; margin: 0 auto; aspect-ratio: 1 / 1; }
    .post-hero-top h1 { font-size: 20px; }

    .post-hero-row { flex-direction: column; align-items: stretch; gap: 16px; }
    .post-hero-stats { gap: 16px; justify-content: space-between; }
    .hero-stat-value { font-size: 14px; gap: 5px; }
    .hero-stat-value i { font-size: 12px; }
    .hero-stat-label { font-size: 10px; }

    .post-hero-actions { justify-content: stretch; }
    .like-btn,
    .ghost-btn {
        flex: 1;
        justify-content: center;
        padding: 11px 14px;
        font-size: 13px;
        gap: 8px;
    }
    .like-btn i,
    .ghost-btn i { font-size: 14px; }
    .like-btn-count { padding: 2px 6px; font-size: 12px; min-width: 26px; }

    .post-hero-desc { font-size: 14px; }

    .post-footer-text { margin: 32px 0 24px; padding-top: 24px; font-size: 14px; }
    .post-footer-text h2 { font-size: 17px; }
    .post-footer-text h3 { font-size: 15px; }

    .breadcrumbs { font-size: 12px; margin-bottom: 14px; }
    .breadcrumbs > span:last-child { max-width: 200px; }

    .related { margin-top: 48px; padding-top: 28px; }
    .related-header h2 { font-size: 18px; }
    .related-header h2 i { font-size: 16px; }
    .related-more { padding: 6px 10px; font-size: 12px; }

    .pagination { gap: 6px; margin: 32px 0 16px; }
    .pagination a,
    .pagination span { padding: 7px 11px; font-size: 13px; min-width: 36px; }
    .pagination .pagination-arrow { padding: 7px 9px; min-width: 34px; }
    .pagination .pagination-dots { padding: 7px 3px; min-width: 16px; }

    .site-footer { padding-top: 32px; margin-top: 40px; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; padding-bottom: 28px; }
    .footer-bottom-inner { justify-content: center; text-align: center; }

    .btn i { font-size: 13px; }

    .lightbox { padding: 8px; }
    .lightbox-img { max-height: calc(100vh - 120px); border-radius: 8px; }
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next { width: 44px; height: 44px; font-size: 16px; }
    .lightbox-close { top: 12px; right: 12px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-counter { bottom: 12px; font-size: 12px; padding: 5px 12px; }

    .scroll-top { right: 16px; bottom: 16px; width: 42px; height: 42px; font-size: 14px; }

    .cat-seo,
    .seo-block {
        margin: 40px 0 0;
        padding: 20px 18px;
        font-size: 14px;
        border-radius: var(--radius-sm);
    }
    .seo-block-title { font-size: 18px; margin-bottom: 16px; }
    .seo-block-title i { font-size: 16px; }
    .cat-seo h2,
    .seo-block-text h2 { font-size: 16px; margin-top: 18px; }
    .cat-seo h3,
    .seo-block-text h3 { font-size: 15px; }
    .cat-seo ul,
    .cat-seo ol,
    .seo-block-text ul,
    .seo-block-text ol { margin-left: 18px; }

    .seo-block + .pagination { margin-top: 24px; }
}

/* ============================================================
   28. TOUCH TARGETS
   ============================================================ */

@media (hover: none) and (pointer: coarse) {
    .like-btn,
    .ghost-btn,
    .scroll-top {
        min-height: 44px;
        min-width: 44px;
    }

    .theme-toggle,
    .burger {
        position: relative;
        min-height: 0;
        min-width: 0;
    }
    .theme-toggle::after,
    .burger::after {
        content: '';
        position: absolute;
        inset: -6px;
        border-radius: 12px;
    }

    .post-card-stats .stat-likes {
        min-width: 48px;
        min-height: 48px;
        padding: 8px 12px;
        margin: -8px -4px;
    }

    .post-card-stats .stat {
        min-height: 44px;
        padding: 4px 8px;
    }

    .like-btn,
    .ghost-btn {
        padding: 12px 20px;
    }

    .pagination a,
    .pagination span {
        min-width: 44px;
        min-height: 44px;
        padding: 10px 12px;
    }

    .pagination .pagination-arrow {
        min-width: 44px;
        padding: 10px 14px;
    }

    .nav-link {
        min-height: 48px;
    }

    .cat-card,
    .cat-stat {
        min-height: 0;
    }

    .btn {
        min-height: 44px;
    }

    .btn-sm {
        min-height: 40px;
        min-width: 40px;
    }
}

/* ============================================================
   29. УЛУЧШЕНИЕ ФОКУСА
   ============================================================ */

.like-btn:focus-visible,
.ghost-btn:focus-visible,
.theme-toggle:focus-visible,
.burger:focus-visible,
.nav-link:focus-visible,
.post-card:focus-visible,
.gallery-item:focus-visible,
.cat-card:focus-visible,
.cat-stat:focus-visible,
.scroll-top:focus-visible,
.pagination a:focus-visible {
    outline: 3px solid var(--accent-ui);
    outline-offset: 2px;
}

.like-btn:focus:not(:focus-visible),
.ghost-btn:focus:not(:focus-visible),
.theme-toggle:focus:not(:focus-visible),
.burger:focus:not(:focus-visible),
.nav-link:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   30. УЛУЧШЕНИЕ ЛАЙК-КНОПОК
   ============================================================ */

.post-card-stats .stat-likes {
    position: relative;
    border-radius: 8px;
    transition: background .15s, transform .15s;
}

.post-card-stats .stat-likes:hover {
    background: rgba(255, 255, 255, .15);
}

.post-card-stats .stat-likes:active {
    transform: scale(0.92);
}

@media (hover: none) {
    .post-card-stats .stat-likes::before {
        content: '';
        position: absolute;
        inset: -6px;
        border-radius: 12px;
    }
}

/* ============================================================
   31. МОБИЛЬНЫЕ ПЕРЕОПРЕДЕЛЕНИЯ
   ============================================================ */

@media (max-width: 640px) {
    .post-card-stats {
        padding: 0 10px 12px;
        gap: 6px;
    }

    .post-card-stats .stat {
        font-size: 12px;
        gap: 5px;
    }

    .post-card-stats .stat-likes {
        min-width: 44px;
        padding: 8px 10px;
        margin: -8px -6px;
    }

    .post-card-stats .stat-likes i {
        font-size: 12px;
    }

    .post-hero-actions {
        gap: 8px;
    }

    .like-btn,
    .ghost-btn {
        min-height: 46px;
    }
}

/* ============================================================
   32. ОПТИМИЗАЦИЯ
   ============================================================ */

.post-card-image,
.post-hero-cover,
.cat-card,
.cat-stat,
.gallery-item {
    contain: layout style;
}

.post-card,
.post-card-image img,
.scroll-top,
.lightbox-img {
    will-change: transform;
}

.post-card-image img,
.gallery img {
    content-visibility: auto;
}

.post-footer-text,
.cat-seo,
.seo-block,
.related {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* ============================================================
   33. ФУТЕР
   ============================================================ */

.footer-col h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted);
    margin: 0 0 16px;
    font-weight: 700;
    line-height: 1.3;
}

/* ============================================================
   34. КНОПКА ЛАЙКА — БЕЗ ТЕКСТА
   ============================================================ */

.like-btn {
    padding: 10px 16px;
    gap: 8px;
}

.like-btn .fa-heart {
    font-size: 16px;
}

.like-btn-count {
    padding: 2px 8px;
    background: rgba(255, 255, 255, .22);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    min-width: 28px;
    text-align: center;
    transition: background .2s;
}

.like-btn.is-liked .like-btn-count {
    background: rgba(255, 255, 255, .3);
}

@media (max-width: 640px) {
    .like-btn {
        padding: 10px 14px;
        gap: 6px;
    }

    .like-btn-count {
        font-size: 12px;
        min-width: 24px;
        padding: 2px 6px;
    }
}

/* ============================================================
   35. СТАТИЧЕСКИЕ СТРАНИЦЫ
   ============================================================ */

.page-single {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 0 40px;
}

.page-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin: 0;
    color: var(--text);
    line-height: 1.2;
}

.page-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.page-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-content h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--accent-ui);
    border-radius: 2px;
    flex-shrink: 0;
}
.page-content h2:first-child {
    margin-top: 0;
}

.page-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 10px;
    color: var(--text);
}

.page-content p {
    margin-bottom: 16px;
    color: var(--text);
    opacity: .92;
}
.page-content p:last-child {
    margin-bottom: 0;
}

.page-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}
.page-content a:hover {
    border-bottom-color: var(--accent);
}

.page-content strong {
    color: var(--text);
    font-weight: 700;
}

.page-content ul,
.page-content ol {
    margin: 14px 0 18px 24px;
    padding: 0;
}
.page-content li {
    margin-bottom: 8px;
    color: var(--text);
    opacity: .92;
    line-height: 1.7;
}

.page-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 20px;
    margin: 20px 0;
    color: var(--muted);
    background: var(--bg-2);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.page-content code {
    background: var(--bg-2);
    padding: 2px 8px;
    border-radius: 6px;
    color: var(--accent);
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 640px) {
    .page-header h1 { font-size: 24px; }
    .page-header { margin-bottom: 20px; padding-bottom: 16px; }
    .page-content { font-size: 15px; }
    .page-content h2 { font-size: 18px; margin: 24px 0 12px; }
    .page-content h3 { font-size: 16px; }
}

/* ============================================================
   36. CTA
   ============================================================ */

.floating-cta {
    position: fixed;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--accent-ui) 0%, var(--accent-2) 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(255, 45, 111, .35);
    transition: transform .2s, box-shadow .2s;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
    max-width: calc(100vw - 32px);
    animation: ctaPulse 3s ease-in-out infinite;
}

.floating-cta:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 32px rgba(255, 45, 111, .5);
}

.floating-cta:active {
    transform: translateY(0) scale(1);
}

.floating-cta i {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.floating-cta span {
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cta-bottom-right {
    bottom: 24px;
    right: 24px;
}

.cta-bottom-left {
    bottom: 24px;
    left: 24px;
}

.cta-bottom-center {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
}

.cta-bottom-center:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.03);
}

.cta-top-right {
    top: 90px;
    right: 24px;
}

@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(255, 45, 111, .35);
    }
    50% {
        box-shadow: 0 8px 32px rgba(255, 45, 111, .6);
    }
}

@media (max-width: 640px) {
    .floating-cta {
        padding: 12px 16px;
        font-size: 13px;
        gap: 8px;
    }

    .floating-cta i {
        font-size: 16px;
    }

    .cta-bottom-right,
    .cta-bottom-left {
        bottom: 16px;
    }

    .cta-bottom-right { right: 16px; }
    .cta-bottom-left  { left: 16px; }
    .cta-bottom-center { bottom: 16px; }
    .cta-top-right    { top: 74px; right: 16px; }

    @media (max-width: 480px) {
        .floating-cta span {
            max-width: 140px;
        }
    }
}

@media print {
    .floating-cta {
        display: none;
    }
}

/* ============================================================
   37. ГРАФИКИ В АНАЛИТИКЕ
   ============================================================ */

.dash-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dash-card h3 > span {
    margin-left: auto;
}

/* ============================================================
   38. НАТИВНАЯ РЕКЛАМА В ГАЛЕРЕЕ
   ============================================================ */

.gallery-native {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-ui) 0%, var(--accent-2) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
}

.gallery-native:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
}

.gallery-native-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: opacity .2s;
}

.gallery-native:hover .gallery-native-overlay {
    opacity: .85;
}

.gallery-native-content {
    position: absolute;
    inset: 0;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 20px;
    text-align: center;
    gap: 8px;
}

.gallery-native-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    opacity: .7;
    line-height: 1;
}

.gallery-native-text {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.2px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Мобильная адаптация */
@media (max-width: 640px) {
    .gallery-native-text {
        font-size: 14px;
    }
    .gallery-native-label {
        font-size: 9px;
    }
    .gallery-native-content {
        padding: 14px;
    }
}

@media (max-width: 400px) {
    .gallery-native-text {
        font-size: 13px;
    }
}