/*
 Theme Name: Astra Child
 Template: astra
*/

/* =========================================
   BDS Blog Grid - Astra Style
   ========================================= */

/* 1. The Container & Variables */
#bds-container {
    --bds-primary: var(--ast-global-color-0, #0274be); /* Astra Primary or Blue */
    --bds-text: var(--ast-global-color-3, #3a3a3a);    /* Astra Text or Dark Grey */
    --bds-bg-card: #ffffff;
    --bds-border: #e2e8f0;
    --bds-radius: 6px;
    --bds-transition: all 0.3s ease;
    
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 2. Filter Buttons (Pill Style) */
.bds-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.bds-btn {
    background: transparent;
    border: 1px solid var(--bds-border);
    padding: 8px 24px;
    border-radius: 50px; /* Pill shape */
    color: var(--bds-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--bds-transition);
    font-family: inherit; /* Inherit Astra font */
}

.bds-btn:hover {
    border-color: var(--bds-primary);
    color: var(--bds-primary);
}

.bds-btn.active {
    background: var(--bds-primary);
    border-color: var(--bds-primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 3. The Grid System */
.bds-grid-layout {
    display: grid;
    /* Smart responsive grid: auto-fits cards based on min-width */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 30px;
    width: 100%;
}

/* 4. The Card (Astra Card Style) */
.bds-post-card {
    background: var(--bds-bg-card);
    border: 1px solid var(--bds-border);
    border-radius: var(--bds-radius);
    overflow: hidden;
    position: relative;
    transition: var(--bds-transition);
    display: flex;
    flex-direction: column;
}

.bds-post-card:hover {
    transform: translateY(-5px); /* Lift effect */
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: transparent;
}

/* 5. Card Image & Badge */
.bds-post-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9; /* Forces images to be uniform size */
}

.bds-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents stretching */
    transition: transform 0.5s ease;
}

.bds-post-card:hover .bds-post-thumb img {
    transform: scale(1.05); /* Subtle zoom on hover */
}

.bds-cat-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--bds-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

/* 6. Card Content */
.bds-post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.bds-post-content h4 {
    margin: 0 0 15px;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 600;
}

.bds-post-content h4 a {
    color: var(--bds-text);
    text-decoration: none;
    transition: color 0.2s;
}

.bds-post-content h4 a:hover {
    color: var(--bds-primary);
}

.bds-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes content down if needed */
}

/* 7. Pagination */
#bds-pagination {
    margin-top: 50px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

#bds-pagination button {
    background: #fff;
    border: 1px solid var(--bds-border);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: var(--bds-text);
    transition: var(--bds-transition);
}

#bds-pagination button:hover:not(:disabled) {
    border-color: var(--bds-primary);
    color: var(--bds-primary);
}

#bds-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

#bds-page-counter {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

/* 8. Loader Animation (Optional Polish) */
#bds-results {
    transition: opacity 0.3s ease-in-out;
}