/* ===== Masonry Gallery ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gallery-item {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item img:hover {
    transform: scale(1.03);
    filter: grayscale(0%);
}

/* ===== LIGHTBOX BASE ===== */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 5px 5px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
    z-index: 9999;
}

.lightbox-content {
    /* max-height: calc(100vh - 3rem); */
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 1800px;
    overflow: hidden;
}

/* ===== IMAGE SIDE ===== */
.lightbox-image-container {
    flex: none;           /* don't stretch */
    width: 40%;           /* or any proportion of your choice */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

.lightbox-image-container img {
    width: 100%;
    /* maintain original aspect ratio */
    height: 100%;
    /* fill container height */
    object-fit: cover;
    /* minor padding ok, but no distortion */
    display: block;
}

/* ===== TEXT SIDE ===== */
.lightbox-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 1.25rem 7rem;
    text-align: right;
    background: #f2e747;
    color: #e30613;

    overflow: hidden;
    /* keep */
}

.lightbox-text-inner {
    width: 70%;
    max-height: 100%;
    overflow-y: auto;
    padding-left: 1rem;
    /* breathing room for right-aligned text */
    scrollbar-gutter: stable;
}

.lightbox-title {
    font-family: "Neue Haas Display Bold";
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.lightbox-description {
    line-height: 1.5;
    margin-bottom: 1rem;
}

.lightbox-description b {
    font-weight: bold;
}

.lightbox-footer {
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    opacity: 0.7;
    margin-top: 1rem;
    font-family: "Neue Haas Display Roman";
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .lightbox-content {
        flex-direction: column;
        height: 100vh !important;
    }

    .lightbox-image-container {
        flex: none;
        max-height: 55vh;
        width: 100%;
    }

    .lightbox-text {
        max-height: 45vh;
        padding: 1.25rem 2rem;
    }

    .lightbox-text-inner {
        padding-left: 0;
    }

    .lightbox-close {
        top: 0.75rem;
        right: 1rem;
    }
}