/* Work Section Styles */
.bsb-work-section {
    position: relative;
    width: 100vw;
    background-color: var(--bsb-color-bg);
    overflow: hidden;
    padding: 0;
    margin: 0;
}

.bsb-work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 0;
    /* Ensures seamless connection between items */
}

.bsb-work-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--bsb-color-bg);
    aspect-ratio: 1 / 1;
    /* Precise square ratio */
}

.bsb-work-bg {
    position: absolute;
    top: -1px;
    /* Slight overlap to prevent sub-pixel gaps (the "dark strip") */
    left: -1px;
    right: -1px;
    bottom: -1px;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.02);
    /* Slight scale to ensure no edges show */
    z-index: 1;
}

/* Hover Effect: Zoom Background */
.bsb-work-item:hover .bsb-work-bg {
    transform: scale(1.1);
}

.bsb-work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darker overlay for contrast in light theme */
    z-index: 2;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center horizontally */
    justify-content: flex-end;
    /* Align to bottom, NOT center vertically */
    transition: background 0.6s ease;
    padding-bottom: 5rem;
    /* Precise bottom spacing */
}

.bsb-work-item:hover .bsb-work-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.bsb-work-content {
    position: relative;
    z-index: 3;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align both text and arrow */
    justify-content: flex-end;
    text-align: left;
    max-width: 280px;
}

.bsb-work-arrow {
    width: 48px;
    height: 48px;
    color: #ffffff;
    /* Explicit white color as requested */
    margin-bottom: 1.5rem;
    opacity: 1;
    /* Visible by default */
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.bsb-work-title {
    font-family: var(--bsb-font-display);
    font-size: clamp(1.2rem, 1.8vw, 1.8rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover State Animations */
.bsb-work-item:hover .bsb-work-arrow {
    color: var(--bsb-color-menu);
    transform: translate(5px, -5px) scale(1.1);
    /* Diagonal hover animation */
    opacity: 1;
}

.bsb-work-item:hover .bsb-work-title {
    color: var(--bsb-color-menu);
    transform: translateY(-5px);
}

/* Entrance Animations classes for GSAP */
.bsb-work-item {
    opacity: 0;
    transform: translateY(50px);
}

/* Responsiveness */
@media (max-width: 1024px) {
    .bsb-work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bsb-work-grid {
        grid-template-columns: 1fr;
    }

    .bsb-work-overlay {
        padding: 2rem;
    }
}