/* News list page (/news). Band comes from page-band.css. */

.nw {
    --pg-band-height: 360px;
    --pg-band-height-sm: 330px;
    --nw-teal: #00ad9c;
    --nw-blue: #0c58a4;
    --nw-navy: #1a2a55;
}

/* ---- header on the band ---- */
.nw-head {
    margin-bottom: 1.75rem;
    color: #fff;
}

.nw-head__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.nw-head__title {
    margin: 0;
    font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
    font-weight: 900;
    line-height: 1.5;
    color: #fff;
}

.nw-head__sub {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.72);
}

.nw-head__count {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    font-weight: 700;
}

.nw-head__count svg {
    width: 1.05rem;
    height: 1.05rem;
    color: #5eead4;
}

/* mobile search + chips (desktop uses the filter card instead) */
.nw-msearch,
.nw-mcats {
    display: none;
}

.nw-msearch {
    position: relative;
    margin-top: 1.1rem;
}

.nw-msearch svg {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.9rem;
    width: 1.1rem;
    height: 1.1rem;
    color: #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

.nw-msearch input {
    width: 100%;
    height: 2.9rem;
    padding-inline: 2.6rem 1rem;
    border: 0;
    border-radius: 0.9rem;
    background: #fff;
    color: #0f172a;
    font-size: 0.9rem;
    box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.5);
    outline: none;
}

.nw-msearch input:focus {
    box-shadow: 0 0 0 3px rgba(0, 173, 156, 0.45);
}

.nw-mcats {
    gap: 0.45rem;
    margin: 0.85rem -1rem 0;
    padding: 0 1rem 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.nw-mcats::-webkit-scrollbar {
    display: none;
}

.nw-mcats__chip {
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
}

.nw-mcats__chip.is-active {
    border-color: #fff;
    background: #fff;
    color: var(--nw-navy);
    font-weight: 700;
}

/* ---- filter card ---- */
.nw-filter {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: 0 18px 40px -28px rgba(26, 42, 85, 0.55);
}

.nw-filter__head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #f8fafc, #fff);
    color: var(--nw-navy);
    font-size: 0.95rem;
    font-weight: 800;
}

.nw-filter__icon {
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.55rem;
    background: linear-gradient(135deg, var(--nw-teal), var(--nw-blue));
    color: #fff;
}

.nw-filter__icon svg {
    width: 1rem;
    height: 1rem;
}

.nw-filter__form {
    display: grid;
    gap: 1.15rem;
    padding: 1.1rem;
}

.nw-field__label {
    display: block;
    margin-bottom: 0.5rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.nw-field__empty {
    color: #94a3b8;
    font-size: 0.8rem;
}

.nw-search {
    position: relative;
}

.nw-search svg {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.75rem;
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

.nw-search input {
    width: 100%;
    height: 2.6rem;
    padding-inline: 2.3rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.nw-search input:focus {
    border-color: var(--nw-teal);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 173, 156, 0.15);
}

/* category chips: the radio is hidden, the pill shows the state */
.nw-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.nw-chip {
    position: relative;
    cursor: pointer;
}

.nw-chip input,
.nw-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nw-chip span {
    display: inline-block;
    padding: 0.32rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 0.78rem;
    transition: all 0.15s ease;
}

.nw-chip:hover span {
    border-color: var(--nw-teal);
    color: var(--nw-teal);
}

.nw-chip input:checked + span {
    border-color: transparent;
    background: linear-gradient(135deg, var(--nw-teal), var(--nw-blue));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 14px -8px rgba(12, 88, 164, 0.7);
}

.nw-chip input:focus-visible + span,
.nw-option input:focus-visible + span {
    outline: 2px solid var(--nw-teal);
    outline-offset: 2px;
}

/* date options */
.nw-options {
    display: grid;
    gap: 0.3rem;
}

.nw-option {
    position: relative;
    cursor: pointer;
}

.nw-option span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.7rem;
    border-radius: 0.65rem;
    color: #334155;
    font-size: 0.85rem;
    transition: background-color 0.15s ease;
}

.nw-option span::before {
    content: "";
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    border: 2px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    transition: all 0.15s ease;
}

.nw-option:hover span {
    background: #f8fafc;
}

.nw-option input:checked + span {
    background: rgba(0, 173, 156, 0.08);
    color: #0f172a;
    font-weight: 700;
}

.nw-option input:checked + span::before {
    border-color: var(--nw-teal);
    box-shadow: inset 0 0 0 3px #fff;
    background: var(--nw-teal);
}

/* buttons */
.nw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 2.75rem;
    border: 0;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, var(--nw-navy), var(--nw-blue));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 24px -14px rgba(12, 88, 164, 0.8);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nw-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -14px rgba(12, 88, 164, 0.9);
}

.nw-btn--inline {
    width: auto;
    padding-inline: 1.4rem;
}

.nw-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.nw-clear svg {
    width: 0.95rem;
    height: 0.95rem;
}

/* ---- shared card parts ---- */
.nw-stretch {
    color: inherit;
    text-decoration: none;
}

.nw-stretch::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.nw-stretch:focus-visible {
    outline: none;
}

.nw-placeholder {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1.2px) 0 0 / 16px 16px,
        linear-gradient(135deg, var(--nw-navy), var(--nw-blue));
}

.nw-badge {
    position: absolute;
    top: 0.75rem;
    inset-inline-start: 0.75rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--nw-navy);
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.4);
}

.nw-badge--new {
    background: linear-gradient(135deg, var(--nw-teal), var(--nw-blue));
    color: #fff;
}

.nw-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.9rem;
    color: #64748b;
    font-size: 0.75rem;
}

.nw-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.nw-meta__item svg {
    width: 0.9rem;
    height: 0.9rem;
    color: #94a3b8;
}

.nw-meta__cat {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 173, 156, 0.1);
    color: #0f766e;
    font-weight: 700;
}

.nw-more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.9rem;
    color: var(--nw-blue);
    font-size: 0.8rem;
    font-weight: 700;
}

.nw-more svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

/* ---- featured ---- */
.nw-feature {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 24px 50px -32px rgba(26, 42, 85, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nw-feature__media {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    background: #e2e8f0;
}

.nw-feature__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nw-feature__body {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.6rem;
}

.nw-feature__title {
    margin: 0.75rem 0 0;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1.75;
}

.nw-feature__summary {
    display: -webkit-box;
    margin: 0.6rem 0 0;
    overflow: hidden;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.95;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* ---- grid cards ---- */
.nw-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

@media (max-width: 1199px) {
    .nw-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.nw-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: 0 14px 34px -28px rgba(26, 42, 85, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nw-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e2e8f0;
}

.nw-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nw-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.35), transparent 45%);
}

.nw-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1rem 1.15rem 1.15rem;
}

.nw-card__title {
    display: -webkit-box;
    margin: 0.55rem 0 0;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.8;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nw-card__summary {
    display: -webkit-box;
    margin: 0.4rem 0 0;
    overflow: hidden;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.9;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* hover / focus for both card types */
.nw-card:hover,
.nw-card:focus-within,
.nw-feature:hover,
.nw-feature:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 24px 44px -26px rgba(26, 42, 85, 0.6);
}

.nw-card:hover,
.nw-card:focus-within {
    border-color: rgba(0, 173, 156, 0.4);
}

.nw-card:hover img,
.nw-feature:hover img {
    transform: scale(1.05);
}

.nw-card:hover .nw-card__title,
.nw-feature:hover .nw-feature__title {
    color: var(--nw-blue);
}

.nw-card:hover .nw-more svg,
.nw-feature:hover .nw-more svg {
    transform: translateX(-4px);
}

.nw-card:has(.nw-stretch:focus-visible),
.nw-feature:has(.nw-stretch:focus-visible) {
    outline: 2px solid var(--nw-teal);
    outline-offset: 3px;
}

/* ---- empty ---- */
.nw-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1.25rem;
    background: #fff;
    text-align: center;
}

.nw-empty__icon {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 1.2rem;
    background: rgba(0, 173, 156, 0.1);
    color: var(--nw-teal);
}

.nw-empty__icon svg {
    width: 2rem;
    height: 2rem;
}

.nw-empty__title {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.nw-empty__text {
    margin: 0.35rem 0 1.25rem;
    color: #64748b;
    font-size: 0.85rem;
}

/* ---- pagination ---- */
.nw-pagination {
    margin-top: 1.75rem;
}

.nw-pagination .blog-pagination__page.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--nw-navy), var(--nw-blue));
    color: #fff;
    box-shadow: 0 8px 16px -10px rgba(12, 88, 164, 0.8);
}

@media (max-width: 1023px) {
    .nw-feature {
        grid-template-columns: 1fr;
    }

    .nw-feature__media {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 767px) {
    .nw-msearch {
        display: block;
    }

    .nw-mcats {
        display: flex;
    }

    .nw-head {
        margin-bottom: 1.25rem;
    }

    .nw-head__row {
        margin-top: 1rem;
    }

    .nw-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nw-feature__body {
        padding: 1.1rem 1.15rem 1.2rem;
    }

    .nw-feature__title {
        font-size: 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nw-card,
    .nw-feature,
    .nw-card img,
    .nw-feature img,
    .nw-more svg {
        transition: none;
    }
}
