/* Wrapper adds spacing around the whole block */
.wp-pfg-wrapper {
    margin: 2rem 0;
    font-family: inherit; /* Inherit theme font */
}

/* Filter button row */
.wp-pfg-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Individual filter buttons */
.wp-pfg-filter-button {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* Active filter button state */
.wp-pfg-filter-button.is-active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Grid container: responsive cards */
.wp-pfg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 600px) {
	.wp-pfg-grid {
		grid-template-columns: repeat(auto-fit, minmax(100px, 45%));
	}
}

/* Card styles */
.wp-pfg-card {
	max-width: 350px;
    background: #fff;
    border-radius: 10px;
    border: 0;
    overflow: hidden;
    box-shadow: 4px 2px 13px -7px #888;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	margin-left: auto;
	margin-right: auto;
}

/* Card becomes slightly elevated on hover */
.wp-pfg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Make the whole card clickable */
.wp-pfg-card-inner {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Featured image area */
.wp-pfg-card-image img {
    width: 100%;
    display: block;
    object-fit: cover;
}

/* Card content */
.wp-pfg-card-content {
    padding: 1rem 1.1rem 1.1rem;
}

/* Title styling */
.wp-pfg-card-title {
    font-size: 20px !important;
    font-family: "Mulish" !important;
    margin: 0 0 0.5rem;
}

/* Excerpt styling */
.wp-pfg-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 0.75rem;
    display: none;
}

/* Read more link styling */
.wp-pfg-card-readmore {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #f04;
}

/* Hidden state for filtered-out cards */
.wp-pfg-card.is-hidden, .wp-pfg-card.search-hidden {
    opacity: 0;
    pointer-events: none;
    /* Optional: remove from layout visually but keep for screen readers if needed.
       If you want them not to take up space at all, you can set display: none here instead. */
    display: none !important;
}

/* Dropdown filter controls */
.wp-pfg-filter-dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wp-pfg-filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wp-pfg-filter-select {
    min-width: 160px;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.9rem;
}

.wp-pfg-no-results {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.7;
}

.wp-pfg-dropdown-block { 
    padding: 12px; 
    background: #f9f9f9; 
    border: 1px solid #ddd; 
    margin-bottom: 16px; 
}
.wp-pfg-terms-box { 
    max-height: 200px; 
    overflow-y: auto; 
    border: 1px solid #ddd; 
    padding: 8px; 
    background: #fff; 
}

.wp-pfg-sort-select {
    min-width: 160px;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.9rem;
}

.wp-pfg-search-wrapper input.wp-pfg-search-input {
    min-width: 200px;
    padding: 4px 8px;
}

.wp-pfg-clear-filters.button {
    min-width: 160px;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.9rem;
	border-radius: 999px;
	background-color: #fff;
	font-family:'Mulish';
	max-height: 66%;
	align-self: flex-end;
}

.wp-pfg-clear-filters.button:hover {
	color: #f04;
}

/* Toggle button hidden on desktop */
.wp-pfg-filters-toggle {
    display: none;
}

/* Optional badge styling (feel free to tweak) */
.wp-pfg-filters-count {
    margin-left: 6px;
    font-weight: 600;
}

/* Mobile behavior */
@media (max-width: 768px) {

    .wp-pfg-filters-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 10px;
        padding: 8px 12px;
        cursor: pointer;
    }

    /* Collapsed by default with animation */
    .wp-pfg-wrapper .wp-pfg-filters {
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: max-height 250ms ease, opacity 200ms ease;
        pointer-events: none; /* prevents clicking hidden fields */
    }

    /* Expanded state */
    .wp-pfg-wrapper.wp-pfg-filters-open .wp-pfg-filters {
        max-height: 1200px; /* large enough to fit lots of controls */
        opacity: 1;
        pointer-events: auto;
    }
}
