.activities-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
}

/* ---- Card ---- */
.activity-card-wrapper {
    position: relative;
    height: 100%;
}

.activity-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 2rem 1rem;
    min-height: 200px;
    height: 100%;
    text-decoration: none !important;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    z-index: 0;
}

/* Background image layer */
.activity-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--activity-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

/* Dark gradient overlay */
.activity-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(34, 34, 34, 0.75) 0%, rgba(34, 34, 34, 0.40) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.activity-card:hover {
    z-index: 2;
}

.activity-card:hover::before,
.activity-card:hover::after {
    opacity: 1;
}

/* Hover frame (top border + left/right gradient edges), detached 10px from the card */
.activity-card-frame {
    position: absolute;
    inset: -10px;
    z-index: 3;
    pointer-events: none;
    border-top: 4px solid #ffe400;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.activity-card-frame::before,
.activity-card-frame::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #ffe400 0%, #ffe400 50%, #ffffff 50%, #ffffff 100%);
}

.activity-card-frame::before {
    left: 0;
}

.activity-card-frame::after {
    right: 0;
}

.activity-card:hover ~ .activity-card-frame {
    opacity: 1;
}

/* ---- Icon circle ---- */
.activity-icon-circle {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(217, 217, 217, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.activity-card:hover .activity-icon-circle {
    opacity: 0;
}

.activity-icon-circle img,
.activity-icon-circle svg {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* ---- Title ---- */
.activity-title {
    position: relative;
    z-index: 2;
    margin: 0;
    color: rgba(34, 34, 34, 0.8);
    font-family: "Raleway", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: color 0.3s ease;
}

.activity-card:hover .activity-title {
    color: #fff;
    font-weight: 800;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .activities-grid-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .activities-grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }

    .activity-card {
        min-height: 180px;
    }

    .activity-icon-circle {
        width: 80px;
        height: 80px;
    }

    .activity-icon-circle img,
    .activity-icon-circle svg {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 768px) {
    .activities-grid-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }

    .activity-card {
        min-height: 160px;
        padding: 1.5rem 0.75rem;
        gap: 1rem;
    }

    .activity-title {
        font-size: 14px;
    }
}

@media (max-width: 540px) {
    .activities-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .activity-card {
        min-height: 150px;
    }

    .activity-icon-circle {
        width: 64px;
        height: 64px;
    }

    .activity-icon-circle img,
    .activity-icon-circle svg {
        width: 28px;
        height: 28px;
    }

    .activity-title {
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .activities-grid-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .activity-card {
        min-height: 130px;
        padding: 1rem 0.5rem;
    }
}
