/* ================================== */
/* ======= 1. Activity Grid ========= */
/* ================================== */
#activity_grid {
    width: 85%;
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    max-width: 1200px;
    gap: 1.5rem;
    margin: 2rem auto;
    justify-content: center;
}

.activity_item {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    background-color: white;
    
    min-height: 400px;
}

.activity_item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.05); /* darker by default */
    opacity: 1;
    transition: background-color 0.3s ease;
    pointer-events: none;
    border-radius: 30px;
}

.activity_item:hover::after {
    background-color: rgba(0, 0, 0, 0); /* lightens on hover */
}

.activity_item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.activity_text {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    text-align: left;
    transition: background 0.3s ease, transform 0.3s ease;
}

.activity_item:hover .activity_text {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%) translateY(-4px);
}

.activity_text h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--graphite);
}

.activity_text .activity_description {
    font-size: 0.9rem;
    color: rgb(235, 235, 235);
    margin-top: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show ~2 lines initially */
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}
.activity_item:hover .activity_text .activity_description {
    color: var(--graphite);
}

.read-more-btn {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    border: none;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.15s ease-in;
}

.read-more-btn:hover {
    background: var(--appleBlue);
    color: white;
}

.activity_item.expanded .activity_text p {
    -webkit-line-clamp: unset;
    display: block;
    white-space: normal;
    color: var(--graphite);
}

.activity_icon {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--graphite);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transition: background 0.3s ease, transform 0.3s ease;
}

.activity_item:hover .activity_icon {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.1);
}

.activity_direction_icon {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--graphite);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transition: background 0.3s ease, transform 0.3s ease;
}

.activity_item:hover .activity_direction_icon {
    background: var(--appleBlue);
    color: white;
    transform: scale(1.1);
    cursor: pointer;
}