/* ═══════════════════════════════════════════════
   LS Articles  v1.2.2
   Custom articles page — LabelSwift brand
   ═══════════════════════════════════════════════ */

/* ── Single post — hide unwanted meta ── */
.single-post .posted-on,
.single-post .byline,
.single-post .post-author-bio {
    display: none !important;
}

/* ── Single post — make links visible ── */
.single-post .entry-content a,
.single-post .post-content a,
.single-post article .entry-content a {
    color: #499CC2 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.single-post .entry-content a:hover,
.single-post .post-content a:hover,
.single-post article .entry-content a:hover {
    color: #E8833A !important;
}

/* ── Reset & wrapper ── */
.lsar-wrap {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    color: #252531;
    -webkit-font-smoothing: antialiased;
}

.lsar-wrap *,
.lsar-wrap *::before,
.lsar-wrap *::after {
    box-sizing: border-box;
}

/* ── Hero ── */
.lsar-hero {
    text-align: center;
    padding: 48px 20px 32px;
}

.lsar-hero h1 {
    font-size: 32px !important;
    font-weight: 600 !important;
    color: #252531 !important;
    margin: 0 0 8px !important;
    line-height: 1.2 !important;
}

.lsar-hero p {
    font-size: 16px;
    color: #6b6b78;
    margin: 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Tab bar ── */
.lsar-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 0 24px;
    border-bottom: 1px solid #e8e8ec;
    margin-bottom: 0;
    justify-content: center;
    width: 100%;
}

.lsar-tab {
    padding: 10px 22px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid #d8d8de;
    color: #6b6b78;
    background: transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.lsar-tab:hover {
    background: #E8833A !important;
    color: #fff !important;
    border-color: #E8833A !important;
}

.lsar-tab--active,
.lsar-tab--active:hover {
    background: #499CC2 !important;
    color: #fff !important;
    border-color: #499CC2 !important;
}

/* ── Category sections ── */
.lsar-section {
    padding: 36px 0;
    border-bottom: 1px solid #e8e8ec;
    transition: opacity 0.25s ease, max-height 0.35s ease;
    overflow: hidden;
}

.lsar-section:last-of-type {
    border-bottom: none;
}

.lsar-section--hidden {
    opacity: 0;
    max-height: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    pointer-events: none;
}

.lsar-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.lsar-section__head h2 {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #252531 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.lsar-view-all {
    font-size: 14px;
    font-weight: 500;
    color: #499CC2;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}

.lsar-view-all:hover {
    color: #3a7fa0;
    text-decoration: underline;
}

/* ── Card grid ── */
.lsar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* ── Article card ── */
.lsar-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e8e8ec;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    background: #fff;
}

.lsar-card:hover {
    border-color: #499CC2;
    box-shadow: 0 4px 16px rgba(73, 156, 194, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.lsar-card__img {
    height: 180px;
    background-color: #f0f0f4;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lsar-card__placeholder {
    font-size: 36px;
    font-weight: 600;
    color: #c0c0cc;
    text-transform: uppercase;
}

.lsar-card__body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.lsar-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    align-self: flex-start;
    line-height: 1.4;
}

.lsar-card__body h3 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #252531 !important;
    margin: 0 0 8px !important;
    line-height: 1.4 !important;
}

.lsar-card:hover .lsar-card__body h3 {
    color: #499CC2 !important;
}

.lsar-card__body p {
    font-size: 13px;
    color: #6b6b78;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Archive header ── */
.lsar-archive__header {
    text-align: center;
    padding: 48px 20px 32px;
}

.lsar-archive__header h1 {
    font-size: 32px !important;
    font-weight: 600 !important;
    color: #252531 !important;
    margin: 0 0 10px !important;
    line-height: 1.2 !important;
}

.lsar-archive__header p {
    font-size: 16px;
    color: #6b6b78;
    margin: 0 0 16px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.lsar-archive__back {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #499CC2;
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.15s;
}

.lsar-archive__back:hover {
    color: #3a7fa0;
    text-decoration: underline;
}

.lsar-badge--lg {
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 6px;
}

/* ── Archive grid — no section wrapper needed ── */
.lsar-archive .lsar-grid {
    padding: 0 0 40px;
}

/* ── Pagination ── */
.lsar-pagination {
    text-align: center;
    padding: 20px 0 48px;
}

.lsar-pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.lsar-pagination li {
    margin: 0;
}

.lsar-pagination a,
.lsar-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #d8d8de;
    color: #6b6b78;
    background: transparent;
}

.lsar-pagination a:hover {
    background: #E8833A;
    color: #fff;
    border-color: #E8833A;
    text-decoration: none;
}

.lsar-pagination .current {
    background: #499CC2;
    color: #fff;
    border-color: #499CC2;
}

.lsar-pagination .prev,
.lsar-pagination .next {
    font-weight: 600;
    padding: 0 16px;
}

.lsar-pagination .dots {
    border: none;
    color: #6b6b78;
    min-width: auto;
    padding: 0 4px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .lsar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .lsar-hero {
        padding: 32px 12px 24px;
    }

    .lsar-hero h1 {
        font-size: 24px !important;
    }

    .lsar-tabs {
        gap: 8px;
        padding-bottom: 20px;
    }

    .lsar-tab {
        font-size: 13px;
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .lsar-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .lsar-tabs::-webkit-scrollbar {
        display: none;
    }

    .lsar-tab {
        flex-shrink: 0;
        font-size: 13px;
        padding: 8px 14px;
    }

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

    .lsar-card__img {
        height: 160px;
    }

    .lsar-section__head h2 {
        font-size: 18px !important;
    }

    .lsar-archive__header h1 {
        font-size: 24px !important;
    }

    .lsar-pagination a,
    .lsar-pagination span {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }
}
