.project-images-gallery {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.project-images-row {
    height: 100%;
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.project-image-item {
    display: inline-flex;
    flex-direction: column;
    background: white;  
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 100%;
    max-width: 1000px;
    /* No fixed width — will match image width */
}

.project-image {
    height: calc(70vh - 140px);
    width: auto;
    object-fit: contain;   
    display: block;
}

.project-image-description {
    max-height: 120px;
    overflow-y: auto;
    overflow-x: auto;
    padding: 2px 8px;
    background: white;
    border-top: 1px solid #eee;   
    text-align: left;
    width: 100%; /* Matches width of .project-image-item, which is based on image */
    box-sizing: border-box;
    font-size: 0.8em;
}

.dimension-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Optional: make sure image and badge share a relative container if badge used */
.project-image-item {
    position: relative;
}
