/* Bento Grid Layout */
.bento-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
    padding: 40px 0;
    max-width: 1300px;
    margin: 0 auto;
}

.bento-item {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
}

.bento-item:hover {
    transform: translateY(-8px) scale(1.015);
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4), 0 0 30px rgba(220, 38, 38, 0.15);
}

/* Specific Sizes */
.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.bento-small {
    grid-column: span 1;
    grid-row: span 1;
}

/* Contents styling */
.bento-bg-img {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.45;
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}

.bento-item:hover .bento-bg-img {
    opacity: 0.85;
    transform: scale(1.08);
}

/* Overlay gradient for readability */
.bento-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.5) 60%, rgba(15, 23, 42, 0.15) 100%);
    z-index: 2;
}

.bento-content {
    position: relative;
    z-index: 3;
}

.bento-metric {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 800;
    line-height: 1;
    color: var(--g);
    margin-bottom: 10px;
    letter-spacing: -0.04em;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.35);
}

.bento-metric.red {
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.35);
}

.bento-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    line-height: 1.25;
}

.bento-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bento-tag {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 3;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.bento-item:hover .bento-tag {
    background: var(--ac);
    border-color: var(--ac);
    color: white;
}

/* Floating Action Button style arrow */
.bento-arrow {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    color: #ffffff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translate(-10px, 10px);
    backdrop-filter: blur(8px);
}

.bento-arrow { display: none !important; }
.bento-item:hover .bento-arrow {
    opacity: 1;
    transform: translate(0, 0);
    background: var(--ac);
    border-color: var(--ac);
    color: #ffffff;
}

/* Responsiveness */
@media (max-width: 992px) {
    .bento-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .bento-container {
        grid-template-columns: 1fr;
    }
    .bento-large, .bento-wide, .bento-tall, .bento-small {
        grid-column: span 1;
        grid-row: auto;
        min-height: 320px;
    }
}
