/* ==========================================================================
   assets/style.css — стили статьи-обзора HRM-систем
   ========================================================================== */

.blog-article {
    background: var(--color-bg);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.article-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #10192b, #3730a3);
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    background: linear-gradient(
        to top,
        rgba(9, 14, 28, 0.92) 0%,
        rgba(9, 14, 28, 0.7) 45%,
        rgba(9, 14, 28, 0.15) 100%
    );
    padding-block: 5rem 3rem;
}

.hero-content {
    max-width: 900px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
    font-size: 0.9rem;
}

.article-meta .category {
    display: inline-block;
    padding: 0.4em 1.1em;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-pill);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.article-meta time {
    color: rgba(255, 255, 255, 0.8);
}

.article-hero h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.article-lead {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 760px;
    margin-bottom: 1.6rem;
}

.article-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
}

.stat-item svg {
    display: inline-block;
    opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Тело статьи + сетка с оглавлением
   -------------------------------------------------------------------------- */
.article-body {
    padding-block: 3.5rem 4.5rem;
}

.article-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    align-items: start;
}

/* --------------------------------------------------------------------------
   Оглавление (TOC)
   -------------------------------------------------------------------------- */
.article-toc {
    position: relative;
}

.toc-sticky {
    position: sticky;
    top: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.4rem;
    box-shadow: var(--shadow-sm);
}

.toc-sticky h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.toc-sticky nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.toc-sticky nav a {
    display: block;
    padding: 0.5em 0.75em;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}

.toc-sticky nav a:hover,
.toc-sticky nav a.active {
    color: var(--color-primary);
    background: var(--color-primary-light);
    border-left-color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Основной контент
   -------------------------------------------------------------------------- */
.article-content {
    max-width: 760px;
    min-width: 0;
}

.content-section {
    margin-bottom: 3rem;
    scroll-margin-top: 32px;
}

.content-section h2 {
    margin-bottom: 1.1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-border);
}

.content-section h3 {
    margin-bottom: 0.8rem;
}

.lead-paragraph {
    font-size: 1.15rem;
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.65;
}

/* Выделенный блок */
.highlight-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 5px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 2rem 2rem 2.2rem;
    box-shadow: var(--shadow-sm);
}

.highlight-box h2 {
    border-bottom: none;
    padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   Сравнение HRM vs ATS
   -------------------------------------------------------------------------- */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.comparison-card {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.6rem;
}

.comparison-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.comparison-card ul {
    margin-block: 0.8rem;
}

.comparison-card .note {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    background: var(--color-primary-light);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    color: var(--color-primary-dark);
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Сетка преимуществ
   -------------------------------------------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.8rem 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    font-size: 1.8rem;
    background: var(--color-primary-light);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.97rem;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Таблицы (цены / сравнение систем)
   -------------------------------------------------------------------------- */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-block: 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
}

.article-content th,
.article-content td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.article-content th {
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content tbody tr:nth-child(even) {
    background: var(--color-surface-alt);
}

/* --------------------------------------------------------------------------
   Рейтинг ТОП-систем
   -------------------------------------------------------------------------- */
.rating-card {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.rating-card .rank {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-item summary,
.faq-item .faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-heading);
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--color-primary);
    transition: transform var(--transition);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item .faq-answer,
.faq-item > p {
    padding: 0 1.4rem 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Блок призыва к действию
   -------------------------------------------------------------------------- */
.cta-block {
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin-block: 3rem;
}

.cta-block h2 {
    color: #fff;
    border-bottom: none;
}

.cta-block p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 560px;
    margin-inline: auto;
    margin-bottom: 1.6rem;
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .article-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .article-toc {
        order: -1;
    }

    .toc-sticky {
        position: static;
    }

    .toc-sticky nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .article-content {
        max-width: none;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .hero-overlay {
        padding-block: 3.5rem 2rem;
    }

    .highlight-box {
        padding: 1.4rem;
    }

    .rating-card {
        flex-direction: column;
    }
}