
.events-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
   
    @media (width >=600px) {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    @media (width >=1024px) {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    @media (width >=1400px) {
        gap: 64px;
    }
}

.events-grid .event-card {
    position: relative;
    color: var(--color-white);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    will-change: transform;
   
    @media (width >=769px) {
        background-color: var(--color-primary);
    }
}

@media (hover: hover) and (pointer: fine) {
    .events-grid .event-card:hover {
        transform: scale(1.05);
    }
}

.events-grid .event-link {
    display: block;
}

.events-grid .event-card a {
    color: var(--color-white);
    text-decoration: none;
}

.events-grid .event-content {
    padding: 3.125rem 1.875rem;
}

.events-grid h3.event-title {
    color: var(--color-white);
    font-size: var(--text-md);
    font-weight: var(--font-weight-medium);

    @media (width >=769px) {
        font-size: var(--text-md-lg);
    }
}

.events-grid .event-image {
    position: relative;
    background-color: var(--color-gray-cool-50);
    overflow: hidden;
    transition: margin 0.4s ease;
}

.events-grid .event-image img {
    transition: transform 0.4s ease;
}

.events-grid .event-badge {
    position: absolute;
    left: 0;
    bottom: 0;
    background-color: var(--color-base);
    font-size: var(--text-base);
}

.events-grid .event-badge.live-meetup {
    background-color: var(--color-base);
}

.events-grid .event-badge.members {
    top: 0;
    bottom: auto;
    margin-top: 9px;
    margin-left: 9px;
    padding: 10px 20px;
    background-color: var(--color-yellow-100);
}

.events-grid .live-meetup::before {
    width: 8px;
    height: 14px;
}    

.events-grid .live-meetup::before,
.events-grid  .live-online::before {
    background-color: var(--color-white);
}

.events-grid .event-date span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.events-grid .event-date span::before {
    display: inline-block;
    margin-bottom: 2px;
    width: 20px;
    height: 14px;
    background-color: var(--color-white);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M20 6.6665H0V19.9998H20V6.6665Z M20 1.6665H15V4.1665H14.1667V1.6665H5.83333V4.1665H5V1.6665H0V5.83317H20V1.6665Z M5.83333 0H5V1.66667H5.83333V0Z M14.9993 0H14.166V1.66667H14.9993V0Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M20 6.6665H0V19.9998H20V6.6665Z M20 1.6665H15V4.1665H14.1667V1.6665H5.83333V4.1665H5V1.6665H0V5.83317H20V1.6665Z M5.83333 0H5V1.66667H5.83333V0Z M14.9993 0H14.166V1.66667H14.9993V0Z'/%3E%3C/svg%3E");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    content: '';
}

.events-grid .event-date strong {
    font-weight: var(--font-weight-semibold);
}

.events-grid .event-date-us {
    margin-bottom: 1rem;
}

.events-grid .event-date-us::after {
    content: ' US';
}

.events-grid .event-date-au::after {
    content: ' AU';
}

.events-grid .event-card:nth-child(4n + 1) { 
    background-color: var(--color-primary);
}

.events-grid .event-card:nth-child(4n + 2) { 
    background-color: var(--color-yellow-100);
}

.events-grid .event-card:nth-child(4n + 3) {
    background-color: var(--color-blue-400);
}

.events-grid .event-card:nth-child(4n + 4) {
    background-color: var(--color-orange-400);
}

.events-grid > :nth-child(4n + 2).event-card,
.events-grid > :nth-child(4n + 2).event-card a,
.events-grid > :nth-child(4n + 2).event-card h3.event-title {
    color: var(--color-base);
}

.events-grid > :nth-child(4n + 2) .event-date span::before {
    background-color: var(--color-base);
}

.events-load-more {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: var(--text-base-lg);
    cursor: pointer;
}

.events-load-more::before {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--color-base);
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5a7 7 0 1 1-6.32 4H3l3.5-3.5L10 9H7.8A5.2 5.2 0 1 0 12 6.8V5z'/%3E%3C/svg%3E") center/contain no-repeat;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5a7 7 0 1 1-6.32 4H3l3.5-3.5L10 9H7.8A5.2 5.2 0 1 0 12 6.8V5z'/%3E%3C/svg%3E") center/contain no-repeat;
    content: '';
}

.events-load-more.is-loading::before {
  animation: nds-spin 0.8s linear infinite;
}

@keyframes nds-spin {
  to {
    transform: rotate(360deg);
  }
}
