#home-main-content {
    max-width: 95%;
    margin: 2.5% auto;
    padding: 0px;
}

.container {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    min-height: calc(75vh);
    justify-content: center;
    margin: auto;
}

#activityCountDisplay {
    display: none;
    color:white;
    font-weight:bold;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px 14px;
}

.gallery-card {
    display: block;
    text-decoration: none;
    cursor: pointer;
    position: relative; /* needed for <p> child to have position:absolute */
    overflow: hidden;
}

.gallery-card img {
    width: 100%;
    border-radius: 8px;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-card p {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%); /* centers it horizontally */
    margin: 0;
    padding: 5px;
    color: white;
    font-size: var(--font-medium-large);
    font-weight: bold;
    white-space: nowrap; /* prevent text wrapping */
    background-color: rgba(0, 6, 38, 0.5);
    border-radius: 6px;
}

/* Tablet: 2 columns */
@media (max-width: 800px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 column */
@media (max-width: 480px) {
    .container {
        max-width: 90%;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}