/**
 * news-listing.css
 * Styles for Template Name: Notícies Sector Tèxtil
 * Ubicació: /assets/css/pages/news-listing.css
 *
 * Colors principals:
 *   --nl-pink:  #B0397A
 *   --nl-plum:  #55244A
 */

/* ── VARIABLES ─────────────────────────────────────────────────────────────── */
:root {
    --nl-pink:        #B0397A;
    --nl-plum:        #55244A;
    --nl-plum-light:  #7a3569;
    --nl-pink-light:  #f4d0e5;
    --nl-pink-pale:   #fdf0f8;
    --nl-white:       #ffffff;
    --nl-bg:          #f7f7f5;
    --nl-gray-100:    #eeebe8;
    --nl-gray-400:    #999;
    --nl-gray-600:    #555;
    --nl-text:        #1a0d17;
    --nl-transition:  0.25s ease;
    --nl-shadow-sm:   0 2px 8px rgba(85, 36, 74, 0.06);
    --nl-shadow-md:   0 8px 24px rgba(85, 36, 74, 0.14);
    --nl-radius:      4px;
}

/* ── HERO ──────────────────────────────────────────────────────────────────── */
.news-page-hero {
    background-color: var(--nl-plum);
    padding: 3.5rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}
.news-page-hero::before {
    content: '';
    position: absolute;
    right: -80px; top: -80px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(176,57,122,.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.news-breadcrumb {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-bottom: 1rem;
}
.news-breadcrumb a {
    color: var(--nl-pink);
    text-decoration: none;
}
.news-breadcrumb a:hover { text-decoration: underline; }
.news-breadcrumb span { margin: 0 .4em; }

.news-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    color: #fff;
    font-weight: 700;
    line-height: 1.15;
    max-width: 680px;
    margin-bottom: .75rem;
}
.news-hero-subtitle {
    color: rgba(255,255,255,.65);
    font-size: 15px;
    max-width: 500px;
    margin: 0;
}
.news-hero-accent {
    display: inline-block;
    width: 48px; height: 3px;
    background: var(--nl-pink);
    margin-top: 1.25rem;
    border-radius: 2px;
}

/* ── FILTER BAR ────────────────────────────────────────────────────────────── */
.news-filter-bar {
    background: var(--nl-white);
    border-bottom: 1px solid var(--nl-gray-100);
    position: sticky;
    top: 0; /* ajustar si el header és sticky */
    z-index: 50;
}
.news-filter-bar .row {
    display: flex;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
}
.news-filter-bar a {
    display: inline-block;
    padding: .9rem 1.2rem;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--nl-gray-400);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color var(--nl-transition), border-color var(--nl-transition);
}
.news-filter-bar a:hover { color: var(--nl-plum); }
.news-filter-bar a.active { color: var(--nl-pink); border-bottom-color: var(--nl-pink); }

/* ── PAGE WRAP ─────────────────────────────────────────────────────────────── */
.news-page-wrap {
    background: var(--nl-bg);
    padding: 2.5rem 0;
}
.news-content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 960px) {
    .news-content-with-sidebar {
        grid-template-columns: 1fr;
    }
    .news-sidebar { display: none; } /* sidebar oculta en mòbil */
}

/* ── FEATURED POST ─────────────────────────────────────────────────────────── */
.news-featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--nl-white);
    border-radius: var(--nl-radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
    min-height: 380px;
    box-shadow: var(--nl-shadow-sm);
}
@media (max-width: 700px) {
    .news-featured-post { grid-template-columns: 1fr; }
}
.news-featured-img {
    background-color: var(--nl-plum);
    background-size: cover;
    background-position: center;
    position: relative;
    min-height: 280px;
}
.news-featured-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(85,36,74,.5) 0%, rgba(176,57,122,.2) 100%);
}
.news-featured-badge {
    position: absolute;
    top: 1.25rem; left: 1.25rem;
    z-index: 2;
    background: var(--nl-pink);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 2px;
}
.news-featured-content {
    padding: 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.news-cat-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--nl-pink);
    background: var(--nl-pink-pale);
    border: 1px solid var(--nl-pink-light);
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: background var(--nl-transition);
    align-self: flex-start;
}
.news-cat-tag:hover { background: var(--nl-pink-light); }

.news-featured-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--nl-plum);
    line-height: 1.25;
    margin-bottom: 1rem;
}
.news-featured-title a {
    color: inherit;
    text-decoration: none;
}
.news-featured-title a:hover { color: var(--nl-pink); }

.news-post-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 12px;
    color: var(--nl-gray-400);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.news-post-meta .sep { color: var(--nl-pink-light); }

.news-featured-excerpt {
    color: var(--nl-gray-600);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.news-featured-excerpt p { margin: 0; }

.news-btn-read {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--nl-pink);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 2px;
    align-self: flex-start;
    transition: background var(--nl-transition);
}
.news-btn-read:hover { background: var(--nl-plum); }
.news-btn-read .arrow { transition: transform var(--nl-transition); }
.news-btn-read:hover .arrow { transform: translateX(4px); }

/* ── SECTION LABEL ─────────────────────────────────────────────────────────── */
.news-section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.news-section-label h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--nl-plum);
    white-space: nowrap;
}
.news-section-line {
    flex: 1;
    height: 1px;
    background: var(--nl-gray-100);
}
.news-section-count {
    font-size: 12px;
    color: var(--nl-gray-400);
    font-weight: 600;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ── NEWS GRID ─────────────────────────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 1100px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
}

/* ── NEWS CARD ─────────────────────────────────────────────────────────────── */
.news-card {
    background: var(--nl-white);
    border-radius: var(--nl-radius);
    overflow: hidden;
    box-shadow: var(--nl-shadow-sm);
    transition: transform var(--nl-transition), box-shadow var(--nl-transition);
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--nl-shadow-md);
}

.news-card-img-wrap {
    display: block;
    position: relative;
    height: 200px;
    background: var(--nl-plum);
    overflow: hidden;
    flex-shrink: 0;
}
.news-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .85;
    transition: transform .4s ease, opacity .3s ease;
}
.news-card:hover .news-card-img-wrap img {
    transform: scale(1.05);
    opacity: 1;
}
.news-card-cat-pill {
    position: absolute;
    bottom: 10px; left: 12px;
    background: rgba(85, 36, 74, .88);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
}

.news-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.news-card-date {
    display: block;
    font-size: 11px;
    color: var(--nl-pink);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.news-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--nl-plum);
    line-height: 1.3;
    flex: 1;
}
.news-card-title a {
    color: inherit;
    text-decoration: none;
}
.news-card-title a:hover { color: var(--nl-pink); }

.news-card-excerpt {
    font-size: 13px;
    color: var(--nl-gray-400);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-excerpt p { margin: 0; }

.news-card-footer {
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--nl-gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.news-card-link {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--nl-pink);
    text-decoration: none;
    transition: color var(--nl-transition);
}
.news-card-link:hover { color: var(--nl-plum); }
.news-card-time {
    font-size: 11px;
    color: var(--nl-gray-400);
}

/* ── EMPTY STATE ───────────────────────────────────────────────────────────── */
.news-empty {
    background: var(--nl-white);
    border-radius: var(--nl-radius);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--nl-gray-400);
    font-size: 15px;
}

/* ── PAGINATION ────────────────────────────────────────────────────────────── */
.news-pagination {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}
.news-pagination .page-numbers {
    display: flex;
    list-style: none;
    gap: 6px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    align-items: center;
}
.news-pagination .page-numbers li { list-style: none; }

.news-pagination a,
.news-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--nl-transition);
    border: 1.5px solid var(--nl-gray-100);
    color: var(--nl-gray-600);
    background: var(--nl-white);
    letter-spacing: .02em;
}
.news-pagination a:hover {
    border-color: var(--nl-pink);
    color: var(--nl-pink);
}
.news-pagination .current {
    background: var(--nl-pink);
    border-color: var(--nl-pink);
    color: var(--nl-white);
}
.news-pagination .dots {
    background: transparent;
    border-color: transparent;
    color: var(--nl-gray-400);
    cursor: default;
}

/* ── SIDEBAR ───────────────────────────────────────────────────────────────── */
.news-sidebar { position: sticky; top: 72px; } /* ajustar top segons header */

.news-widget {
    background: var(--nl-white);
    border-radius: var(--nl-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--nl-shadow-sm);
}
.news-widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--nl-plum);
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--nl-pink);
    margin-bottom: 1rem;
}

/* Search input */
.news-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--nl-gray-100);
    border-radius: 2px;
    font-size: 14px;
    font-family: inherit;
    color: var(--nl-text);
    background: var(--nl-bg);
    outline: none;
    transition: border-color var(--nl-transition);
}
.news-search-input:focus { border-color: var(--nl-pink); }

/* Recent items */
.news-recent-item {
    display: flex;
    gap: 10px;
    padding: .65rem 0;
    border-bottom: 1px solid var(--nl-gray-100);
    text-decoration: none;
    color: inherit;
    transition: opacity var(--nl-transition);
}
.news-recent-item:last-child { border-bottom: none; }
.news-recent-item:hover { opacity: .8; }

.news-ri-thumb {
    width: 56px;
    height: 44px;
    border-radius: 2px;
    background: var(--nl-plum);
    flex-shrink: 0;
    overflow: hidden;
}
.news-ri-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .85;
}
.news-ri-date {
    display: block;
    font-size: 11px;
    color: var(--nl-pink);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 3px;
}
.news-ri-title {
    display: block;
    font-size: 13px;
    color: var(--nl-plum);
    font-weight: 600;
    line-height: 1.3;
}

/* Tag cloud */
.news-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.news-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 2px;
    text-decoration: none;
    background: var(--nl-pink-pale);
    color: var(--nl-plum);
    border: 1px solid var(--nl-pink-light);
    transition: background var(--nl-transition), color var(--nl-transition), border-color var(--nl-transition);
}
.news-tag:hover {
    background: var(--nl-pink);
    color: var(--nl-white);
    border-color: var(--nl-pink);
}