/*
 * WPA News Feed — Stylesheet v1.2.0
 * Root vars expected: --navy, --teal-dark, --cyan, --cyan-light, --yellow, --grey-light
 */

/* ── Shared label ───────────────────────────── */
.wpa-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 0.4rem;
    line-height: 1;
}
.wpa-label--small { font-size: 0.75rem; }

/* ════════════════════════════════════════════════
   HERO SECTION  [wpa_news_hero]
   Left: full-bleed image + navy caption overlay
   Right: white rounded card wrapping sidebar posts
════════════════════════════════════════════════ */
.wpa-news-hero-wrap {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.25rem;
    align-items: stretch;
	border-radius: 20px;
	overflow: hidden;
}

/* ── Hero post (left) ── */
.wpa-hero-post {
    position: relative;
    background: var(--navy);
    border-radius: 4px;
    overflow: hidden;
}

.wpa-hero-post__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.wpa-hero-post__image {
    flex: 1;
    min-height: 240px;
    overflow: hidden;
    background: #1a3a5c;
}

.wpa-hero-post__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.wpa-hero-post__link:hover .wpa-hero-post__image img {
    transform: scale(1.03);
}

.wpa-hero-post__image--placeholder {
    width: 100%;
    min-height: 240px;
    background: linear-gradient(135deg, #1a3a5c 0%, #002b5c 100%);
}

.wpa-hero-post__body {
    padding: 1.5rem 1.75rem 1.75rem;
    background: var(--navy);
    color: #fff;
}

.wpa-hero-post__title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 0.75rem;
    transition: color 0.2s;
}

.wpa-hero-post__link:hover .wpa-hero-post__title { color: var(--cyan-light); }

.wpa-hero-post__excerpt {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.75);
    margin: 0 0 1rem;
}

.wpa-hero-post__meta {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Sidebar posts (right) ──
   White card with rounded corners wrapping all 4 items
── */
ul.wpa-sidebar-posts,
.wpa-news-hero-wrap ul.wpa-sidebar-posts {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

ul.wpa-sidebar-posts li.wpa-sidebar-post,
.wpa-news-hero-wrap ul.wpa-sidebar-posts li.wpa-sidebar-post {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1;
    border-bottom: 1px solid #ebebeb;
}

ul.wpa-sidebar-posts li.wpa-sidebar-post:last-child {
    border-bottom: none;
}

/* Kill any Divi pseudo-element bullets */
ul.wpa-sidebar-posts li.wpa-sidebar-post::before,
ul.wpa-sidebar-posts li.wpa-sidebar-post::marker {
    display: none !important;
    content: none !important;
}

.wpa-sidebar-post__link {
    display: flex;
    align-items: stretch;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    padding: 0;
}

.wpa-sidebar-post__link:hover { background: var(--grey-light); }

.wpa-sidebar-post__image {
    width: 180px;
	height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    background: #dde4ed;
}

.wpa-sidebar-post__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpa-sidebar-post__image--placeholder {
    width: 100%;
    height: 100%;
    background: #dde4ed;
}

.wpa-sidebar-post__body {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
}

.wpa-sidebar-post__title {
    font-size: 1.25rem !important;
    font-weight: 600;
    line-height: 1.35;
    color: var(--navy);
    margin: 0;
    transition: color 0.2s;
}

.wpa-sidebar-post__link:hover .wpa-sidebar-post__title { color: var(--teal-dark); }

.wpa-sidebar-post__meta {
    font-size: 0.85rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.25rem;
}

/* ════════════════════════════════════════════════
   FILTER BAR  [wpa_news_filter]
   No background — inherits Divi section colour.
   Input style: white pill + yellow button (matches
   the site's subscribe form aesthetic).
════════════════════════════════════════════════ */
.wpa-news-filters { width: 100%; }

/* Always-visible search row */
.wpa-news-filters__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
}

/* White pill search input — matches subscribe form */
.wpa-news-filters__search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 0 0.5rem 0 1.1rem;
    height: 44px;
    gap: 0.5rem;
}

.wpa-news-filters__search-icon {
    color: #aaa;
    flex-shrink: 0;
}

.wpa-news-filters__search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #333;
    font-size: 0.875rem;
    padding: 0;
    caret-color: var(--teal-dark);
}

.wpa-news-filters__search-input::placeholder { color: #aaa; }

/* Yellow pill FILTERS button */
.wpa-news-filters__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--yellow);
    border: none;
    color: var(--navy);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0 1.4rem;
    height: 44px;
    border-radius: 50px;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.wpa-news-filters__toggle:hover {
    background: #f0d800;
    transform: translateY(-1px);
}

.wpa-news-filters__toggle[aria-expanded="true"] {
    background: var(--navy);
    color: #fff;
    border-radius: 50px 50px 0 0;
}

.wpa-toggle-chevron { transition: transform 0.2s; }
.wpa-news-filters__toggle[aria-expanded="true"] .wpa-toggle-chevron { transform: rotate(180deg); }

/* Collapsible filter panel — no background, clean on teal */
.wpa-news-filters__panel {
    padding: 1rem 0 0.25rem;
}

.wpa-news-filters__panel[hidden] { display: none; }

.wpa-news-filters__row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.wpa-news-filters__group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 150px;
}

.wpa-news-filters__label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

/* White pill selects — consistent with search input */
.wpa-news-filters__select {
    background: #fff;
    border: none;
    color: #333;
    font-size: 0.82rem;
    padding: 0.55rem 1rem;
    cursor: pointer;
    outline: none;
    border-radius: 50px;
    height: 40px;
    min-width: 150px;
    transition: box-shadow 0.2s;
    appearance: auto;
}

.wpa-news-filters__select:focus,
.wpa-news-filters__select:hover {
    box-shadow: 0 0 0 2px var(--yellow);
}

.wpa-news-filters__select option {
    background: #fff;
    color: #333;
}

.wpa-news-filters__clear {
    background: none;
    border: none;
    color: rgba(255,255,255,0.65);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-left: auto;
    transition: color 0.2s;
    align-self: center;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: transparent;
}

.wpa-news-filters__clear:hover {
    color: #fff;
    text-decoration-color: #fff;
}

/* ════════════════════════════════════════════════
   ALM FEED GRID  [wpa_news_feed]
   3-column grid. scroll="false" enforced via shortcode.
   Matches et_pb_post / news-feed / wpa-card structure.
════════════════════════════════════════════════ */
.wpa-news-feed-wrap .alm-listing {
    display: grid !important;
    grid-template-columns: repeat( 3, 1fr ) !important;
    gap: 1.75rem;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wpa-news-feed-wrap .alm-listing .alm-item,
.wpa-news-feed-wrap .alm-listing li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wpa-news-card__no-thumb {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #dde4ed 0%, #c8d4e3 100%);
    display: block;
    width: 100%;
}

.wpa-news-feed-wrap .et_pb_post .et_pb_image_container { overflow: hidden; }
.wpa-news-feed-wrap .et_pb_post .et_pb_image_container img {
    transition: transform 0.4s ease;
    display: block;
    width: 100%;
}
.wpa-news-feed-wrap .et_pb_post:hover .et_pb_image_container img { transform: scale(1.04); }

/* Load More button */
.wpa-news-feed-wrap .alm-btn-wrap {
    margin-top: 2.5rem;
    text-align: center;
}

.wpa-news-feed-wrap .alm-load-more-btn {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 2px solid var(--navy);
    padding: 0.8rem 2.75rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border-radius: 0;
}

.wpa-news-feed-wrap .alm-load-more-btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.wpa-news-feed-wrap .alm-load-more-btn.loading { opacity: 0.6; cursor: wait; }
.wpa-news-feed-wrap .alm-load-more-btn.done { display: none; }

/* ── Responsive ─────────────────────────────── */
@media ( max-width: 980px ) {
    .wpa-news-hero-wrap { grid-template-columns: 1fr; gap: 1rem; }
    ul.wpa-sidebar-posts,
    .wpa-news-hero-wrap ul.wpa-sidebar-posts { border-radius: 4px; }
    .wpa-news-feed-wrap .alm-listing { grid-template-columns: repeat(2, 1fr) !important; }
}

@media ( max-width: 640px ) {
    .wpa-news-filters__bar { flex-wrap: wrap; }
    .wpa-news-filters__row { flex-direction: column; gap: 0.75rem; }
    .wpa-news-filters__group { min-width: 100%; }
    .wpa-news-filters__clear { margin-left: 0; }
    .wpa-news-feed-wrap .alm-listing { grid-template-columns: 1fr !important; }
	.wpa-sidebar-post__image {width: 150px; height: 150px;}
	body .alm-filters-container .alm-filter--inner {padding: 0;}
}
