/* ============================================================
   BENTO GRID LAYOUT (Mixed Grid / Masonry Style)
   ============================================================ */

.svc-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Columns for mixed layout */
    grid-auto-rows: minmax(300px, auto);
    /* Minimum height for rows */
    gap: var(--space-4);
    width: 100%;
}

.svc-bento-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: #f0f0f0;
    /* Fallback */
    isolation: isolate;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    min-height: 380px;
    /* Ensure tall enough */
}

/* 
   GRID LOGIC (4 Items): 
   Row 1: [Wide (2)] [Small (1)]
   Row 2: [Small (1)] [Wide (2)]
*/
.svc-bento-item:nth-child(1),
.svc-bento-item:nth-child(4) {
    grid-column: span 2;
}

.svc-bento-item:nth-child(2),
.svc-bento-item:nth-child(3) {
    grid-column: span 1;
}

/* Hover Effect */
.svc-bento-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.svc-bento-item:hover .svc-bento-img {
    transform: scale(1.05);
}

/* Background Image */
.svc-bento-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.svc-bento-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Gradient Overlay */
.svc-bento-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.1) 40%,
            rgba(0, 0, 0, 0.7) 85%,
            rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
}

/* Content Positioning */
.svc-bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-6);
    z-index: 2;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Badge / Label */
.svc-bento-badge {
    display: inline-block;
    padding: 0.35em 0.8em;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    margin-bottom: 0.5rem;
}

/* Typography */
.svc-bento-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.svc-bento-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 1rem;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Limit text lines */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Link */
.svc-bento-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    /* White text */
    opacity: 0.9;
    transition: opacity 0.3s ease, gap 0.3s ease;
}

.svc-bento-item:hover .svc-bento-link {
    opacity: 1;
    gap: 0.75rem;
    /* Arrow moves slightly */
}

/* Full Click Overlay */
.svc-bento-click-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .svc-bento-grid {
        grid-template-columns: 1fr;
        /* Stack vertically */
    }

    .svc-bento-item:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
        min-height: 300px;
    }

    .svc-bento-item:first-child {
        aspect-ratio: 4/3;
        /* Enforce ratio */
    }

    .svc-bento-item {
        min-height: 300px;
    }

    .svc-bento-title {
        font-size: 1.5rem;
    }
}