/* ============================================
   BV Blog Grid Widget
   Version: 1.0.0
   ============================================ */

/* ── Sections Container ── */
.bv-bg-sections {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5em;
    width: 100%;
}

/* ── Section ── */
.bv-bg-section {
    max-width: 70%;
    scroll-margin-top: 80px;
    width: 100%;
}

/* ── Section Heading ── */
.bv-bg-heading {
    font-family: 'Rethink Sans', sans-serif;
    font-size: 30px;
    font-weight: 600;
    color: var(--ctm-text, #000000);
    margin: 0 0 20px;
}

/* ── Card Grid ── */
.bv-bg-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 1.7em;
    row-gap: 3em;
    align-items: stretch;
    width: 100%;
}

/* ── Card ── */
.bv-bg-card {
    display: grid;
    grid-template-rows: 12em 1fr auto;
    background: var(--ctm-home-tile-bg, #ffffff);
    border-radius: 35px;
    box-shadow: 0 4px 25px rgba(0, 1, 1, 0.1);
    overflow: hidden;
    transition: transform 300ms ease, box-shadow 300ms ease;
}

.bv-bg-card:hover {
    transform: translateY(-2px);
}

/* ── Card Image ── */
.bv-bg-card-image-link {
    display: block;
    overflow: hidden;
    border-radius: 35px 35px 0 0;
}

.bv-bg-card-image {
    height: 12em;
    background-size: cover;
    background-position: center;
    background-color: var(--ctm-image-bg, #e0e8ef);
    border-radius: 35px 35px 0 0;
    transition: filter 300ms ease;
}

.bv-bg-card:hover .bv-bg-card-image {
    filter: brightness(60%);
}

/* ── Card Content ── */
.bv-bg-card-content {
    padding: 0 1em;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Card Title ── */
.bv-bg-card-title-link {
    color: var(--ctm-link, #1a3a4a);
    text-decoration: none;
    display: block;
}

.bv-bg-card-title-link:hover {
    color: var(--ctm-link-hover, #0e6fa8);
    text-decoration: none;
}

.bv-bg-card-title {
    font-family: 'Rethink Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 0.6em 0 0;
}

/* ── Card Excerpt ── */
.bv-bg-card-excerpt {
    font-family: 'Rethink Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--ctm-card-text, #7a7a7a);
    text-align: left;
    margin: 0;
    line-height: 1.5;
}

/* ── Card Footer ── */
.bv-bg-card-footer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 1em 1.5em;
}

/* ── Card Button ── */
.bv-bg-card-btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--ctm-card-btn-bg, #0b2a3a);
    color: var(--ctm-card-btn-text, #ffffff);
    text-decoration: none;
    border-radius: 35px;
    font-family: 'Rethink Sans', sans-serif;
    font-size: 1em;
    font-weight: 500;
    transform: translateY(-5px);
    transition: background 300ms ease, color 300ms ease, transform 300ms ease;
}

.bv-bg-card-btn:hover {
    background: var(--ctm-card-btn-bg-hover, #143d52);
    color: var(--ctm-card-btn-text-hover, #ffffff);
    transform: translateY(-4px);
    text-decoration: none;
}

/* ── Empty State ── */
.bv-bg-empty {
    color: #7a7a7a;
    font-style: italic;
    padding: 20px 0;
}

/* ── Tablet (max 1024px) ── */
@media (max-width: 1024px) {
    .bv-bg-section {
        max-width: 90%;
    }

    .bv-bg-grid {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 1.4em;
        row-gap: 2.5em;
    }
}

/* ── Mobile (max 767px) ── */
@media (max-width: 767px) {
    .bv-bg-section {
        max-width: 100%;
    }

    .bv-bg-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1.2em;
        row-gap: 2em;
    }

    .bv-bg-heading {
        font-size: 24px;
    }
}

/* ── Small Mobile (max 480px) ── */
@media (max-width: 480px) {
    .bv-bg-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 1em;
        row-gap: 1.5em;
    }

    .bv-bg-card-title {
        font-size: 17px;
    }

    .bv-bg-card-btn {
        padding: 12px 20px;
        font-size: 0.9em;
    }
}
