/* ==========================================================================
   Articles / Blog — Styles
   Archive page, article cards, single-post tweaks
   ========================================================================== */

/* ---------- Layout ---------- */

.nt-articles-page {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #213777;
    background: #FAFBFF;
    padding-bottom: 80px;
}

.nt-articles-page .nt-container {
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 120px;
}

/* ---------- Breadcrumbs spacing ---------- */

.nt-articles-page .rank-math-breadcrumb {
    margin: 24px 0 16px;
    font-size: 13px;
}

/* ---------- Hero (catalog-style title row) ---------- */

.nt-articles-hero {
    padding: 24px 0 20px;
}

.nt-articles-hero .catalog-title-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 8px;
}

.nt-articles-hero .catalog-title-row h1 {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.2;
    margin: 0;
}

.nt-articles-hero .catalog-title-row .count {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.nt-articles-hero__subtitle {
    font-size: 16px;
    color: #5a6a99;
    margin: 0;
    font-weight: 400;
}

/* ---------- Category filters (catalog chip style) ---------- */

.nt-articles-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.nt-articles-filters .category-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #FFFFFF;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.nt-articles-filters .category-chip:hover {
    border-color: #1a1a2e;
    color: #1a1a2e;
    background: #f8fafc;
}

.nt-articles-filters .category-chip.active {
    background: rgba(44, 61, 245, 0.07);
    border-color: #2C3DF5;
    color: #2C3DF5;
}

.nt-articles-filters .category-chip .chip-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.nt-articles-filters .category-chip.active .chip-count {
    color: rgba(44, 61, 245, 0.5);
}

/* ---------- Grid ---------- */

.nt-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    min-height: 200px;
    transition: opacity 0.3s;
}

.nt-articles-grid.is-loading {
    opacity: 0;
    pointer-events: none;
}

/* ---------- Universal article card ---------- */

.nt-article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
}

.nt-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.nt-article-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Image */
.nt-article-card__image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #E8EAF6;
}

.nt-article-card--small .nt-article-card__image {
    height: 140px;
}

.nt-article-card--large .nt-article-card__image {
    height: 100%;
    min-height: 280px;
}

.nt-article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nt-article-card__image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    line-height: 1.3;
}

/* Category (inline in meta row) */
.nt-article-card__category {
    font-weight: 600;
    color: #2C3DF5;
}

.nt-article-card__category::after {
    content: '·';
    margin-left: 12px;
    color: #c8cee6;
}

/* Body */
.nt-article-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 20px 20px;
}

.nt-article-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
    color: #213777;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nt-article-card--small .nt-article-card__title {
    font-size: 15px;
    -webkit-line-clamp: 2;
}

.nt-article-card__excerpt {
    font-size: 14px;
    line-height: 1.55;
    color: #5a6a99;
    margin: 0 0 auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nt-article-card--small .nt-article-card__excerpt {
    display: none;
}

/* Meta */
.nt-article-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
    color: #8892b5;
}

.nt-article-card__meta span {
    white-space: nowrap;
}

.nt-article-card__date::after {
    content: '·';
    margin-left: 12px;
    color: #c8cee6;
}

/* ---------- Search results article cards ---------- */

.nt-search-articles {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E6E6FF;
}

.nt-search-articles__title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8892b5;
    margin: 0 0 12px;
}

.nt-search-article-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s;
}

.nt-search-article-item:hover {
    opacity: 0.75;
}

.nt-search-article-item__thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #E8EAF6;
}

.nt-search-article-item__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.nt-search-article-item__title {
    font-size: 14px;
    font-weight: 600;
    color: #213777;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 4px;
}

.nt-search-article-item__meta {
    font-size: 12px;
    color: #8892b5;
}

.nt-search-articles__all {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2C3DF5;
    text-decoration: none;
}

.nt-search-articles__all:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 1600px) {
    .nt-articles-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1600px) {
    .nt-articles-page .nt-container {
        padding: 0 60px;
    }
}

@media (max-width: 1200px) {
    .nt-articles-page .nt-container {
        padding: 0 24px;
    }

    .nt-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nt-articles-hero .catalog-title-row h1 {
        font-size: 24px;
    }

    .nt-articles-hero__subtitle {
        font-size: 14px;
    }

    .nt-articles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nt-articles-page .nt-container {
        padding: 0 16px;
    }

    .nt-articles-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .nt-articles-filters::-webkit-scrollbar {
        display: none;
    }

    /* Hide excerpts on mobile for compact layout */
    .nt-articles-page .nt-article-card__excerpt {
        display: none;
    }
}
