/* --- Visualization Gallery --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    min-height: 220px; /* starting height */
    height: auto;      /* grows with text */
    padding-top: 140px; /* keeps space for the background image */
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-start;
    padding: 20px;
    transition: transform 0.3s ease;
}

/* Dark overlay — stronger dim for better text visibility */
.gallery-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); /* ← increased opacity */
    transition: background 0.3s ease;
}

/* Hover — brighten the image */
.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item:hover::before {
    background: rgba(0, 0, 0, 0.65); /* brighter on hover */
}

/* Text always above overlay */
.gallery-item h3,
.gallery-item p {
    position: relative;
    z-index: 2;
    color: white;
    margin: 0;
    text-align: center;
}

.gallery-item h3 {
    font-size: 1.5rem;
    margin-top: 8px;
    margin-bottom: 8px;
}

.gallery-item p {
    font-size: 1.3rem;
    color: #f0f0f0;
    padding-top: 10px;
}

.gallery-item h3 {
    margin-bottom: 10px;
    color: white;
}

.software {
    background-image: url("/static/images/software.png");
}
.bespoke {
    background-image: url("/static/images/bespoke.png");
}
.teamwork {
    background-image: url("/static/images/teamwork.png");
}
