/* ══════════════════════════════════════════════════════════
   Article pages — shared styles for instrumenty & chto-takoe
   ══════════════════════════════════════════════════════════ */

/* ══ Article hero (no visual, text-only) ══ */
.article-hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 60px;
}

.article-hero .hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 20px;
}

.article-meta-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-bg);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.article-meta-sep::before {
    content: '\00B7';
}

/* ══ Article body (longread) ══ */
.article-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto;
}

.article-body {
    max-width: 720px;
    line-height: 1.8;
}

.article-body h2 {
    font-size: 1.5rem;
    color: #fff;
    border-left: 3px solid var(--accent);
    padding-left: 16px;
    margin-top: 48px;
    margin-bottom: 20px;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body h3 {
    font-size: 1.2rem;
    color: #E5E5E5;
    margin-top: 32px;
    margin-bottom: 12px;
}

.article-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.article-body a {
    color: var(--accent-light);
    text-decoration: none;
}

.article-body a:hover {
    text-decoration: underline;
}

.article-body blockquote {
    background: rgba(108, 99, 255, 0.05);
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 24px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body blockquote p {
    color: var(--text);
    margin-bottom: 0;
}

.article-body ul, .article-body ol {
    margin: 16px 0;
    padding-left: 20px;
}

.article-body li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
    list-style: disc;
}

.article-body ol li {
    list-style: decimal;
}

/* ══ Sticky TOC (desktop) ══ */
.article-toc {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    align-self: start;
}

.article-toc h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.article-toc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-toc-list a {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 4px 12px;
    border-left: 2px solid transparent;
    transition: all var(--duration) var(--ease);
}

.article-toc-list a:hover {
    color: var(--text);
}

.article-toc-list a.active {
    color: var(--accent-light);
    border-left-color: var(--accent);
}

/* Mobile TOC (accordion) */
.article-toc-mobile {
    display: none;
    margin-bottom: 32px;
}

.article-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.article-toc-toggle svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-muted);
    transition: transform var(--duration) var(--ease);
}

.article-toc-mobile.open .article-toc-toggle svg {
    transform: rotate(180deg);
}

.article-toc-mobile-list {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.article-toc-mobile.open .article-toc-mobile-list {
    display: flex;
}

.article-toc-mobile-list a {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.article-toc-mobile-list a:last-child {
    border-bottom: none;
}

.article-toc-mobile-list a:hover {
    color: var(--accent-light);
    background: rgba(108, 99, 255, 0.05);
}

/* ══ Tool cards (instrumenty page) ══ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    transition: all var(--duration) var(--ease);
}

.tool-card:hover {
    border-color: rgba(108, 99, 255, 0.3);
    transform: translateY(-4px);
}

.tool-card--featured {
    border: 2px solid var(--accent);
    box-shadow: 0 0 30px rgba(108, 99, 255, 0.15);
    position: relative;
}

.tool-card--featured:hover {
    border-color: var(--accent-light);
    box-shadow: 0 0 40px rgba(108, 99, 255, 0.25);
}

.tool-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--gradient);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-bg);
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
}

.tool-card-header h3 {
    font-size: 1.15rem;
    margin-bottom: 0;
}

.tool-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.tool-star {
    font-size: 0.9rem;
}

.tool-star--filled { color: var(--accent); }
.tool-star--half { color: var(--accent); opacity: 0.5; }
.tool-star--empty { color: #3B3B5E; }

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tool-tag {
    display: inline-flex;
    padding: 4px 10px;
    background: var(--accent-bg);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--accent-light);
    font-weight: 500;
}

.tool-meta {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.tool-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-card .btn {
    font-size: 0.85rem;
    padding: 10px 20px;
}

/* ══ Comparison table ══ */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.compare-table thead th {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
}

.compare-table tbody tr:nth-child(odd) {
    background: var(--bg-alt);
}

.compare-table tbody tr:nth-child(even) {
    background: var(--card-bg);
}

.compare-table tbody tr.row--featured {
    background: rgba(108, 99, 255, 0.08);
}

.compare-table td {
    padding: 12px 16px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.compare-table td:first-child {
    color: #fff;
    font-weight: 600;
}

.compare-table .table-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
}

/* ══ Steps (3-step schema) ══ */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    text-align: center;
    padding: 32px 24px;
}

.step-num {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    margin: 0 auto 16px;
}

.step-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.step-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ══ Content cards (tasks) ══ */
.content-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.content-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all var(--duration) var(--ease);
}

.content-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.content-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.content-card h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.content-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ══ Article CTA ══ */
.section--article-cta {
    text-align: center;
    background: var(--bg-alt);
    padding: 80px 0;
}

.section--article-cta h2 { margin-bottom: 12px; }
.section--article-cta .lead { margin-bottom: 32px; }

/* ══ RESPONSIVE ══ */

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-toc {
        display: none;
    }

    .article-toc-mobile {
        display: block;
    }
}

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

    .steps-grid { grid-template-columns: 1fr; }

    .content-cards { grid-template-columns: 1fr; }

    .article-hero {
        padding-top: calc(var(--nav-height) + 40px);
    }
}
