/* ==========================================================================
   NxGen Addons — Bento Canvas
   ========================================================================== */

.bc {
    position: relative;
    border-radius: 16px;
}

/* ---------- Grid ---------- */
.bc__grid {
    display: grid;
    gap: 16px;
    grid-auto-rows: 1fr;
    grid-auto-flow: dense;
}

/* ---------- Box ---------- */
.bc__box {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 24px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
}

.bc__box--has-bg-img {
    background-repeat: no-repeat;
}

/* ---------- Overlay ---------- */
.bc__box-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

/* ---------- Content ---------- */
.bc__box-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1 1 auto;
    gap: 8px;
}

.bc__box-content--horizontal {
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.bc__box-content--horizontal .bc__text-zone {
    flex: 1 1 0%;
    min-width: 0;
}

.bc__box-content--img-right {
    flex-direction: row;
}

.bc__box-content--img-left {
    flex-direction: row-reverse;
}

/* ---------- Text Zone ---------- */
.bc__text-zone {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- Heading ---------- */
.bc__heading {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: #1e293b;
    margin: 0;
}

.bc__heading-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bc__heading-row .bc__heading {
    flex: 1 1 auto;
}

/* ---------- Description ---------- */
.bc__desc {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
}

/* ---------- Icon ---------- */
.bc__icon {
    display: inline-flex;
    font-size: 28px;
    line-height: 1;
}

.bc__icon svg {
    width: 1em;
    height: 1em;
}

.bc__icon--above {
    margin-bottom: 4px;
}

.bc__icon--inline {
    flex-shrink: 0;
}

.bc__icon--top-left,
.bc__icon--top-right,
.bc__icon--bottom-left,
.bc__icon--bottom-right {
    position: absolute;
    z-index: 2;
}

.bc__icon--top-left     { top: 20px; left: 20px; }
.bc__icon--top-right    { top: 20px; right: 20px; }
.bc__icon--bottom-left  { bottom: 20px; left: 20px; }
.bc__icon--bottom-right { bottom: 20px; right: 20px; }

/* ---------- CTA Button ---------- */
.bc__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    line-height: 1.4;
    border: none;
    background: #1e293b;
    color: #ffffff;
    align-self: flex-start;
    margin-top: 4px;
}

.elementor-widget-nxgen_bento_canvas .bc__cta {
    color: #ffffff !important;
    text-decoration: none !important;
}

.bc__cta:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.elementor-widget-nxgen_bento_canvas .bc__cta:hover {
    text-decoration: none !important;
}

.bc__cta-icon {
    display: inline-flex;
    font-size: 0.875em;
    color: inherit;
}

/* ---------- Secondary Image ---------- */
.bc__sec-img {
    display: flex;
    line-height: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.bc__sec-img img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.bc__sec-img--above {
    margin-bottom: 4px;
    max-width: 100%;
}

.bc__sec-img--below {
    margin-top: 4px;
    max-width: 100%;
}

.bc__sec-img--left,
.bc__sec-img--right {
    max-width: 40%;
    align-self: stretch;
}

.bc__sec-img--left img,
.bc__sec-img--right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bc__sec-img--overlay {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 2;
    max-width: 45%;
}

.bc__sec-img--overlay img {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

/* ---------- Text Background Wrapper ---------- */
.bc__text-bg {
    position: relative;
    z-index: 1;
    border-radius: 8px;
}

/* ---------- Image Behind (Overlay Text) ---------- */
.bc__box--img-behind {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bc__box--img-behind .bc__box-content {
    position: relative;
    z-index: 2;
}

.bc__box--img-behind .bc__box-overlay {
    z-index: 1;
}

/* ---------- Dark box text override ---------- */
.bc__box--has-bg-img .bc__heading,
.bc__box--has-bg-img .bc__desc,
.bc__box--dark .bc__heading,
.bc__box--dark .bc__desc {
    color: #ffffff;
}

.bc__box--dark .bc__icon {
    color: rgba(255,255,255,0.85);
    fill: rgba(255,255,255,0.85);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .bc__grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: auto !important;
        height: auto !important;
    }
    .bc__box {
        grid-column: span 1 !important;
    }
    .bc__box[data-span="2"],
    .bc__box[data-span="3"] {
        min-height: 200px;
    }
    .bc__box[data-span="4"],
    .bc__box[data-span="6"] {
        min-height: 260px;
    }
}

@media (max-width: 767px) {
    .bc__grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto !important;
        height: auto !important;
    }
    .bc__box {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        min-height: 160px;
    }
    .bc__box[data-span="2"] {
        min-height: 220px;
    }
    .bc__box[data-span="3"] {
        min-height: 280px;
    }
    .bc__box[data-span="4"],
    .bc__box[data-span="6"] {
        min-height: 340px;
    }
    .bc__box-content--horizontal {
        flex-direction: column;
    }
    .bc__sec-img--left,
    .bc__sec-img--right {
        max-width: 100%;
    }
}


/* ==========================================================================
   INTERACTION STATES — focus / active
   ========================================================================== */
.bc__cta:focus,
.elementor-widget-nxgen_bento_canvas .bc__cta:focus {
    outline: none;
}

.bc__cta:active {
    outline: none;
}

.bc__cta:focus-visible,
.elementor-widget-nxgen_bento_canvas .bc__cta:focus-visible {
    outline: none;
    box-shadow: var(--mx-focus);
}
