/* ============================================================
   Vivid Blog Widget — v1.2.0
   Card layout: LEFT col (title + excerpt + btn) | RIGHT col (image)
   Image spans full height of the card on the right side.
   ============================================================ */

/* ── Outer Grid (card rows) ───────────────────────────────── */
.vbw-grid {
    display: grid;
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
}

/* Desktop columns */
.vbw-cols-1 { grid-template-columns: repeat(1, 1fr); }
.vbw-cols-2 { grid-template-columns: repeat(2, 1fr); }
.vbw-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Card ─────────────────────────────────────────────────── */
.vbw-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;          /* both columns same height   */
    gap: 0;
    padding: 36px 36px;
    background-color: #111111;
    border: 1px solid #1e1e1e;
    border-radius: 16px;
    box-sizing: border-box;
    overflow: hidden;
    transition: border-color 0.3s ease,
                transform    0.3s ease,
                box-shadow   0.3s ease;
}

.vbw-card:hover {
    border-color: #2e2e2e;
    transform: translateY(-3px);
    box-shadow: 0 14px 48px rgba(0, 0, 0, 0.5);
}

/* ── LEFT column — title · excerpt · button ───────────────── */
.vbw-left {
    flex: 0 0 55%;
    max-width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: 32px;
    box-sizing: border-box;
    min-width: 0;
}

/* ── RIGHT column — image ─────────────────────────────────── */
.vbw-right {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: stretch;
    margin: -36px -36px -36px 0; /* bleed to card edges on right/top/bottom */
}

/* ── Image wrapper ─────────────────────────────────────────── */
.vbw-img-wrap {
    width: 100%;
    height: 100%;
    min-height: 220px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.vbw-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.vbw-card:hover .vbw-img-wrap img {
    transform: scale(1.06);
}

/* ── Title ─────────────────────────────────────────────────── */
.vbw-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.vbw-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.vbw-title a:hover {
    color: #cccccc;
    text-decoration: none;
}

/* ── Excerpt ───────────────────────────────────────────────── */
.vbw-excerpt {
    font-size: 14px;
    font-weight: 400;
    color: #888888;
    line-height: 1.65;
    margin: 0 0 20px;
    flex-grow: 1;               /* pushes button to bottom      */
}

/* ── Button — gradient border via wrapper technique ───────── */
/*
   .vbw-btn   = gradient background (the visible border ring)
   .vbw-btn-inner = dark fill that sits inside, giving border illusion
*/
.vbw-btn {
    display: inline-flex;
    align-items: center;
    padding: 1.5px;                /* = border thickness           */
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #F1C818 0%,
        #F16B3E 25.96%,
        #DF15A9 50.48%,
        #9B2EA4 73.08%,
        #1AA4D8 100%
    );
    text-decoration: none !important;
    cursor: pointer;
    border: none;
    outline: none;
    width: fit-content;
    align-self: flex-start;        /* don't stretch to full width  */
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.vbw-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.vbw-btn-inner {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: 999px;
    background-color: #111111;     /* must match card bg           */
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: background-color 0.25s ease;
}

.vbw-btn:hover .vbw-btn-inner {
    background-color: #1c1c1c;
}

.vbw-btn-inner svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.vbw-btn:hover .vbw-btn-inner svg {
    transform: translate(2px, -2px);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════════ */

/* ── Tablet: ≤ 1024px ─────────────────────────────────────── */
@media (max-width: 1024px) {

    /* Force tablet column from Elementor class */
    .vbw-cols-t-2 { grid-template-columns: repeat(2, 1fr); }
    .vbw-cols-t-1 { grid-template-columns: repeat(1, 1fr); }

    .vbw-cols-3 { grid-template-columns: repeat(2, 1fr); }

    .vbw-left {
        flex: 0 0 55%;
        max-width: 55%;
        padding-right: 24px;
    }

    .vbw-img-wrap {
        min-height: 200px;
    }

    .vbw-title {
        font-size: 18px;
    }
}

/* ── Small tablet / large mobile: ≤ 768px ────────────────── */
@media (max-width: 768px) {

    .vbw-cols-2,
    .vbw-cols-3,
    .vbw-cols-t-2 {
        grid-template-columns: repeat(1, 1fr);
    }

    /* Card switches to column layout — image goes below content */
    .vbw-card {
        flex-direction: column;
        padding: 28px 24px;
    }

    .vbw-left {
        flex: none;
        max-width: 100%;
        padding-right: 0;
    }

    .vbw-right {
        width: 100%;
        margin: 16px 0 0 0;
    }

    .vbw-img-wrap {
        width: 100%;
        height: 220px;
    }

    .vbw-title {
        font-size: 18px;
    }
}

/* ── Mobile: ≤ 480px ─────────────────────────────────────── */
@media (max-width: 480px) {

    .vbw-card {
        padding: 22px 18px;
    }

    .vbw-title {
        font-size: 16px;
    }

    .vbw-excerpt {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .vbw-img-wrap {
        height: 180px;
    }

    .vbw-btn-inner {
        font-size: 12px;
        padding: 8px 16px;
    }
}
