/* ─────────────────────────────────────────
   Case Study Filter — cs-filter.css
   ───────────────────────────────────────── */

/* Wrapper */
.csf-wrap {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Filters bar ── */
.csf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    padding: 20px 24px;
    background: #f7f8fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.csf-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 180px;
}

.csf-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.csf-select {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
    transition: border-color 0.15s;
    appearance: auto;
}

.csf-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.csf-btn-reset {
    padding: 15px 18px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
    align-self: flex-end;
}

.csf-btn-reset:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* ── Active filter tags ── */
.csf-active-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.csf-tags-label {
    color: #6b7280;
    font-weight: 500;
}

.csf-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
}

.csf-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #1d4ed8;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}

.csf-tag-remove:hover {
    opacity: 1;
}

/* ── Result count ── */
.csf-count {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

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

/* ── Card ── */
.csf-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.csf-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.csf-card__thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.csf-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.csf-card:hover .csf-card__thumb img {
    transform: scale(1.04);
}

.csf-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.csf-card__tags {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
	
}

.csf-tag {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.csf-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.csf-card__title a {
    color: #111827;
    text-decoration: none;
}

.csf-card__title a:hover {
    color: #2563eb;
}

.csf-card__excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    flex: 1;
}

.csf-card__excerpt p {
    margin: 0;
}

.csf-card__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 4px;
}

.csf-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    flex: 1;
    white-space: nowrap;
}

.csf-btn--primary {
    background: #2d7a4f;
    color: #fff;
}

.csf-btn--primary:hover {
    background: #235e3d;
    color: #fff;
}

.csf-btn--secondary {
    background: #2d7a4f;
    color: #fff;
}

.csf-btn--secondary:hover {
    background: #235e3d;
    color: #fff;
}

/* ── Loading spinner ── */
.csf-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.csf-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: csf-spin 0.7s linear infinite;
}

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

/* ── No results ── */
.csf-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

/* ── Error ── */
.csf-error {
    color: #dc2626;
    font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .csf-filters {
        flex-direction: column;
        gap: 12px;
    }

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

    .csf-btn-reset {
        width: 100%;
        text-align: center;
    }

    .csf-grid {
        grid-template-columns: 1fr;
    }
}
