/* Wrapper Flex Layout */
.opc-post-grid-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Left Column - Filters */
.opc-post-grid .opc-filter-column {
    box-sizing: border-box;
}

/* Right Column - Post Grid */
.opc-post-grid .opc-grid-column {
    box-sizing: border-box;
}

.opc-post-grid {
    align-items: flex-start !important; /* KEY FIX */
}

/* Make filter background wrap only its content */
.opc-filter-column {
    align-self: flex-start;  /* stops height matching grid */
    height: auto !important;
}

/* Post Grid Items */
.opc-post-grid .opc-posts-wrapper {
    display: grid;
    /*grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));*/
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Individual Post Item */
.opc-post-grid .opc-post-item {
    border: 1px solid #e0e0e0;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.opc-post-grid .opc-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Featured Image */
.opc-post-grid .opc-post-item img {
    width: 100%;
    height: 250px !important;      /* change if you want taller/shorter */
    object-fit: cover !important;  /* crops nicely instead of stretching */
    display: block;
    margin-bottom: 10px;
    border-radius: 4px;
}

/* Load More Button */
.opc-post-grid .opc-load-more {
    margin: 20px auto 20px;
    display: block;
    padding: 16px 23px;
    background: #c0da00;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 19px;
    font-size: 15px;
    transition: background 0.3s;
}

.opc-post-grid .opc-load-more:hover {
    background: #005177;
}

/* Filters Styling */
.opc-post-grid .opc-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opc-taxonomy-filter {
    padding-top: 11px;
    line-height: 26px;
}

.opc-post-grid .opc-taxonomy-filter label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.opc-post-grid .opc-reset-filter {
    padding: 12px 18px;
    border: none;
    background: #c0da00;
    color: #fff;
    cursor: pointer;
    border-radius: 15px;
    font-size: 14px;

}

/* Responsive */
@media (max-width: 768px) {
    .opc-post-grid-wrapper {
        flex-direction: column;
    }
    .opc-post-grid .opc-filter-column,
    .opc-post-grid .opc-grid-column {
        flex: 0 0 100% !important;
    }
}

.opc-filter-column {
    background: #fafafa;
    padding: 20px;
}
h4.brand-primary-tx {
    margin-top: 0;
}


/* ============================= */
/* ======= RESPONSIVE ========= */
/* ============================= */

/* TABLET */
@media (max-width: 1024px) {
    .opc-posts-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* MOBILE */
@media (max-width: 768px) {

    .opc-post-grid {
        flex-direction: column !important;
    }

    .opc-filter-column,
    .opc-grid-column {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    .opc-posts-wrapper {
        grid-template-columns: 1fr !important;  /* <-- THIS IS THE KEY FIX */
    }
}

/* SMALL MOBILE */
@media (max-width: 480px) {
    .opc-posts-wrapper {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

/* Hide toggle button on desktop */
.opc-toggle-filter {
    display: none;
}

/* MOBILE */
@media (max-width: 768px) {

    .opc-toggle-filter {
        display: block;
        width: 100%;
        padding: 10px;
        margin-bottom: 10px;
        background: #000;
        color: #fff;
        border: none;
        text-align: center;
        cursor: pointer;
    }

    /* Hide filters by default on mobile */
    .opc-filter-column {
        display: none;
        margin-bottom: 15px;
    }

    /* When active, show filter */
    .opc-filter-column.active {
        display: block;
    }
}

.elementor-widget-container p a {
    color: #c0da00;
    text-decoration: underline;
}
.elementor-widget-container p{
    font-size: 16px;
    line-height: 26px;
}