/* Basic Styling for the plugin */
.bpdg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filter Bar Styling */
.bpdg-filters {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 20px;
}

.bpdg-search {
    width: 40%;
    flex: 0 0 40%;
}

.bpdg-search input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    color: #333;
}

.bpdg-sort-options {
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex: 1;
    width: auto;
}

.bpdg-custom-select {
    flex: 1;
    min-width: 0;
    /* Prevents overflow */
    position: relative;
    font-family: 'Inter', sans-serif;
}

/* Grid Layout */
.bpdg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Individual Card Styling */
/* Individual Card Styling */
.bpdg-card {
    background-color: #ffffff !important;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    /* Soft premium shadow */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    border: 1px solid #f0f0f0;
    /* Ensure visibility against white backgrounds */
    color: #444;
    /* Default text color */
}

.bpdg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bpdg-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin: 15px;
    border-radius: 15px;
    /* Fully rounded image inside the card */
}

.bpdg-card-content {
    padding: 0 20px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.bpdg-card-title {
    font-family: 'Inter', sans-serif;
    /* Use modern font */
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e !important;
    /* Force color against theme link styles */
    /* Dark Blue */
    margin: 10px 0 5px 0;
    line-height: 1.4;
}

.bpdg-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    width: 100%;
    /* Ensure full width */
}

.bpdg-read-more {
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 2px;
}

.bpdg-read-more::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #1a1a2e;
    transition: width 0.3s;
}

.bpdg-read-more:hover::after {
    width: 100%;
}

.bpdg-card-meta {
    font-size: 0.85rem;
    color: #4a4a68 !important;
    /* Greyish Blue */
    margin-bottom: 10px;
    font-weight: 500;
}

.bpdg-card-excerpt {
    font-size: 0.95rem;
    color: #6c757d !important;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Pushes footer to bottom */
}

.bpdg-category-badge {
    background-color: #e6f0ff;
    /* Light Blue background */
    color: #0056b3;
    /* Dark Blue text */
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    /* Force to right */
}

/* Loading State */
.bpdg-loading {
    text-align: center;
    width: 100%;
    color: #666;
    font-size: 1.2em;
}

/* Responsive adjustments */
@media (max-width: 991px) {

    /* Tablet and Mobile Stacked */
    .bpdg-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .bpdg-search,
    .bpdg-search input {
        width: 100%;
        max-width: 100%;
    }

    .bpdg-sort-options {
        width: 100%;
        justify-content: space-between;
        flex-direction: column;
        gap: 15px;
    }

    .bpdg-custom-select {
        width: 100%;
        flex: auto;
        /* Reset flex */
    }
}

/* Pagination */
.bpdg-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 8px;
    flex-wrap: wrap;
}

.bpdg-page-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    transition: all 0.3s ease;
}

.bpdg-page-btn:hover {
    background: #f0f0f0;
    color: #000;
}

.bpdg-page-btn.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

/* Dynamic Variants */

/* Hover Effects on Card */
.bpdg-hover-lift .bpdg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.bpdg-hover-zoom .bpdg-card:hover .bpdg-card-image {
    transform: scale(1.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.bpdg-hover-zoom .bpdg-card-image {
    overflow: hidden;
    background-size: cover;
    transition: box-shadow 0.3s ease;
}

.bpdg-hover-none .bpdg-card:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Button Styles */
.bpdg-btn-style-box .bpdg-read-more {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

.bpdg-btn-style-box .bpdg-read-more::after {
    display: none;
}

.bpdg-btn-style-text .bpdg-read-more {
    /* Default text style logic already exists, just ensuring no background */
    background: transparent;
    padding: 0;
}

.bpdg-btn-style-box .bpdg-read-more {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
}

.bpdg-btn-style-box .bpdg-read-more::after {
    display: none;
}

/* Custom Dropdown Styling */
.bpdg-custom-select {
    position: relative;
    /* Width controlled by flex parent */
}

.bpdg-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
    color: #333;
}

.bpdg-select-trigger:hover {
    border-color: #bbb;
}

.bpdg-arrow {
    width: 0;
    height: 0;
    border: solid #666;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    margin-bottom: 2px;
    transition: transform 0.3s;
}

.bpdg-custom-select.open .bpdg-arrow {
    transform: rotate(-135deg);
    margin-bottom: -2px;
}

.bpdg-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    z-index: 100;
    display: none;
    overflow: hidden;
}

.bpdg-custom-select.open .bpdg-select-dropdown {
    display: block;
}

.bpdg-select-search {
    padding: 10px;
    border-bottom: 1px dashed #eee;
}

.bpdg-select-search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #0056b3;
    border-radius: 4px;
    border-style: dotted;
    /* Matches image style */
}

.bpdg-options-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}

.bpdg-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
    color: #444;
}

.bpdg-option:hover {
    background: #f5f9ff;
    color: #0056b3;
}

.bpdg-option.selected {
    background: #e6f0ff;
    color: #0056b3;
    font-weight: 600;
}

/* Scrollbar styling */
.bpdg-options-list::-webkit-scrollbar {
    width: 6px;
}

.bpdg-options-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.bpdg-options-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.bpdg-options-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Ensure inputs inside dropdowns are styled properly */
.bpdg-select-search input {
    outline: none;
    box-shadow: none;
    width: 100%;
    border: 1px dotted #0056b3;
    border-radius: 4px;
    padding: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

/* Trigger text styling */
.bpdg-selected-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.bpdg-custom-select {
    z-index: 10;
    cursor: pointer;
}

.bpdg-custom-select.open {
    z-index: 20;
}