/* ================================================
   Culture Filter – styles
   Color palette: white, light-gray (#f5f5f5, #e8e8e8), dark-gray (#2c2c2c), accent (#555)
   ================================================ */

/* --- Wrap ---------------------------------------- */
.cf-wrap {
    position: relative;
    font-family: inherit;
    color: #2c2c2c;
}

/* --- Filter bar ---------------------------------- */
.cf-filter-bar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
    width: 100%;
    box-sizing: border-box;
}

.cf-filter-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding: 0;
}

.cf-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

/* --- Labels -------------------------------------- */
.cf-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 8px;
}

/* --- Select -------------------------------------- */
.cf-filter-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px;
}

.cf-select-wrap {
    position: relative;
    display: block;
}

.cf-select {
    appearance: none;
    -webkit-appearance: none;
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 40px 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #2c2c2c;
    cursor: pointer;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.cf-select:hover,
.cf-select:focus {
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.cf-select-arrow {
    pointer-events: none;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #777;
}

/* --- Checkboxes ---------------------------------- */
.cf-filter-group--types {
    flex: 1 1 auto;
}

.cf-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
}

.cf-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 0 14px 0 10px;
    height: 40px;
    box-sizing: border-box;
    background: #f5f5f5;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, border-color .15s;
}

.cf-checkbox-label:hover {
    background: #ebebeb;
    border-color: #bbb;
}

.cf-checkbox,
.cfm-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cf-checkbox-box {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 2px solid #ccc;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
}

.cf-checkbox:checked ~ .cf-checkbox-box,
.cfm-checkbox:checked ~ .cf-checkbox-box {
    background: #ff8300;
    border-color: #ff8300;
}

.cf-checkbox:checked ~ .cf-checkbox-box::after,
.cfm-checkbox:checked ~ .cf-checkbox-box::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.cf-checkbox-label:has(.cf-checkbox:checked),
.cf-checkbox-label:has(.cfm-checkbox:checked) {
    border-color: #ff8300;
    background: #fff5eb;
}

/* --- Reset button -------------------------------- */
.cf-reset-btn {
    align-self: flex-end;
    background: none;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-family: inherit;
    color: #777;
    cursor: pointer;
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}
.cf-reset-btn:hover {
    border-color: #999;
    color: #333;
}

/* --- Results meta -------------------------------- */
.cf-results-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    min-height: 20px;
}

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

/* --- Card ---------------------------------------- */
.cf-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.cf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.10);
    border-color: #d0d0d0;
    text-decoration: none;
    color: inherit;
}

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

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

.cf-card:hover .cf-card__img {
    transform: scale(1.04);
}

.cf-card__img--placeholder {
    background: linear-gradient(135deg, #e8e8e8 0%, #d8d8d8 100%);
}

.cf-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.cf-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: #1a1a1a;
}

.cf-card__excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.cf-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.cf-card__tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #666;
    background: #f2f2f2;
    border-radius: 6px;
    padding: 3px 8px;
}

/* --- Empty state --------------------------------- */
.cf-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 14px;
    margin: 0;
}

/* --- Loading ------------------------------------- */
.cf-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 10;
}

.cf-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #444;
    border-radius: 50%;
    animation: cf-spin .7s linear infinite;
}

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

/* --- Load more ----------------------------------- */
.cf-load-more-wrap {
    text-align: center;
    margin-top: 36px;
}

.cf-load-more-btn {
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 12px;
    padding: 12px 36px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}

.cf-load-more-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #222;
}

/* --- Responsive ---------------------------------- */
@media (max-width: 768px) {
    .cf-filter-bar {
        padding: 18px 16px;
    }
    .cf-filter-title {
        font-size: 16px;
        margin-bottom: 16px;
    }
    .cf-filter-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .cf-filter-group {
        flex: 1 1 100%;
        width: 100%;
    }
    .cf-filter-group--types {
        flex: 1 1 100%;
    }
    .cf-select-wrap {
        width: 100%;
    }
    .cf-select {
        width: 100%;
        box-sizing: border-box;
    }
    .cf-checkboxes {
        gap: 8px;
        width: 100%;
    }
    .cf-checkbox-label {
        flex: 1 1 calc(50% - 4px);
        justify-content: flex-start;
    }
    .cf-reset-btn {
        width: 100%;
        text-align: center;
        padding: 11px 18px;
    }
    .cf-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .cf-grid {
        grid-template-columns: 1fr;
    }
    .cf-filter-bar {
        padding: 16px 14px;
    }
}

@media (max-width: 480px) {
    .cf-grid {
        grid-template-columns: 1fr;
    }
}
