/* Filter bar */
.event-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.event-filter-bar button {
    font-size: 13px;
    padding: 7px 18px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 100px;
    background: transparent;
    cursor: pointer;
    color: #555;
    transition: all .15s;
}
.event-filter-bar button.active,
.event-filter-bar button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Grid */
/* Desktop: 3 cột */
#event-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Tablet: 2 cột */
@media (max-width: 1024px) {
    #event-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 cột */
@media (max-width: 767px) {
    #event-grid {
        grid-template-columns: 1fr;
    }
}

/* Card — từ CSS bước trước */
.ec { background: #fff; border: 0.5px solid rgba(0,0,0,0.1); border-radius: 16px; overflow: hidden; }
.ec-img-wrap {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.ec-img-wrap img {
    width: 100%;
    height: auto;
    display: block;

    transition: transform 8s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

/* Hover scroll image */
#event-grid > article:hover .ec-img-wrap img {
    transform: translateY(calc(-100% + 250px));
}
.ec-body { padding: 1.5rem; }
.ec-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; flex-wrap: wrap; }
.ec-badge-cat { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; background: var(--primary-color); color: #fff; border-radius: 4px; padding: 3px 9px; }
.ec-badge-status { font-size: 11px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; border-radius: 4px; padding: 3px 9px; }
.status-ongoing  { background: #EAF3DE; color: #27500A; }
.status-expired  { background: #FCEBEB; color: #791F1F; }
.status-upcoming { background: #FAEEDA; color: #633806; }
.ec-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #ccc; }
.ec-title { font-size: 18px; font-weight: 500; margin: 0 0 10px; line-height: 1.35; font-family: Georgia, serif; }
.ec-title a { color: inherit; text-decoration: none; }
.ec-title a:hover { color: var(--primary-color); }
.ec-excerpt { font-size: 13.5px; color: #555; line-height: 1.7; margin: 0 0 1.25rem; }
.ec-excerpt p { margin: 0; }
.ec-divider { border: none; border-top: 0.5px solid rgba(0,0,0,0.08); margin: 0 0 1.25rem; }
.ec-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ec-date-block { display: flex; align-items: flex-start; gap: 10px; background: #f9f9f9; border: 0.5px solid rgba(0,0,0,0.07); border-radius: 10px; padding: 12px; }
.ec-date-block.highlight { background: var(--primary-color); border-color: var(--primary-color); }
.ec-day-num { font-size: 32px; font-weight: 500; line-height: 1; font-family: Georgia, serif; color: #111; flex-shrink: 0; }
.ec-date-block.highlight .ec-day-num { color: #fff; }
.ec-date-label { font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #aaa; margin-bottom: 3px; }
.ec-date-block.highlight .ec-date-label { color: rgba(255,255,255,.6); }
.ec-date-sub { font-size: 12px; color: #555; line-height: 1.45; }
.ec-date-block.highlight .ec-date-sub { color: rgba(255,255,255,.85); }

/* Skeleton loading */
.ec-skeleton {
    border-radius: 16px;
    background: #f0f0f0;
    min-height: 380px;
    animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}

/* Empty state */
.ec-empty { color: #888; text-align: center; padding: 3rem 0; grid-column: 1/-1; }

/* Sentinel (invisible trigger for IntersectionObserver) */
#event-sentinel { height: 1px; grid-column: 1/-1; }
.el-wrap {
    max-width: var(--m-width_md);
    margin: 0 auto;
	padding-top: 5vw;
    padding-right: 8.3vw;
    padding-bottom: 5vw;
    padding-left: 8.3vw;
}

.ef-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.12);
    color: inherit;
    border-radius: 100px;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    line-height: 1;
}

.event-filter-bar button.active .ef-count {
    background: rgba(255,255,255,0.25);
}
/* ── Controls row ──────────────────────────────────────────── */
.el-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* ── Category dropdown ─────────────────────────────────────── */
.el-category-wrap select {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    min-width: 160px;
}

.el-category-wrap select:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.el-category-wrap select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ── Sentinel ──────────────────────────────────────────────── */
#event-sentinel {
    height: 1px;
    width: 100%;
}
/* ── Multiple category badges ──────────────────────────────── */
.ec-badges-cat {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ec-badge-cat {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    padding: 3px 9px;
    line-height: 1.6;
    white-space: nowrap;
}
