﻿/* Container to provide grid layout */
.blog-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 1rem;
    margin: 0 auto;
    align-items: stretch;
}
/* Card body styling */
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    flex-grow: 1;
}
/* Card styling */
.blog-card,
.card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 550px;
    border: none;
    width: 100%;
}

    .blog-card:hover,
    .card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }
    /* Date styling */
    .blog-card .blog-date,
    .card-date,
    .text-muted {
        font-size: 0.875rem;
        color: #999;
        margin-bottom: 0.75rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
/* Title styling */
.card-title,
.fw-bold {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

    .card-title a {
        color: #333;
        text-decoration: none;
    }

        .card-title a:hover {
            text-decoration: underline;
            color: #1B355E;
        }
/* Image styling */
.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 0;
    border-radius: 0;
    flex-shrink: 0;
}
/* Text styling */
.card-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    flex-grow: 1;
    max-height: 6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
/* Button styling */
.btn-read,
.btn-read-news,
.injected-btn {
    background-color: #1B355E !important;
    color: white !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 20px;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    border: none;
    font-size: 0.9rem;
    margin-top: auto;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: auto;
    height: auto;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: nowrap;
}

    .btn-read:hover,
    .btn-read-news:hover,
    .injected-btn:hover {
        background-color: #0f2442 !important;
        color: white !important;
        text-decoration: none;
        transform: translateY(-1px);
    }

/* Bootstrap responsive grid - 4, 2, or 1 columns only */
.row.row-cols-1.row-cols-md-3 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2rem !important;
    justify-content: center !important;
}

    .row.row-cols-1.row-cols-md-3 .col {
        margin-bottom: 2rem;
        display: block !important;
        flex: 0 0 auto !important;
    }

/* Large screens and up: 4 columns */
@media (min-width: 992px) {
    .row.row-cols-1.row-cols-md-3 .col {
        width: calc(25% - 1.5rem) !important;
        max-width: 400px !important;
        min-width: 320px !important;
    }
}

/* Medium screens: 2 columns */
@media (min-width: 768px) and (max-width: 991.98px) {
    .row.row-cols-1.row-cols-md-3 .col {
        width: calc(50% - 1rem) !important;
        max-width: 400px !important;
        min-width: 320px !important;
    }
}

/* Small screens: 1 column */
@media (max-width: 767.98px) {
    .row.row-cols-1.row-cols-md-3 .col {
        width: 100% !important;
        max-width: 500px !important;
        min-width: 280px !important;
    }

    .row.row-cols-1.row-cols-md-3 {
        gap: 1.5rem !important;
    }
}

.col .card-body {
    display: flex !important;
    flex-direction: column !important;
}
