/* Bento Gallery */
.bento-gallery {
    background-color: var(--color-blue);
    padding: 74px 0 60px;
    overflow: hidden;
}

.bento-gallery__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bento-gallery__header {
    text-align: center;
    max-width: var(--narrow-max);
    margin-bottom: var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.bento-gallery__headline {
    font-size: var(--fs-5xl);
    font-weight: var(--fw-semibold);
    color: var(--color-white);
}

/* Orange underline on "Work" */
.bento-gallery__underline {
    position: relative;
    display: inline-block;
}

.bento-gallery__underline::after {
    content: '';
    position: absolute;
    left: -5%;
    bottom: -4px;
    width: 110%;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg width='133' height='16' viewBox='0 0 132.5 15.7858' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 15.7858C36 0.786055 82-5.71382 132.5 6.08853C105 3.28618 50 6.78584 0 15.7858Z' fill='%23F58433'/%3E%3C/svg%3E") no-repeat center / contain;
}

.bento-gallery__subtitle {
    font-size: var(--fs-md);
    color: var(--color-white);
}

/* 3-column flex layout */
.bento-gallery__grid {
    display: flex;
    gap: 11px;
    max-width: 1198px;
    width: 100%;
    padding: 18px 11px;
    align-items: stretch;
}

/* Columns */
.bento-gallery__col {
    display: flex;
    flex-direction: column;
    gap: 11px;
    position: relative;
    min-height: 0;
}

.bento-gallery__col--left {
    flex: 0 0 50%;
    max-width: 50%;
}

.bento-gallery__col--mid,
.bento-gallery__col--right {
    flex: 0 0 calc(25% - 8px);
    max-width: calc(25% - 8px);
}

/* Items */
.bento-gallery__item {
    border-radius: 23px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.bento-gallery__item:hover img {
    transform: scale(1.03);
}

.bento-gallery__item img {
    transition: transform 0.3s ease;
}

.bento-gallery__item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Col 1: Wide items (rows 1 & 3) */
.bento-gallery__item--wide {
    height: 215px;
}

.bento-gallery__item--wide:first-child img {
    object-position: center 20%;
}

/* Col 1: Two side-by-side in row 2 */
.bento-gallery__row-pair {
    display: flex;
    gap: 18px;
}

.bento-gallery__item--half {
    flex: 1;
    height: 220px;
}

/* Col 1: Bottom wide image (shorter) */
.bento-gallery__col--left > .bento-gallery__item--wide:last-child {
    height: 193px;
}

/* Col 2 & 3: All items distribute evenly */
.bento-gallery__col--mid > .bento-gallery__item,
.bento-gallery__col--right > .bento-gallery__item {
    flex: 1;
    min-height: 0;
}

/* If right col only has 1 image, make it fill full height */
.bento-gallery__col--right > .bento-gallery__item:only-child {
    height: auto;
    flex: 1;
}

/* Tall items (last in col 2 & 3) — fill remaining height */
.bento-gallery__item--tall {
    flex: 1;
    min-height: 0;
}

/* "Fun Every Day" overlay on bottom-right photo */
.bento-gallery__overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(102,102,102,0) 51%, rgba(0,0,0,0.44) 90%);
    border-radius: 23px;
    pointer-events: none;
}

.bento-gallery__overlay-text {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
}

.bento-gallery__fun {
    font-family: 'Dancing Script', 'Satisfy', cursive;
    font-size: 43px;
    color: var(--color-white);
}

.bento-gallery__everyday {
    font-family: var(--font-primary);
    font-size: 29px;
    font-weight: var(--fw-regular);
    color: var(--color-white);
    position: relative;
}

.bento-gallery__everyday::after {
    content: '';
    position: absolute;
    left: -5%;
    bottom: -12px;
    width: 110%;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg width='133' height='16' viewBox='0 0 132.5 15.7858' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 15.7858C36 0.786055 82-5.71382 132.5 6.08853C105 3.28618 50 6.78584 0 15.7858Z' fill='%23F58433'/%3E%3C/svg%3E") no-repeat center / contain;
    z-index: -1;
}

/* Floating pill badges */
.bento-gallery__badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 56px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: var(--fw-semibold);
    z-index: 3;
    white-space: nowrap;
}

.bento-gallery__badge--team {
    background: var(--color-white);
    color: var(--color-blue);
    left: 50%;
    transform: translateX(-50%);
    top: calc(50% - 14px);
}

.bento-gallery__badge--community {
    background: var(--color-blue);
    color: var(--color-white);
    border: 1px solid rgba(255,255,255,0.2);
    left: 50%;
    transform: translateX(-50%);
    top: calc(50% + 14px);
}

@media (max-width: 1023px) {
    .bento-gallery__grid {
        flex-wrap: wrap;
    }

    .bento-gallery__col--left {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .bento-gallery__col--mid,
    .bento-gallery__col--right {
        flex: 0 0 calc(50% - 6px);
        max-width: calc(50% - 6px);
    }

    .bento-gallery__item--wide {
        height: 180px;
    }

    .bento-gallery__item--half {
        height: 160px;
    }

    .bento-gallery__badge {
        display: none;
    }
}

/* Lightbox */
.bento-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bento-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.bento-lightbox__img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.bento-lightbox.is-open .bento-lightbox__img {
    transform: scale(1);
}

.bento-lightbox__close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.bento-lightbox__close:hover {
    opacity: 1;
}
