/* Container & Layout */
.apf-833-container {
    display: flex;
    flex-direction: column;
    /* gap is now managed dynamically via Elementor controls */
    font-family: 'Oswald', sans-serif; /* Matching user globals */
}

/* Filters Row */
.apf-833-filters-row {
    display: flex;
    /* gap is managed via controls */
    flex-wrap: wrap;
}

/* Dropdown Wrapper */
.apf-833-dropdown-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

/* Dropdown Toggle Button */
.apf-833-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #EAEAEA; /* User global color */
    padding: 15px 20px;
    cursor: pointer;
    border: 1px solid #E0E0E0;
    transition: background-color 0.3s ease;
}

.apf-833-dropdown-toggle:hover {
    background-color: #E0E0E0;
}

.apf-833-dropdown-label {
    font-weight: 700;
    font-size: 16px;
    color: #000;
    letter-spacing: 1px;
}

.apf-833-dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.apf-833-dropdown-icon i {
    font-size: 14px;
    color: #999;
}
.apf-833-dropdown-icon svg {
    width: 14px;
    height: 14px;
    fill: #999;
}

.apf-833-dropdown-wrapper.is-open .apf-833-dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.apf-833-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #E0E0E0;
    border-top: none;
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.apf-833-dropdown-item {
    display: block;
    padding: 12px 20px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif; /* Matching user text global */
    font-size: 14px;
    color: #000;
    transition: background-color 0.2s ease;
}

.apf-833-dropdown-item:hover {
    background-color: #F5F5F5;
}

.apf-833-dropdown-item input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #C3212B; /* User secondary color */
}

/* Posts Grid */
.apf-833-posts-grid {
    display: grid;
    /* grid-template-columns & gap injected by Elementor responsive controls */
    transition: opacity 0.3s ease;
}

.apf-833-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Individual Post Card */
.apf-833-post {
    display: flex;
    flex-direction: column;
}

.apf-833-post-thumbnail {
    /* margin-bottom is now managed dynamically via Elementor controls */
    overflow: hidden;
    position: relative; /* Added for overlay */
    aspect-ratio: 16 / 9; /* Enforce 16:9 ratio */
}

.apf-833-post-thumbnail a {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

.apf-833-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the entire space */
    display: block;
    transition: transform 0.3s ease;
}

/* Hover Overlay */
.apf-833-post-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 1;
}

.apf-833-post:hover .apf-833-post-thumbnail-overlay {
    opacity: 1;
}

.apf-833-post:hover .apf-833-post-thumbnail img {
    transform: scale(1.03);
}

.apf-833-post-content {
    /* Padding is mostly handled by gap now */
}

.apf-833-post-title {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    text-transform: uppercase;
}

.apf-833-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.apf-833-post-title a:hover {
    color: #C3212B;
}

.apf-833-post-excerpt {
    display: none; /* Hide excerpt to match screenshot design */
}

.apf-833-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-family: 'Poppins', sans-serif;
}

/* Pagination */
.apf-833-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    transition: opacity 0.3s ease;
}

.apf-833-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

.apf-833-pagination li {
    display: inline-block;
}

.apf-833-pagination a,
.apf-833-pagination span {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: #000;
    background-color: #F5F5F5;
    border: 1px solid #E0E0E0;
    transition: all 0.3s ease;
    font-family: 'Oswald', sans-serif;
}

.apf-833-pagination a:hover {
    background-color: #EAEAEA;
}

.apf-833-pagination span.current {
    background-color: #000;
    color: #fff;
    border-color: #000;
}