/* ============================================================
   article.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.8;
    font-weight: 400;
}

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

@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: 600; 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%; }

.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%; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    padding: 20px 0 0;
    font-size: 13px;
    color: var(--text-muted);
    animation: fadeIn 0.5s ease;
}
.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.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); }

/* ===== ЗАГОЛОВОК СТАТЬИ ===== */
.post-header {
    padding: 24px 0 20px;
    border-bottom: 1px solid var(--border);
    animation: fadeInUp 0.6s ease;
}
.post-header .category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 8px;
}
.post-header h1 {
    font-size: 38px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1.2;
}
.post-header .meta {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.post-header .meta span { display: flex; align-items: center; gap: 6px; }

/* ===== КОНТЕНТ ===== */
.post-content {
    padding: 30px 0 40px;
    animation: fadeInUp 0.8s ease;
}
.post-content h2 {
    font-size: 26px;
    font-weight: 400;
    color: #fff;
    margin: 40px 0 16px;
    scroll-margin-top: 20px;
}
.post-content h3 {
    font-size: 20px;
    font-weight: 400;
    color: #ddd;
    margin: 30px 0 12px;
}
.post-content p {
    color: var(--text-dim);
    font-weight: 300;
    margin-bottom: 16px;
    font-size: 16px;
}
.post-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(184,160,224,0.2);
    transition: var(--transition);
}
.post-content a:hover { border-bottom-color: var(--accent); }

.post-content .highlight-box {
    background: rgba(184,160,224,0.04);
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}
.post-content .highlight-box p {
    margin-bottom: 0;
    color: var(--text);
    font-weight: 400;
}
.post-content .highlight-box ul { margin-bottom: 0; }

.post-content ul {
    list-style: none;
    padding-left: 0;
    margin: 12px 0 16px;
}
.post-content ul li {
    color: var(--text-dim);
    font-weight: 300;
    font-size: 16px;
    padding: 4px 0 4px 24px;
    position: relative;
}
.post-content ul li::before {
    content: '—';
    position: absolute;
    left: 4px;
    color: var(--accent);
}

.post-content .back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--accent);
    text-decoration: none;
    font-size: 15px;
    transition: var(--transition);
    border-bottom: 1px solid rgba(184,160,224,0.2);
    padding-bottom: 2px;
}
.post-content .back-link:hover { border-bottom-color: var(--accent); }

/* ===== ТАБЛИЦА ===== */
.table-wrap { overflow-x: auto; margin: 20px 0; }
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}
.table-wrap table th {
    background: rgba(184,160,224,0.08);
    color: #fff;
    font-weight: 500;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
}
.table-wrap table td {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-weight: 300;
    font-size: 14px;
}
.table-wrap table td strong { color: var(--text); font-weight: 400; }

/* ===== TOC ===== */
.toc {
    background: rgba(184,160,224,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 22px;
    margin: 24px 0;
}
.toc-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 500;
}
.toc ol {
    list-style: none;
    padding-left: 0;
    margin: 0;
    counter-reset: toc;
}
.toc ol li {
    counter-increment: toc;
    padding: 4px 0;
    font-size: 15px;
    color: var(--text-dim);
    font-weight: 300;
}
.toc ol li::before {
    content: counter(toc) ". ";
    color: var(--accent);
    font-weight: 500;
    margin-right: 4px;
}
.toc ol li a {
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: none;
    transition: var(--transition);
}
.toc ol li a:hover { color: var(--accent); }

/* ===== КАРТИНКИ ===== */
.image-block { margin: 20px 0; }
.image-block img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: block;
}
.image-block figcaption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}
.structure-image { margin: 24px 0 20px; text-align: center; }
.structure-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: block;
    margin: 0 auto;
}
.structure-image .caption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== ВИДЕО ===== */
.video-section { margin: 30px 0; }
.video-section video,
.video-block video {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #000;
}
.video-section .video-caption,
.video-block .caption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

/* ===== БЛОК ОБ АВТОРЕ (E-E-A-T) ===== */
.author-block {
    background: rgba(184,160,224,0.06);
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    padding: 20px 24px;
    margin: 30px 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: 0 0 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); }

/* ===== FAQ ===== */
.faq-section {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.faq-section h2 {
    font-size: 22px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 16px;
}
.faq-section h3 {
    font-size: 17px;
    font-weight: 500;
    color: var(--text);
    margin-top: 16px;
    margin-bottom: 4px;
}
.faq-section p {
    font-size: 14px;
    color: var(--text-dim);
    font-weight: 300;
    margin-bottom: 8px;
}

/* ===== КОНТАКТЫ ===== */
.contacts-section {
    padding: 30px 0 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.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 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: 820px) {
    .post-header h1 { font-size: 30px; }
    nav { gap: 18px; font-size: 13px; }
    .contacts-section .contacts-grid { gap: 20px; }
    .author-block { flex-direction: column; text-align: center; align-items: center; }
    .table-wrap { display: block; overflow-x: auto; }
}

@media (max-width: 600px) {
    header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .post-header h1 { font-size: 24px; }
    .post-header .meta { flex-wrap: wrap; gap: 12px; }
    .post-content h2 { font-size: 22px; }
    .post-content h3 { font-size: 18px; }
    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; }
    .table-wrap table th, .table-wrap table td { font-size: 12px; padding: 8px 10px; }
    .toc { padding: 14px 18px; }
    .toc ol li { font-size: 14px; }
}
