/* /news — news list. Site palette: #0085cf, #132856, #2a9df4, Montserrat. */

.news-list {
    --nl-primary: #0085cf;
    --nl-primary-dark: #006da9;
    --nl-navy: #132856;
    --nl-text: #262626;
    --nl-muted: #6b7a90;
    --nl-border: #e6ebf1;
    --nl-bg: #f5f8fb;
    --nl-radius: 14px;
    --nl-shadow: 0 2px 10px rgba(20, 30, 60, .06);
    --nl-shadow-hover: 0 16px 32px rgba(20, 30, 60, .14);
    --nl-ease: cubic-bezier(.4, 0, .2, 1);
    padding: 40px 0 20px;
}

/* ---------- Toolbar ---------- */

.news-list__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.news-list__count {
    margin: 0;
    color: var(--nl-muted);
    font-size: 15px;
}

.news-list__count b {
    color: var(--nl-navy);
}

.news-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 460px;
    margin: 0;
}

.news-search__icon {
    position: absolute;
    left: 16px;
    color: #9aa8bb;
    pointer-events: none;
}

.news-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 48px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--nl-border);
    border-radius: 12px;
    background: #fff;
    color: var(--nl-text);
    font-size: 15px;
    transition: border-color .2s var(--nl-ease), box-shadow .2s var(--nl-ease);
}

.news-search input:focus {
    outline: 0;
    border-color: var(--nl-primary);
    box-shadow: 0 0 0 4px rgba(0, 133, 207, .12);
}

.news-search__reset {
    color: var(--nl-muted);
    font-size: 14px;
    white-space: nowrap;
}

.news-search__reset:hover {
    color: var(--nl-primary);
}

.news-search__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--nl-primary);
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color .2s var(--nl-ease), transform .15s var(--nl-ease);
}

.news-search__submit:hover {
    background: var(--nl-primary-dark);
}

.news-search__submit:active {
    transform: translateY(1px);
}

/* ---------- Shared bits ---------- */

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--nl-primary);
    font-size: 14px;
    font-weight: 600;
}

.news-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    color: var(--nl-primary);
    font-weight: 600;
    font-size: 14px;
}

.news-more svg {
    transition: transform .25s var(--nl-ease);
}

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

/* Placeholder sits under the photo; visible when there is none or it fails to load. */
.news-ph {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .18) 0, rgba(255, 255, 255, 0) 45%),
        linear-gradient(135deg, #2a9df4 0%, #0085cf 55%, #132856 100%);
    color: rgba(255, 255, 255, .92);
    transition: transform .5s var(--nl-ease);
}

.news-ph span {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .3em;
    padding-left: .3em;
}

.news-card:hover .news-ph,
.news-featured:hover .news-ph {
    transform: scale(1.04);
}

.news-card__media img,
.news-featured__media img {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ---------- Featured ---------- */

.news-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    margin-bottom: 32px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--nl-shadow);
    overflow: hidden;
    color: inherit;
    transition: box-shadow .3s var(--nl-ease), transform .3s var(--nl-ease);
}

.news-featured:hover {
    color: inherit;
    text-decoration: none;
    box-shadow: var(--nl-shadow-hover);
    transform: translateY(-3px);
}

.news-featured__media {
    position: relative;
    min-height: 340px;
    overflow: hidden;
    background: var(--nl-bg);
}

.news-featured__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--nl-ease);
}

.news-featured__media.is-placeholder img {
    position: static;
}

.news-featured:hover .news-featured__media img {
    transform: scale(1.04);
}

.news-featured__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 36px 36px 32px;
}

.news-featured__label {
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 133, 207, .1);
    color: var(--nl-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.news-featured__title {
    margin: 0;
    color: var(--nl-navy);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    transition: color .2s var(--nl-ease);
}

.news-featured:hover .news-featured__title {
    color: var(--nl-primary);
}

.news-featured__excerpt {
    margin: 0;
    color: var(--nl-muted);
    font-size: 15px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Grid ---------- */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--nl-radius);
    background: #fff;
    box-shadow: var(--nl-shadow);
    overflow: hidden;
    color: inherit;
    transition: box-shadow .3s var(--nl-ease), transform .3s var(--nl-ease);
}

.news-card:hover,
.news-card:focus-visible {
    color: inherit;
    text-decoration: none;
    transform: translateY(-5px);
    box-shadow: var(--nl-shadow-hover);
}

.news-card:focus-visible {
    outline: 3px solid rgba(0, 133, 207, .35);
    outline-offset: 2px;
}

.news-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--nl-bg);
}

.news-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--nl-ease);
}

.news-card:hover .news-card__media img {
    transform: scale(1.06);
}

.news-card:hover .is-placeholder .news-card__placeholder-icon {
    transform: scale(1.1);
}

.news-card__date {
    position: absolute;
    z-index: 2;
    left: 12px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    color: var(--nl-navy);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(20, 30, 60, .15);
}

.news-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 10px;
    padding: 18px 20px 20px;
}

.news-card__title {
    margin: 0;
    color: var(--nl-navy);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s var(--nl-ease);
}

.news-card:hover .news-card__title {
    color: var(--nl-primary);
}

.news-card__excerpt {
    margin: 0;
    color: var(--nl-muted);
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Video cards (/videogallery) ---------- */

.video-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    border-radius: 50%;
    background: rgba(255, 0, 0, .92);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    transform: translate(-50%, -50%);
    transition: transform .25s var(--nl-ease), background-color .25s var(--nl-ease);
}

.video-card .news-card__media::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(10, 20, 45, 0) 45%, rgba(10, 20, 45, .45) 100%);
    transition: background-color .25s var(--nl-ease);
}

.video-card:hover .video-card__play {
    transform: translate(-50%, -50%) scale(1.12);
    background: #ff0000;
}

.video-card:hover .news-card__media::after {
    background-color: rgba(10, 20, 45, .15);
}

/* ---------- Empty ---------- */

.news-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 70px 20px;
    border: 1px dashed #d6e0ea;
    border-radius: 18px;
    background: #fafcfe;
    text-align: center;
}

.news-empty__icon {
    width: 76px;
    height: 76px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: rgba(0, 133, 207, .1);
    color: var(--nl-primary);
}

.news-empty h3 {
    margin: 0;
    color: var(--nl-navy);
    font-size: 20px;
}

.news-empty p {
    margin: 0 0 14px;
    color: var(--nl-muted);
}

/* ---------- Pagination ---------- */

.site-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 48px 0 10px;
}

.site-pager__pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-pager__page,
.site-pager__nav,
.site-pager__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
}

.site-pager__page,
.site-pager__nav {
    border: 1px solid #e1e8f0;
    background: #fff;
    color: var(--nl-navy, #132856);
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}

.site-pager__page:hover,
.site-pager__nav:hover {
    border-color: #0085cf;
    color: #0085cf;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 133, 207, .15);
}

.site-pager__page.is-active {
    border-color: #0085cf;
    background: #0085cf;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 133, 207, .3);
}

.site-pager__nav.is-disabled {
    opacity: .4;
    pointer-events: none;
}

.site-pager__dots {
    min-width: 24px;
    padding: 0;
    color: #9aa8bb;
}

/* ---------- Reveal animation ---------- */

.reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
}

.reveal-ready [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    transition: opacity .55s var(--nl-ease, ease), transform .55s var(--nl-ease, ease);
    transition-delay: var(--reveal-delay, 0ms);
}

/* Once revealed, hover transitions take over again. */
.reveal-ready .news-card.is-revealed,
.reveal-ready .news-featured.is-revealed {
    transition: opacity .55s var(--nl-ease), transform .3s var(--nl-ease), box-shadow .3s var(--nl-ease);
}

@media (prefers-reduced-motion: reduce) {
    .news-list *,
    .site-pager * {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .news-featured {
        grid-template-columns: 1fr;
    }

    .news-featured__media {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .news-featured__body {
        padding: 24px;
    }

    .news-featured__title {
        font-size: 22px;
    }
}

@media (max-width: 575.98px) {
    .news-list {
        padding-top: 24px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-search {
        flex: 1 1 100%;
    }

    .news-search__submit {
        padding: 0 16px;
    }

    .site-pager__page,
    .site-pager__nav {
        min-width: 40px;
        height: 40px;
    }
}
