/* ===== blog.css — общие стили для блога Inrayzex ===== */

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

:root {
    --bg: #0c0c0f;
    --bg-card: rgba(255,255,255,0.015);
    --border: rgba(255,255,255,0.04);
    --border-accent: rgba(184,160,224,0.12);
    --text: #d4d4dc;
    --text-dim: #8a8a9e;
    --text-muted: #6a6a7e;
    --accent: #b8a0e0;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-weight: 400;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Утилита для SEO: скрытый, но доступный поисковикам текст */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== ШАПКА ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
    animation: fadeIn 0.6s ease;
}
.header-top { display: flex; align-items: center; gap: 12px; }
.logo {
    font-size: 24px; font-weight: 300; letter-spacing: 4px;
    color: #fff; text-transform: lowercase;
    transition: var(--transition); text-decoration: none;
}
.logo:hover { letter-spacing: 6px; }
.logo span { font-weight: 500; color: var(--accent); }

nav {
    display: flex; gap: 28px; font-size: 14px;
    font-weight: 300; letter-spacing: 0.6px;
}
nav a {
    color: #b8b8c8; text-decoration: none;
    transition: var(--transition); position: relative;
}
nav a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 1px; background: var(--accent);
    transition: var(--transition);
}
nav a:hover { color: #ddd; }
nav a:hover::after { width: 100%; }
nav a[aria-current="page"] { color: #ddd; }
nav a[aria-current="page"]::after { width: 100%; }

.sub-nav {
    display: flex; gap: 28px; font-size: 14px;
    font-weight: 400; letter-spacing: 0.6px; margin-top: 4px;
}
.sub-nav a {
    color: #b8b8c8; text-decoration: none;
    transition: var(--transition); position: relative;
}
.sub-nav a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--accent);
    transition: var(--transition);
}
.sub-nav a:hover { color: #ffffff; }
.sub-nav a:hover::after { width: 100%; }

/* ===== LAYOUT ===== */
.blog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding: 32px 0 40px;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

/* ===== САЙДБАР ===== */
.blog-sidebar {
    position: sticky;
    top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 12px;
}
.sidebar-title {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text-muted);
    font-weight: 500; margin-bottom: 12px; padding-left: 14px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px 11px 16px; border-radius: 8px;
    color: var(--text-dim); text-decoration: none;
    font-size: 14px; font-weight: 400;
    transition: color 0.3s ease, background 0.3s ease;
    position: relative;
}
.sidebar-link::before {
    content: ''; position: absolute; left: 4px; top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 2px; height: 16px; background: var(--accent);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,0.02); }
.sidebar-link.active { color: #fff; background: rgba(184,160,224,0.05); }
.sidebar-link.active::before { transform: translateY(-50%) scaleY(1); }
.sidebar-label { flex: 1; line-height: 1.3; }
.sidebar-count {
    font-size: 11px; color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    padding: 2px 7px; border-radius: 20px;
    font-weight: 500; flex-shrink: 0;
}
.sidebar-link.active .sidebar-count {
    color: var(--accent);
    background: rgba(184,160,224,0.1);
}

.mobile-filter-toggle {
    display: none; width: 100%; padding: 14px 18px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; color: #fff; font-family: inherit;
    font-size: 15px; font-weight: 500; cursor: pointer;
    transition: var(--transition); align-items: center;
    gap: 12px; text-align: left;
}
.mobile-filter-toggle::before {
    content: ''; width: 2px; height: 20px;
    background: var(--accent); border-radius: 2px; flex-shrink: 0;
}
.mobile-filter-toggle .toggle-label { flex: 1; }
.mobile-filter-toggle .toggle-arrow {
    transition: transform 0.3s ease; font-size: 10px;
    color: var(--accent); line-height: 1;
}
.blog-sidebar.open .mobile-filter-toggle .toggle-arrow { transform: rotate(180deg); }

/* ===== КОНТЕНТ ===== */
.blog-content { min-width: 0; }

/* Breadcrumbs */
.breadcrumbs {
    font-size: 13px; color: var(--text-muted);
    padding: 0 0 16px; margin-bottom: 8px;
}
.breadcrumbs ol {
    list-style: none; padding: 0;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li:not(:last-child)::after {
    content: '→'; color: var(--text-muted); font-size: 11px;
}
.breadcrumbs a {
    color: var(--text-muted); text-decoration: none;
    transition: var(--transition);
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--text-dim); }

/* Page header */
.page-header {
    padding: 0 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}
.page-header h1 {
    font-size: 30px; font-weight: 300; color: #fff;
    letter-spacing: 0.5px; margin-bottom: 6px; line-height: 1.2;
}
.page-header h1 strong { font-weight: 500; color: var(--accent); }
.page-header .subtitle {
    font-size: 15px; color: var(--text-dim); font-weight: 300;
}
.page-header .meta-info {
    display: flex; gap: 24px; margin-top: 10px;
    font-size: 13px; color: var(--text-muted);
}

/* ===== СЕКЦИИ КАТЕГОРИЙ ===== */
.category-section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
}
.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.category-section-header h2 {
    font-size: 22px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.category-section-header h2 .icon {
    color: var(--accent);
    font-size: 20px;
}
.category-section-header .all-link {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(184,160,224,0.2);
    padding-bottom: 2px;
    transition: var(--transition);
}
.category-section-header .all-link:hover {
    border-bottom-color: var(--accent);
}

/* ===== СЕТКА СТАТЕЙ ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 24px 20px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease backwards;
}
.blog-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(184,160,224,0.03), transparent 60%);
    opacity: 0; transition: var(--transition);
    pointer-events: none;
}
.blog-card:hover::before { opacity: 1; }
.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.blog-card .category-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    width: fit-content;
    transition: var(--transition);
}
.blog-card .category-tag:hover { color: #fff; }

.blog-card h3 {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.3;
}
.blog-card h3 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}
.blog-card h3 a:hover { color: var(--accent); }

.blog-card .excerpt {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 300;
    margin-bottom: 16px;
    flex-grow: 1;
}

.blog-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.blog-card .tags a {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.blog-card .tags a:hover {
    color: var(--accent);
    border-color: var(--border-accent);
}

.blog-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.blog-card .link-arrow {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: inline-block;
    margin-top: 8px;
    width: fit-content;
}
.blog-card .link-arrow:hover { transform: translateX(4px); }

/* ===== БЛОК ОБ АВТОРЕ ===== */
.author-block {
    background: rgba(184,160,224,0.04);
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    padding: 24px 28px;
    margin: 40px 0 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.author-block .avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: #0c0c0f;
    flex-shrink: 0;
}
.author-block .info h2 {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 6px;
}
.author-block .info p {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
}
.author-block .info a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(184,160,224,0.2);
    transition: var(--transition);
}
.author-block .info a:hover { border-bottom-color: var(--accent); }

/* ===== КОНТАКТЫ ===== */
.contacts-section {
    padding: 30px 0 20px;
    border-bottom: 1px solid var(--border);
    animation: fadeInUp 0.6s ease 0.2s backwards;
}
.contacts-section .contacts-grid {
    display: flex; justify-content: center;
    gap: 50px; flex-wrap: wrap;
}
.contacts-section .contact-item {
    display: flex; align-items: center; gap: 14px;
    color: var(--text-dim); font-size: 15px;
    transition: var(--transition); padding: 10px 20px;
    border-radius: 12px; border: 1px solid transparent;
}
.contacts-section .contact-item:hover {
    color: #fff; border-color: var(--border-accent);
    background: var(--bg-card);
}
.contacts-section .contact-item .icon {
    width: 28px; height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.contacts-section .contact-item .icon svg {
    width: 24px; height: 24px; fill: var(--accent);
    transition: var(--transition);
}
.contacts-section .contact-item:hover .icon svg { fill: #fff; }
.contacts-section .contact-item .info {
    display: flex; flex-direction: column;
}
.contacts-section .contact-item .info .label {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--text-muted);
    font-weight: 400;
}
.contacts-section .contact-item .info .value {
    color: #fff; text-decoration: none;
    transition: var(--transition); font-weight: 500;
}
.contacts-section .contact-item .info .value:hover { color: var(--accent); }

/* ===== ФУТЕР ===== */
footer {
    padding: 30px 0 24px;
    display: flex; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
    font-size: 13px; color: #5a5a6e;
    animation: fadeIn 1s ease;
}
footer a {
    color: #7a7a8e; text-decoration: none;
    margin-left: 24px; transition: var(--transition);
    position: relative;
}
footer a::after {
    content: ''; position: absolute; bottom: -2px; left: 0;
    width: 0; height: 1px; background: var(--accent);
    transition: var(--transition);
}
footer a:hover { color: #b8b8c8; }
footer a:hover::after { width: 100%; }

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .blog-sidebar {
        position: static; padding: 0;
        background: transparent; border: none; border-radius: 0;
    }
    .sidebar-title { display: none; }
    .mobile-filter-toggle { display: flex; }
    .sidebar-nav {
        display: none; flex-direction: column;
        gap: 4px; margin-top: 10px; padding: 0;
    }
    .blog-sidebar.open .sidebar-nav { display: flex; }
    .sidebar-link {
        padding: 12px 16px 12px 20px;
        font-size: 14px; width: 100%;
        background: var(--bg-card);
        border: 1px solid var(--border);
    }
    .sidebar-link::before { left: 8px; }
    .sidebar-count { display: inline-block; margin-left: auto; }
}

@media (max-width: 820px) {
    .page-header h1 { font-size: 24px; }
    .category-section-header h2 { font-size: 20px; }
    nav { gap: 18px; font-size: 13px; }
    .contacts-section .contacts-grid { gap: 20px; }
    .author-block { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 600px) {
    .blog-grid { grid-template-columns: 1fr; }
    header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .page-header h1 { font-size: 22px; }
    .blog-card h3 { font-size: 17px; }
    footer { flex-direction: column; align-items: center; text-align: center; }
    footer a { margin: 0 8px; }
    .contacts-section .contact-item {
        flex-direction: column; text-align: center;
        gap: 6px; padding: 12px;
    }
}

/* ============================================================
   СТИЛИ ДЛЯ СТРАНИЦ КАТЕГОРИЙ БЛОГА
   (добавить в конец css/blog.css)
   ============================================================ */

/* ===== LAYOUT КАТЕГОРИИ ===== */
.category-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding: 32px 0 40px;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

/* Сайдбар категории — переиспользует .blog-sidebar */
.category-sidebar {
    position: sticky;
    top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 12px;
}

.category-content { min-width: 0; }

/* ===== HERO КАТЕГОРИИ ===== */
.category-hero {
    padding: 0 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease;
}
.category-hero h1 {
    font-size: 30px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: 10px;
}
.category-hero h1 strong { font-weight: 500; color: var(--accent); }
.category-hero .intro {
    font-size: 15px;
    color: var(--text-dim);
    font-weight: 300;
    line-height: 1.7;
    max-width: 700px;
}
.category-hero .meta-info {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* ===== SEO-ТЕКСТ ===== */
.seo-text {
    padding: 0 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}
.seo-text h2 {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
}
.seo-text p {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 300;
    margin-bottom: 10px;
    line-height: 1.7;
}
.seo-text p:last-child { margin-bottom: 0; }
.seo-text strong { color: var(--text); font-weight: 400; }
.seo-text a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(184,160,224,0.2);
    transition: var(--transition);
}
.seo-text a:hover { border-bottom-color: var(--accent); }
.seo-text ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0 14px;
}
.seo-text ul li {
    color: var(--text-dim);
    font-weight: 300;
    font-size: 14px;
    padding: 3px 0 3px 22px;
    position: relative;
}
.seo-text ul li::before {
    content: '—';
    position: absolute;
    left: 2px;
    color: var(--accent);
}

/* ===== ЗАГОЛОВОК СПИСКА СТАТЕЙ ===== */
.section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.15s backwards;
}

/* ===== FAQ-БЛОК НА СТРАНИЦЕ КАТЕГОРИИ ===== */
.category-faq {
    margin: 30px 0 20px;
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.category-faq h2 {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 16px;
}
.category-faq h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    margin-top: 16px;
    margin-bottom: 4px;
}
.category-faq h3:first-of-type { margin-top: 0; }
.category-faq p {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 8px;
}
.category-faq a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(184,160,224,0.2);
    transition: var(--transition);
}
.category-faq a:hover { border-bottom-color: var(--accent); }

/* ===== ССЫЛКА НА ДРУГИЕ КАТЕГОРИИ ===== */
.other-categories {
    margin: 30px 0 20px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
}
.other-categories h2 {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 12px;
}
.other-categories ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.other-categories ul li a {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(184,160,224,0.05);
    border: 1px solid var(--border-accent);
    border-radius: 20px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}
.other-categories ul li a:hover {
    color: #fff;
    border-color: var(--accent);
    background: rgba(184,160,224,0.1);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .category-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .category-sidebar {
        position: static;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
    }
    .category-sidebar .sidebar-title { display: none; }
    .category-sidebar .mobile-filter-toggle { display: flex; }
    .category-sidebar .sidebar-nav {
        display: none;
        flex-direction: column;
        gap: 4px;
        margin-top: 10px;
    }
    .category-sidebar.open .sidebar-nav { display: flex; }
    .category-sidebar .sidebar-link {
        padding: 12px 16px 12px 20px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        width: 100%;
    }
    .category-sidebar .sidebar-link::before { left: 8px; }
    .category-sidebar .sidebar-count { display: inline-block; margin-left: auto; }
}

@media (max-width: 820px) {
    .category-hero h1 { font-size: 24px; }
    .category-faq { padding: 20px; }
    .other-categories ul li a { font-size: 12px; padding: 5px 12px; }
}

@media (max-width: 600px) {
    .category-hero h1 { font-size: 22px; }
    .category-hero .meta-info { gap: 12px; }
    .category-faq { padding: 16px; }
}
