/**
 * Speeches listing page.
 * Text-only bordered cards (screenshot); reuses press-release filter chrome.
 *
 * @package jpd-theme
 */

.jpd-page--speeches {
    color: #292929;
    background: #ffffff;
}

.jpd-speeches-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 56px 0 72px;
}

.jpd-speeches-page__heading {
    margin: 0;
    color: #2a2a2a;
    font-size: clamp(1.5rem, 2.2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.jpd-speeches-page__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.jpd-speeches-page__list.jpd-listing--loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* ── Filters (mirror press-release chrome) ── */
.jpd-speeches-filters {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 26px;
    border: 1px solid #d3d3d3;
    border-radius: 12px;
    background: #f3f3f3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.jpd-speeches-filters__row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: 16px 20px;
    align-items: center;
}

.jpd-speeches-filters__row-label {
    color: #2b2b2b;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.jpd-speeches-filters__row-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    min-width: 0;
}

.jpd-speeches-filters__checkboxes {
    gap: 10px 18px;
}

.jpd-speeches-filters__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    color: #2b2b2b;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.jpd-speeches-filters__checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--jpd-secondary, #e8a020);
    cursor: pointer;
}

.jpd-speeches-filters__select-wrap {
    position: relative;
    flex: 0 1 150px;
    min-width: 132px;
}

.jpd-speeches-filters__select {
    width: 100%;
    height: 44px;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    padding: 0 40px 0 16px;
    background: #ffffff;
    color: #2b2b2b;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.jpd-speeches-filters__select:hover {
    border-color: #a9a9a9;
}

.jpd-speeches-filters__select:focus {
    border-color: #103d74;
    box-shadow: 0 0 0 3px rgba(16, 61, 116, 0.14);
}

.jpd-speeches-filters__select:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.jpd-speeches-filters__select-arrow {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-flex;
    width: 18px;
    height: 18px;
    color: #333333;
    pointer-events: none;
    transform: translateY(-50%);
}

.jpd-speeches-filters__select-arrow svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.jpd-speeches-filters__keyword-wrap {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 420px;
}

.jpd-speeches-filters__keyword {
    width: 100%;
    height: 44px;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    padding: 0 18px;
    background: #ffffff;
    color: #2b2b2b;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1;
    outline: none;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.jpd-speeches-filters__keyword::placeholder {
    color: #9a9a9a;
}

.jpd-speeches-filters__keyword:focus {
    border-color: #103d74;
    box-shadow: 0 0 0 3px rgba(16, 61, 116, 0.14);
}

/* ── Text-only bordered cards (screenshot) ── */
.jpd-page--speeches .jpd-news-card {
    display: block;
    min-height: 0;
    padding: 28px 32px;
    overflow: visible;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    background: #ffffff;
}

.jpd-page--speeches .jpd-news-card__image-wrap {
    display: none;
}

.jpd-page--speeches .jpd-news-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    padding: 0;
}

.jpd-page--speeches .jpd-news-card__meta {
    gap: 10px;
}

.jpd-page--speeches .jpd-news-card__category {
    color: var(--jpd-secondary, #e8a020);
    font-size: 0.9rem;
    font-weight: 700;
}

.jpd-page--speeches .jpd-news-card__date {
    color: #8a8a8a;
    font-size: 0.9rem;
}

.jpd-page--speeches .jpd-news-card__title {
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
    -webkit-line-clamp: 3;
}

.jpd-page--speeches .jpd-news-card__excerpt {
    flex: 0 1 auto;
    color: #5c5c5c;
    font-size: 0.95rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
}

.jpd-page--speeches .jpd-news-card__readmore {
    min-height: 40px;
    margin-top: 4px;
    padding: 0 18px;
    border-radius: 4px;
    background: var(--jpd-secondary, #e8a020);
    font-size: 0.9rem;
    font-weight: 600;
}

.jpd-page--speeches .jpd-listing-pagination {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .jpd-speeches-page {
        gap: 20px;
        padding: 40px 0 56px;
    }

    .jpd-speeches-page__heading {
        font-size: 1.45rem;
    }

    .jpd-speeches-filters {
        padding: 18px;
    }

    .jpd-speeches-filters__row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .jpd-speeches-filters__select-wrap,
    .jpd-speeches-filters__keyword-wrap {
        flex: 1 1 100%;
        max-width: none;
    }

    .jpd-page--speeches .jpd-news-card {
        padding: 22px 20px;
    }

    .jpd-page--speeches .jpd-listing-pagination {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jpd-speeches-page__list.jpd-listing--loading,
    .jpd-speeches-filters__select,
    .jpd-speeches-filters__keyword {
        transition: none;
    }
}
