/**
 * News listing page — card grid, pagination, load-more (from public/html/news.html + templates/news/index.html.twig)
 * Scope: news index only (not GrapesJS article body — see news-content.css)
 */

/* Világos kék oldalháttér; akcent #f1c40f (előző site); Roboto: base.html.twig */
.news-page {
    --news-page-bg: #b9d7f4;
    --news-card-bg: #1b3356;
    --news-accent: #f1c40f;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--news-page-bg);
    min-height: 100vh;
}

.news-page .section h1,
.news-page .section .subtitle {
    color: #0f172a;
}

.news-page .section h4 {
    color: #152542;
}

/* Kategória chip szűrő — letisztult, modern badge sor */
.news-category-section {
    padding-top: 1rem;
    padding-bottom: 1.35rem;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    border-bottom: 1px solid rgba(27, 51, 86, 0.06);
}

.news-category-filter {
    max-width: 52rem;
    margin: 0 auto;
    text-align: center;
}

.news-category-filter__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.42);
    margin: 0 0 0.75rem;
}

.news-category-filter__chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.news-category-filter__chips li {
    margin: 0;
}

.news-category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4375rem 1rem;
    min-height: 2.125rem;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #1b3356;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(27, 51, 86, 0.1);
    border-radius: 9999px;
    text-decoration: none;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.news-category-chip:hover {
    background: #fff;
    border-color: rgba(27, 51, 86, 0.18);
    color: #0f1f3a;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.news-category-chip:focus-visible {
    outline: 2px solid rgba(241, 196, 15, 0.85);
    outline-offset: 2px;
}

.news-category-chip.is-active {
    background: #1b3356;
    border-color: #1b3356;
    color: #fff;
    box-shadow: 0 2px 14px rgba(27, 51, 86, 0.32);
    transform: none;
}

.news-category-chip.is-active:hover {
    background: #152a47;
    border-color: #152a47;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(27, 51, 86, 0.38);
}

@media (max-width: 575px) {
    .news-category-filter__chips {
        gap: 0.4rem;
    }

    .news-category-chip {
        font-size: 0.78rem;
        padding: 0.4rem 0.85rem;
    }
}

.news-page .text-muted {
    color: rgba(15, 23, 42, 0.58) !important;
}

/* Listing preview text block (Twig shows excerpt + optional content snippet) */
.news-card .post-classic-content {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}

.news-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--news-card-bg, #1b3356) !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease !important;
}

.news-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45) !important;
    border-color: rgba(241, 196, 15, 0.35) !important;
}

.news-card .post-classic-figure {
    margin: 0;
    flex-shrink: 0;
}

.news-card .post-classic-figure > a {
    display: block;
    overflow: hidden;
    border-radius: 0;
}

.news-card .post-classic-caption {
    padding: 1.1rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.news-card .post-classic-title {
    color: #ffffff !important;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.65rem;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.news-card .post-classic-title a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.news-card .post-classic-title a:hover {
    color: var(--news-accent, #f1c40f) !important;
}

.news-card .post-classic-excerpt {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.75rem;
    flex: 1 1 auto;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    min-height: calc(1.5em * 3);
}

.news-card .post-classic-meta {
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.news-card .post-classic-meta li {
    margin: 0;
}

.news-card .post-classic-meta a {
    color: var(--news-accent, #f1c40f) !important;
    font-weight: 700 !important;
}

.news-card .post-classic-figure img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-card .button-wrap {
    margin-top: auto;
    padding-top: 0.25rem;
}

/* CTA — Roboto Black (900), akcent szín */
.news-card .button-wrap .button.button-primary {
    width: 100%;
    text-align: center;
    border-radius: 0 !important;
    font-family: "Roboto", sans-serif !important;
    font-style: normal !important;
    font-weight: 900 !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.65rem 1rem !important;
    border: none !important;
    box-shadow: none !important;
    background: var(--news-accent, #f1c40f) !important;
    background-image: none !important;
    color: #0d1b2a !important;
    -webkit-font-smoothing: antialiased;
}

.news-card .button-wrap .button.button-primary:hover,
.news-card .button-wrap .button.button-primary:focus-visible {
    background: #d4ac0d !important;
    color: #071018 !important;
}

.news-card .button-wrap .button.button-primary:active {
    background: #c29f0c !important;
}

.news-card-placeholder {
    height: 200px;
    border-radius: 0;
    background: linear-gradient(145deg, #2d4a6f 0%, #1b3356 50%, #152a42 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(241, 196, 15, 0.55);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

#load-more-news {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border: none;
    color: var(--bg-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    display: inline-block;
    margin: 0 auto;
    width: auto;
}

#load-more-news:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

#load-more-news:active {
    transform: translateY(0);
}

.row.d-md-none .col-12.text-center {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#loading-indicator {
    text-align: center;
    width: 100%;
}

#loading-indicator .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
    margin: 0 auto;
}

.news-pagination-wrap {
    border-top: 1px solid rgba(27, 51, 86, 0.18);
}

.news-pagination .page-link {
    min-width: 2.75rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f0f0f0;
    border-radius: 0.5rem;
    padding: 0.45rem 0.75rem;
}

.news-pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(212, 175, 55, 0.45);
    color: #fff;
}

/* Lapozó világos kék háttéren (news-page) */
.news-page .news-pagination .page-link {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(27, 51, 86, 0.22);
    color: #1b3356;
}

.news-page .news-pagination .page-link:hover {
    background: #ffffff;
    border-color: rgba(27, 51, 86, 0.35);
    color: #0f172a;
}

.news-page .news-pagination-wrap {
    border-top-color: rgba(27, 51, 86, 0.16);
}

.news-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover, #c9a432) 100%);
    border-color: transparent;
    color: #1a1a1a;
    font-weight: 600;
}

.news-pagination .page-item.disabled .page-link,
.news-pagination .page-item.disabled span.page-link {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

.news-pagination-info {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 0.875rem;
}

.news-page .news-pagination-info {
    color: #ffffff !important;
}
