/* iLoveView — News blog */
:root {
    --ilv-news-brand: #ef1919;
    --ilv-news-brand-hover: #d41414;
    --ilv-news-text: #1a1c1d;
    --ilv-news-muted: #5e6a72;
    --ilv-news-border: #ececec;
    --ilv-news-bg: #f8f9fb;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--ilv-news-text);
    background: #fff;
}

.ilv-news-page {
    padding-top: 88px;
    padding-bottom: 72px;
    min-height: 100vh;
    background: linear-gradient(180deg, #fff 0%, var(--ilv-news-bg) 280px, var(--ilv-news-bg) 100%);
}

.ilv-news-hero {
    max-width: 1320px;
    margin: 0 auto;
    padding: 32px 20px 24px;
}

.ilv-news-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ilv-news-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.ilv-news-back:hover {
    color: var(--ilv-news-brand);
}

.ilv-news-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.2;
}

.ilv-news-hero p {
    margin: 0;
    max-width: 560px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ilv-news-muted);
}

.ilv-news-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Tabs */
.ilv-news-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--ilv-news-border);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(16, 24, 40, 0.04);
}

.ilv-news-tab {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ilv-news-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.ilv-news-tab:hover {
    color: var(--ilv-news-text);
    background: #f6f6f6;
}

.ilv-news-tab.is-active {
    background: var(--ilv-news-brand);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 25, 25, 0.25);
}

.ilv-news-tab:focus-visible {
    outline: 2px solid var(--ilv-news-brand);
    outline-offset: 2px;
}

/* Results loading */
.ilv-news-results.is-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* Blog grid — max 3 per row on desktop */
.ilv-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media (min-width: 576px) {
    .ilv-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .ilv-news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ilv-news-grid--related {
    margin-top: 8px;
}

/* Card */
.ilv-news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--ilv-news-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(16, 24, 40, 0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}

.ilv-news-card:hover {
    box-shadow: 0 10px 32px rgba(16, 24, 40, 0.1);
    transform: translateY(-2px);
}

.ilv-news-card-media-wrap {
    display: block;
    text-decoration: none;
}

.ilv-news-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #eef0f3;
}

.ilv-news-card-media--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    color: #c5c5c5;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ilv-news-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}

.ilv-news-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.ilv-news-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ilv-news-badge {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.ilv-news-badge--announcement { background: #f3f4f6; color: #4b5563; }
.ilv-news-badge--feature { background: #eaf3de; color: #3b6d11; }
.ilv-news-badge--improvement { background: #e6f1fb; color: #185fa5; }
.ilv-news-badge--new { background: #fff0f0; color: var(--ilv-news-brand); }

.ilv-news-date {
    font-size: 12px;
    color: var(--ilv-news-muted);
}

.ilv-news-card-title {
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
}

.ilv-news-card-title a {
    color: var(--ilv-news-text);
    text-decoration: none;
    transition: color 0.15s;
}

.ilv-news-card-title a:hover {
    color: var(--ilv-news-brand);
}

.ilv-news-card-excerpt {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.65;
    color: #667085;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ilv-news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--ilv-news-brand);
    text-decoration: none;
    transition: gap 0.15s, color 0.15s;
}

.ilv-news-read-more:hover {
    color: var(--ilv-news-brand-hover);
    gap: 10px;
}

/* Pagination */
.ilv-news-pagination-wrap {
    margin-top: 36px;
    text-align: center;
}

.ilv-news-meta {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--ilv-news-muted);
}

.ilv-news-pagination {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.ilv-news-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ilv-news-muted);
    background: #fff;
    border-color: var(--ilv-news-border);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ilv-news-page-btn:hover:not(:disabled):not(.is-active) {
    background: #f6f6f6;
    color: var(--ilv-news-text);
}

.ilv-news-page-btn.is-active {
    background: var(--ilv-news-brand);
    border-color: var(--ilv-news-brand);
    color: #fff;
}

.ilv-news-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Empty state */
.ilv-news-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    background: #fff;
    border: 1px dashed var(--ilv-news-border);
    border-radius: 16px;
}

.ilv-news-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.ilv-news-empty h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.ilv-news-empty p {
    margin: 0;
    color: var(--ilv-news-muted);
    font-size: 15px;
}

/* Article detail */
.ilv-news-article.ilv-news-article-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
}

.ilv-news-article-header {
    margin-bottom: 28px;
}

.ilv-news-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--ilv-news-muted);
}

.ilv-news-article-num {
    font-weight: 600;
    color: #98a2b3;
}

.ilv-news-article-header h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.25;
}

.ilv-news-article-figure {
    margin: 0 0 32px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--ilv-news-border);
}

.ilv-news-article-image {
    width: 100%;
    display: block;
    max-height: 420px;
    object-fit: cover;
}

.ilv-news-article-content {
    font-size: 16px;
    line-height: 1.75;
    color: #475467;
}

.ilv-news-article-content h1,
.ilv-news-article-content h2,
.ilv-news-article-content h3,
.ilv-news-article-content h4 {
    margin: 1.5em 0 0.6em;
    font-weight: 600;
    color: var(--ilv-news-text);
    line-height: 1.35;
}

.ilv-news-article-content h2 { font-size: 1.35em; }
.ilv-news-article-content h3 { font-size: 1.15em; }

.ilv-news-article-content p {
    margin-bottom: 1em;
}

.ilv-news-article-content ul,
.ilv-news-article-content ol {
    margin-bottom: 1em;
    padding-left: 1.35em;
}

.ilv-news-article-content a {
    color: var(--ilv-news-brand);
    text-decoration: underline;
}

.ilv-news-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.ilv-news-related {
    max-width: 1320px;
    margin: 56px auto 0;
    padding: 0 20px 0;
}

.ilv-news-related h2 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
}

@media (max-width: 575px) {
    .ilv-news-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ilv-news-tabs::-webkit-scrollbar {
        display: none;
    }

    .ilv-news-tab {
        flex: 0 0 auto;
    }
}
