/* Container Layout */
.bfj-news-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Sorting elements */
.bfj-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 15px;
    margin-bottom: 30px;
}
.bfj-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}
.bfj-sort-wrapper label {
    font-weight: 600;
    font-size: 0.9rem;
}
.bfj-sort-wrapper select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 3-Column Visual Grid Style matching the UI */
.bfj-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch; /* Forces all columns/cards in a row to match the tallest item's height */
}

@media (max-width: 992px) {
    .bfj-news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .bfj-news-grid { grid-template-columns: 1fr; }
    .bfj-news-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Card Styling Components */
.bfj-news-card {
    background: #fff;
    display: flex;
    flex-direction: column; /* Allows nested elements to use flex space distribution */
    height: 100%; /* Ensures card stretches to the grid cell boundary */
    box-sizing: border-box;
}
.bfj-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Fixed 16:9 Aspect Ratio */
    overflow: hidden;
    margin-bottom: 12px;
}
.bfj-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.bfj-news-card:hover .bfj-card-image {
    transform: scale(1.03);
}

/* Internal Card Layout Body */
.bfj-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Instructs the body content to take up all remaining card space */
}

/* Metadata Configuration Styles */
.bfj-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 8px;
}
.bfj-card-category {
    font-weight: 600;
    text-transform: capitalize;
}
.bfj-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px 0;
}
.bfj-card-title a {
    color: #000;
    text-decoration: none;
}
.bfj-card-title a:hover {
    text-decoration: underline;
}
.bfj-card-excerpt {
    font-size: 0.92rem;
    color: #444;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

/* Crimson Red Action Link - Forced to the absolute bottom */
.bfj-card-readmore {
    display: inline-flex;
    align-items: center;
    color: #cc0000; 
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    margin-top: auto; /* Pushes the 'Read more' link straight down to flush align evenly */
    padding-top: 10px;
}
.bfj-card-readmore:hover {
    text-decoration: underline;
}
.bfj-icon {
    margin-right: 6px;
    font-size: 0.95rem;
}

/* Load More Elements Control */
.bfj-load-more-container {
    text-align: center;
    margin-top: 40px;
}
.bfj-load-more-button {
    background: #000;
    color: #fff;
    border: none;
    padding: 12px 35px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.bfj-load-more-button:hover {
    background: #cc0000;
}
.bfj-loader {
    font-size: 1rem;
    color: #666;
    font-weight: 600;
}