/* ── Wrapper ──────────────────────────────────────────────────────────────────
   Gap between cards is controlled via padding (not margin).
   padding + box-sizing:border-box keeps the outer size stable — no overflow.
   align-self:stretch makes all wrappers in a row the same height. */

.cbb-card-wrap {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    box-sizing: border-box;
    width: 100%;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */

.cbb-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ── Hover lift ───────────────────────────────────────────────────────────── */

.cbb-hover-lift .cbb-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.cbb-hover-lift:hover .cbb-card {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── Scroll entrance animation (all devices) ─────────────────────────────── */

.cbb-animate-in .cbb-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.cbb-animate-in.cbb-in-view .cbb-card {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger sibling cards in the same row */
.cbb-animate-in:nth-child(2).cbb-in-view .cbb-card { transition-delay: 0.1s; }
.cbb-animate-in:nth-child(3).cbb-in-view .cbb-card { transition-delay: 0.2s; }
.cbb-animate-in:nth-child(4).cbb-in-view .cbb-card { transition-delay: 0.3s; }

/* Combine hover lift + animate-in correctly */
.cbb-animate-in.cbb-hover-lift .cbb-card {
    transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.22s ease;
}

.cbb-animate-in.cbb-hover-lift.cbb-in-view:hover .cbb-card {
    transform: translateY(-4px);
}

/* ── Image ────────────────────────────────────────────────────────────────── */

.cbb-image {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #e5e7eb;
}

.cbb-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Title ────────────────────────────────────────────────────────────────── */

.cbb-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #111111;
}

/* ── Description ──────────────────────────────────────────────────────────── */

.cbb-desc {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #6b7280;
}

/* ── Button ───────────────────────────────────────────────────────────────── */

.cbb-btn-wrap {
    margin-top: auto;
    text-align: left;
}

.cbb-btn {
    display: inline-block;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #4f46e5;
    border-radius: 8px;
    padding: 10px 20px;
    line-height: 1;
    transition: opacity 0.15s ease;
}

.cbb-btn:hover {
    opacity: 0.88;
    color: #ffffff;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .cbb-card-wrap {
        align-self: auto;
        width: 100%;
    }

    .cbb-card {
        flex: none;
    }
}
