/*------------------------------------*\
    NEWS LISTING PAGE
\*------------------------------------*/

/* Main Container */
.news-listing-main {
    background-color: #efeff0;
    padding: 0;
}

.news-listing-container {
    margin: 0 auto;
    padding: 0 60px;
}

/*------------------------------------*\
    CATEGORIES FILTER
\*------------------------------------*/
.news-categories-filter {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 40px;
    background-color: #2F2951;
}

.news-filter-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    flex-wrap: wrap;
}

.news-filter-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.news-categories-title {
    font-family: var(--heading-font);
    font-size: 22px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    margin: 0 0 15px 0;
}

/* News search input */
.news-search-wrapper {
    display: flex;
    align-items: center;
    min-width: 200px;
    position: relative;
}

.news-search-input {
    width: 100%;
    padding: 9px 40px 9px 16px;
    font-family: var(--main-font);
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 0;
    background: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.2s ease;
}

.news-search-input:focus {
    border-color: #666;
}

.news-search-input::placeholder {
    color: #999;
}

.news-search-btn {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.news-search-btn:hover {
    color: #333;
}

/* Custom Dropdown */
.news-dropdown {
    display: inline-block;
    position: relative;
    min-width: 200px;
    user-select: none;
}

.news-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background-color: #fff;
    border: 1px solid #999;
    padding: 9px 16px;
    font-family: var(--main-font);
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
    border-radius: 0;
    text-align: left;
    transition: border-color 0.2s ease;
}

.news-dropdown-toggle:hover,
.news-dropdown.is-open .news-dropdown-toggle {
    border-color: #666;
}

.news-dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.news-dropdown.is-open .news-dropdown-arrow {
    transform: rotate(180deg);
}

.news-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: #fff;
    border: 1px solid #999;
    border-top: none;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.news-dropdown.is-open .news-dropdown-menu {
    display: block;
}

.news-dropdown-item {
    padding: 9px 16px;
    font-family: var(--main-font);
    font-size: 14px;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.news-dropdown-item:hover {
    background-color: #f0f0f0;
}

.news-dropdown-item.is-selected {
    color: #C04C36;
    font-weight: 600;
}

/*------------------------------------*\
    LOADING OVERLAY
\*------------------------------------*/
.news-listing-container {
    position: relative;
}

.news-loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background-color: rgba(239, 239, 240, 0.7);
    align-items: center;
    justify-content: center;
}

.news-loading-overlay.is-active {
    display: flex;
}

.news-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top-color: #C04C36;
    border-radius: 50%;
    animation: news-spin 0.7s linear infinite;
}

@keyframes news-spin {
    to { transform: rotate(360deg); }
}

/*------------------------------------*\
    NEWS POSTS GRID
\*------------------------------------*/
.news-posts-grid {
    transition: opacity 0.25s ease;
}

.news-posts-grid.is-loading {
    opacity: 0.4;
    pointer-events: none;
}

.news-posts-row {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.news-posts-row:last-of-type {
    border-bottom: none;
}

/*------------------------------------*\
    NEWS POST CARD
\*------------------------------------*/
.news-post-card {
    flex: 0 1 calc(50% - 15px);
    max-width: calc(50% - 15px);
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
}

.news-post-date {
    display: inline-block;
    font-style: italic;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.news-post-title {
    font-family: var(--main-font);
    font-size: 20px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    color: #000;
}

.news-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-post-title a:hover {
    color: #C04C36;
}

.news-post-excerpt {
    font-size: 16px;
    margin-bottom: 30px;
}

/* CTA button overrides for news cards */
.news-post-cta {
    margin-top: auto;
}

.news-post-cta::before {
    right: 26px !important;
}

.news-post-cta::after {
    transform: rotate(-32deg) translateX(-22px) !important;
}

.news-post-cta .wp-block-button__link {
    font-size: 16px !important;
    padding: 4px 20px 4px 0 !important;
}

/*------------------------------------*\
    PAGINATION
\*------------------------------------*/
.news-pagination {
    text-align: center;
    padding: 30px 0 30px;
}

.news-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border: 1px solid #ccc;
    background-color: #fff;
    transition: all 0.3s ease;
}

.news-pagination .page-numbers.current,
.news-pagination .page-numbers:hover {
    background-color: #C04C36;
    color: #fff;
    border-color: #C04C36;
}

.news-no-posts {
    text-align: center;
    padding: 40px 0;
    font-size: 16px;
    color: #666;
}

/*------------------------------------*\
    RESPONSIVE
\*------------------------------------*/
@media (max-width: 768px) {
    .news-listing-container {
        padding: 0 20px;
    }

    .news-posts-row {
        flex-direction: column;
        gap: 20px;
        padding: 10px 0;
        margin-bottom: 0;
    }

    .news-post-card {
        flex: 0 1 100%;
        max-width: 100%;
        width: 100%;
        padding: 20px;
    }

    .news-categories-filter {
        padding: 30px 0 20px;
    }

    .news-filter-row {
        gap: 25px;
    }

    .news-search-wrapper {
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .news-listing-container {
        padding: 0 15px;
    }

    .news-dropdown {
        min-width: 160px;
    }

    .news-filter-row {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .news-search-wrapper {
        min-width: 160px;
    }
}
