.reveal {
    opacity: 0;
    transform: translateY(30px);
}

.activities-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 160px 8% 100px;
}

/* --- ACTIVITIES SPECIFIC STYLES --- */

/* 1. Grid Container */
.activities-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 0;
    min-height: 400px; /* Prevents layout jump when filtering */
}

/* Base Card Styling (Merged duplicate declarations) */
.activity-card {
    background: var(--glass);
    border: 1px solid #dbd8d8;
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 0 1 calc((100% - (2 * 1.5rem)) / 3); /* Formula: (100% width - space taken by 2 gaps) / 3 columns */
    min-width: 300px;
    box-sizing: border-box;
    height: auto;
    transition: all 0.4s ease;
    cursor: pointer;
    z-index: 1;
    text-decoration: none;
    
    /* Initial state for ScrollTrigger elements */
    opacity: 0;
    transform: translateY(30px);
    will-change: transform, opacity;
}

/* The exact hover effect from your reference image */
.activity-card:hover {
    background: white; /* Soft teal background */
    border-color: #ebd0d0; /* Slightly darker teal border */
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.04);
}

.card-banner {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
    aspect-ratio: 16 / 8;
}

.card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 4px;
}

/* Meta wrapper for tag and date */
.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.category-tag {
    background: #eae9d3;
    color: #161616;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-family: "Inter", sans-serif;
    font-weight: 400;
    letter-spacing: 0;
}

.event-date {
    font-size: 1rem;
    color: #161616;
    font-family: "Inter", sans-serif;
    margin: 0;
}

.card-content h3 {
    font-family: "Inter", sans-serif;
    font-size: 1.35rem;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.4;
    font-weight: 400;
}

/* Hide descriptions to match the clean aesthetic of the reference */
.description {
    display: none;
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.card-footer a {
    text-decoration: none;
}

/* The teal arrow */
.arrow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: maroon;
    border-radius: 50%;
    font-size: 1.2rem;
    font-family: Arial, sans-serif;
    transition: all 0.4s ease;
}

/* On card hover, the arrow gets a white circle background */
.activity-card:hover .arrow-icon {
    background: #ffffff;
    color: maroon;
    transform: translateX(4px);
}

/* Horizontal Centered Tabs */
.year-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
    z-index: 1;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.6rem 1.5rem;
    font-family: "Manrope", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    color: var(--dark);
}

.tab-btn.active {
    background: var(--dark);
    color: var(--light);
    border-color: var(--dark);
}

.hero-subtext {
    text-align: center;
    margin-top: -1rem;
    opacity: 0.6;
    font-weight: 500;
    margin-bottom: 4rem;
}

/* Ensure hero title matches the About/Contact page style */
.section-title .hero-title {
    display: flex;
    justify-content: center;
    gap: 0 0.4em;
    flex-wrap: wrap;
}

.hero-title {
    font-size: clamp(2.5rem, 7.5vw, 9rem);
    align-items: baseline !important;
}

.word-map {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-right: 0.2em;
    padding-left: 0.05em;
    padding-top: 0.1em;
    margin-right: -0.12em;
}

.word-inner {
    display: inline-block;
    transform: translateY(120%);
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.word-inner.tm {
    position: relative;
    top: -0.03em;
}

/* ==========================================================================
   MEDIA QUERIES (TABLET & MOBILE)
   ========================================================================== */

/* Tablet Viewport */
@media (max-width: 1024px) {
    .activity-card {
        flex: 0 1 calc((100% - 1.5rem) / 2); /* Formula: (100% width - space taken by 1 gap) / 2 columns */
    }
}

/* Mobile Viewport */
@media (max-width: 650px) {
    .activities-grid {
        gap: 1.25rem;
    }

    .activity-card {
        flex: 0 1 100%;
        min-width: 100%;
    }

    .card-banner {
        aspect-ratio: 16 / 8;
    }

    .card-content h3 {
        font-size: 1.15rem;
        margin-bottom: .5rem;
        line-height: 1.25;
        font-weight: 400;
    }

    .card-meta .category-tag {
        padding: 6px 16px;
        font-size: .8rem;
    }

    .card-meta .event-date {
        font-size: .8rem;
    }
}