/* base */
.activity-card {
    position: relative;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 2.4rem 1.6rem;
    height: 330px;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    border: 1px solid transparent;
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.06);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.35s,
        border-color 0.35s;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
    --mx: 0;
    --my: 0;
}

.activity-card .card-inner {
    position: relative;
    z-index: 5;
}

.activity-card .icon-wrap {
    width: 96px;
    height: 96px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    background: linear-gradient(
        180deg,
        rgba(14, 165, 255, 0.08),
        rgba(2, 132, 199, 0.04)
    );
    transition: transform 0.35s ease, background 0.35s ease;
    box-shadow: inset 0 -6px 18px rgba(2, 132, 199, 0.03);
}

.activity-card .icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: saturate(0.95);
}

.activity-card .title {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #083047;
    margin-top: 0.6rem;
}

.activity-card .desc {
    color: #475569;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.5;
    margin-top: 0.5rem;
}

/* hover uplift */
.activity-card:hover {
    transform: translateY(-16px) translateZ(20px)
        rotateX(calc((var(--my) - 50) * 0.06deg))
        rotateY(calc((var(--mx) - 50) * 0.08deg));
    border-color: rgba(2, 132, 199, 0.12);
    box-shadow: 0 24px 60px rgba(2, 132, 199, 0.14);
}

.activity-card:hover .icon-wrap {
    transform: translateY(-6px) scale(1.03);
    background: linear-gradient(
        180deg,
        rgba(14, 165, 255, 0.12),
        rgba(2, 132, 199, 0.06)
    );
}

/* floating glow animation */
@keyframes floatingGlow {
    0% {
        transform: translateY(0px);
        box-shadow: 0 10px 20px rgba(2, 132, 199, 0.04);
    }

    50% {
        transform: translateY(-6px);
        box-shadow: 0 26px 44px rgba(2, 132, 199, 0.06);
    }

    100% {
        transform: translateY(0px);
        box-shadow: 0 10px 20px rgba(2, 132, 199, 0.04);
    }
}

.activity-card {
    animation: floatingGlow 6s ease-in-out infinite;
}

/* stagger slightly using data-anim-delay */
.activity-card[data-anim-delay="150"] {
    animation-delay: 0.2s;
}

.activity-card[data-anim-delay="300"] {
    animation-delay: 0.35s;
}

.activity-card[data-anim-delay="450"] {
    animation-delay: 0.5s;
}

/* shine sweep layer */
.card-shine-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.65) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: translateX(-140%) skewX(-12deg);
    opacity: 0;
    transition: transform 0.7s ease, opacity 0.3s ease;
    mix-blend-mode: screen;
}

.activity-card:hover .card-shine-layer {
    transform: translateX(140%) skewX(-12deg);
    opacity: 1;
    transition-duration: 0.9s;
}

/* ripple (click) */
.activity-card .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: rippleAnim 0.6s linear;
    background: rgba(14, 165, 255, 0.18);
    pointer-events: none;
    z-index: 6;
}

@keyframes rippleAnim {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }

    100% {
        transform: scale(6);
        opacity: 0;
    }
}

/* reveal on scroll */
.activity-card {
    opacity: 0;
    transform: translateY(18px) scale(0.995);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.activity-card.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* responsive tweaks */
@media (max-width: 768px) {
    .activity-card {
        height: auto;
        padding: 1.5rem;
    }

    .activity-card .icon-wrap {
        width: 72px;
        height: 72px;
    }
}
