/* ─── Event Taxonomy Filter — filter.css v2.0.0 ──────────────────────────── */

/* ── Filter Bar ───────────────────────────────────────────────────────────── */

.etf-wrapper {
    width: 100%;
    font-family: inherit;
}

.etf-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding: 24px 28px;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    border-radius: 14px;
    margin-bottom: 36px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.etf-filter-dropdowns {
    display: flex;
    gap: 16px;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.etf-filter-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1 1 160px;
    min-width: 140px;
}

.etf-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
    padding-left: 2px;
}

.etf-select-wrap {
    position: relative;
}

.etf-select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 11px 40px 11px 14px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    color: #1a1a1a;
    background: #fafafa;
    border: 1.5px solid #e0e0e0;
    border-radius: 9px;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    line-height: 1.4;
}

.etf-select:hover {
    border-color: #c0c0c0;
    background: #fff;
}

.etf-select:focus {
    outline: none;
    border-color: #00508B;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 80, 139, 0.15);
}

.etf-select.is-active {
    border-color: #00508B;
    background: #e6f0f7;
    color: #003d6b;
}

.etf-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #aaa;
    display: flex;
    align-items: center;
    transition: color 0.18s;
}

.etf-select:focus ~ .etf-chevron,
.etf-select.is-active ~ .etf-chevron {
    color: #00508B;
}

/* ── Reset button ─────────────────────────────────────────────────────────── */

.etf-reset {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 20px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    color: #555;
    background: #f3f3f3;
    border: 1.5px solid #e0e0e0;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
    flex-shrink: 0;
    align-self: flex-end;
}

.etf-reset:hover {
    background: #ffe4e4;
    border-color: #f87171;
    color: #dc2626;
}

.etf-reset:hover svg path {
    stroke: #dc2626;
}

.etf-reset:active {
    transform: scale(0.97);
}

/* ── Status line ──────────────────────────────────────────────────────────── */

.etf-status {
    font-size: 13px;
    color: #999;
    min-height: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.etf-status.is-loading::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e0e0e0;
    border-top-color: #00508B;
    border-radius: 50%;
    animation: etf-spin 0.6s linear infinite;
    flex-shrink: 0;
}

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

/* ── Loop Grid loading state ──────────────────────────────────────────────── */
/* Applied directly to the #etf-loop-grid element during AJAX */

#etf-loop-grid.etf-loading {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* ── No results (fallback) ────────────────────────────────────────────────── */

.etf-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 70px 20px;
    text-align: center;
    color: #bbb;
    width: 100%;
}

.etf-no-results p {
    font-size: 17px;
    font-weight: 600;
    color: #888;
    margin: 0;
}

.etf-no-results span {
    font-size: 14px;
    color: #bbb;
}

/* ── Fallback card grid (only used if Elementor re-render fails) ──────────── */

.etf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.etf-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid #f0f0f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.etf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.11);
}

.etf-card__inner {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.etf-card__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0f0f0;
}

.etf-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #cce0f0, #99c2e0);
}

.etf-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.etf-card:hover .etf-card__img {
    transform: scale(1.05);
}

.etf-card__body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.etf-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.etf-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.etf-badge--county { background: #eff6ff; color: #1d4ed8; }
.etf-badge--month  { background: #fdf4ff; color: #7e22ce; }
.etf-badge--type   { background: #f0fdf4; color: #15803d; }

.etf-card__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.35;
    color: #111;
}

.etf-card__date {
    font-size: 13px;
    color: #aaa;
    margin: 0 0 10px;
}

.etf-card__excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: #555;
    margin: 0;
    flex: 1;
}

.etf-card__cta {
    display: inline-block;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: #00508B;
}

.etf-card:hover .etf-card__cta {
    text-decoration: underline;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .etf-filter-bar {
        padding: 18px 16px;
        gap: 12px;
    }

    .etf-filter-dropdowns {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .etf-filter-group {
        flex: 1 1 100%;
    }

    .etf-reset {
        width: 100%;
        justify-content: center;
    }
}

/* ── No results message — force black text ────────────────────────────────── */

#etf-loop-grid .elementor-loop-nothing-found,
#etf-loop-grid .elementor-loop-nothing-found *,
#etf-loop-grid .e-loop-nothing-found,
#etf-loop-grid .e-loop-nothing-found * {
    color: #000000 !important;
}
