/* Event discovery page: category headings, responsive card grid, card states,
   empty results, and reduced-motion behavior. */

body.events-page {
    color: #191a2f;
    background:
        radial-gradient(circle at 88% 8%, rgba(111, 91, 228, .095), transparent 24%),
        radial-gradient(circle at 6% 33%, rgba(69, 108, 199, .055), transparent 20%),
        #f8f8fc;
}

body.events-page main.container {
    width: min(100% - 48px, 1280px);
    max-width: none;
    margin: 0 auto;
    padding: 82px 0 110px;
}

body.events-page .page-head {
    position: relative;
    max-width: 980px;
    margin: 0 0 82px;
    padding: 0 0 34px;
    border-bottom: 1px solid #dedde9;
}

body.events-page .page-head::after {
    content: "";
    position: absolute;
    width: 84px;
    height: 3px;
    left: 0;
    bottom: -2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #6353df, #9c58c4);
}

body.events-page .page-title {
    max-width: 940px;
    margin: 0 0 20px;
    color: #15162a;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(3.5rem, 7vw, 7rem);
    font-weight: 800;
    line-height: .94;
    letter-spacing: -.06em;
    text-wrap: balance;
}

body.events-page .page-sub {
    max-width: 660px;
    margin: 0;
    color: #686c80;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.7;
}

/* Each category owns a heading and its event-card grid. */
.event-section { margin: 0 0 86px; }
.event-section:last-child { margin-bottom: 0; }

.cat-title {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 24px;
    color: #27283c;
}

.cat-title::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, #dedde9, transparent);
}

.cat-title .chip {
    display: inline-flex;
    align-items: center;
    padding: 0;
    color: #27283c;
    background: none;
    border: 0;
    font-family: 'Manrope', sans-serif;
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -.025em;
    text-transform: none;
}

.cat-title .chip::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-right: 11px;
    border: 2px solid #f8f8fc;
    border-radius: 50%;
    background: #6a58df;
    box-shadow: 0 0 0 5px rgba(106, 88, 223, .11);
}

.cat-title .chip::after { display: none; }

body.events-page .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* Clickable event summary card. */
body.events-page .event-card {
    min-height: 0;
    overflow: hidden;
    color: #1b1c31;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #e4e3ee;
    border-radius: 22px;
    box-shadow: 0 12px 36px rgba(28, 22, 70, .065);
    transform: translateY(0);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

body.events-page .event-card:hover {
    border-color: #cfcaf1;
    box-shadow: 0 24px 58px rgba(28, 22, 70, .13);
    transform: translateY(-6px);
}

body.events-page .event-card .stretched {
    height: 100%;
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

body.events-page .card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    transform: scale(1.001);
    transition: transform .35s ease, filter .35s ease;
}

body.events-page .event-card:hover .card-img {
    filter: saturate(1.06) contrast(1.02);
    transform: scale(1.035);
}

body.events-page .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 25px 24px 22px;
}

body.events-page .card-title {
    margin: 0 0 20px;
    color: #1b1c31;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.15rem, 1.7vw, 1.38rem);
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -.03em;
}

body.events-page .stretched:hover .card-title {
    color: #5343c7;
    text-decoration: none;
}

body.events-page .meta {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 9px;
    margin: 0 0 10px;
    color: #6f7284;
    font-size: .83rem;
    line-height: 1.55;
}

body.events-page .meta i {
    margin-top: 4px;
    color: #7463df;
    text-align: center;
}

body.events-page .badge {
    position: absolute;
    top: 17px;
    bottom: auto;
    left: 17px;
    z-index: 2;
    padding: 7px 11px;
    color: #fff;
    background: rgba(17, 18, 45, .78);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(5, 6, 22, .2);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .02em;
    backdrop-filter: blur(10px);
}

body.events-page .event-card :focus-visible {
    outline: 3px solid rgba(103, 85, 221, .45);
    outline-offset: -3px;
}

body.events-page .empty-state {
    position: relative;
    overflow: hidden;
    padding: 84px 28px;
    background: rgba(255, 255, 255, .76);
    border: 1px dashed #cbc7e5;
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(28, 22, 70, .055);
}

body.events-page .empty-state::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -105px;
    top: -110px;
    border: 1px solid rgba(107, 88, 223, .15);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(107, 88, 223, .025);
}

@media (max-width: 1020px) {
    body.events-page .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    body.events-page main.container {
        width: min(100% - 28px, 1280px);
        padding: 58px 0 82px;
    }
    body.events-page .page-head { margin-bottom: 58px; }
    body.events-page .page-title { font-size: clamp(3.1rem, 16vw, 5rem); }
    .event-section { margin-bottom: 64px; }
    body.events-page .grid-3 { grid-template-columns: 1fr; }
    body.events-page .card-img { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
    body.events-page .event-card,
    body.events-page .card-img { transition: none; }
}
