.events-directory,
.event-detail {
    color: #171717;
    background: #fff;
}

.events-container,
.event-detail-container {
    max-width: 1240px;
}

.events-hero {
    padding: 90px 0 80px;
    color: #fff;
    background: linear-gradient(120deg, #080808 0%, #202020 70%, #790006 100%);
}

.events-eyebrow,
.event-section-kicker {
    margin: 0 0 10px;
    color: #ed111b;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.events-hero h1,
.event-detail-hero h1 {
    max-width: 900px;
    margin: 0;
    font-family: "DIN MX", Arial, sans-serif;
    font-size: clamp(3.2rem, 8vw, 7rem);
    line-height: .85;
    text-transform: uppercase;
}

.event-detail-labels {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.event-detail-finished {
    display: inline-flex;
    padding: 7px 10px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 2px;
    background: rgba(15, 15, 15, .82);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.events-hero > div > p:last-child {
    max-width: 700px;
    margin: 25px 0 0;
    color: #ccc;
    font-size: 1.08rem;
}

.events-filter-band {
    padding: 28px 0;
    border-bottom: 1px solid #dedede;
    background: #f4f4f4;
}

.events-filters {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr) auto;
    align-items: end;
    gap: 15px;
}

.events-filters label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.events-filters .form-control,
.events-filters .form-select {
    min-height: 46px;
    border-radius: 2px;
}

.events-filters .btn {
    min-height: 46px;
}

.events-results {
    padding: 55px 0 90px;
}

.events-results-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.events-results-heading p {
    margin: 0;
}

.events-results-heading a,
.event-detail-link {
    color: #bd090f;
    font-weight: 800;
    text-underline-offset: 4px;
}

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

.event-card {
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .06);
}

.event-card-image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #222;
}

.event-card-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.event-card:hover .event-card-image > img {
    transform: scale(1.035);
}

.event-type {
    display: inline-flex;
    padding: 7px 10px;
    color: #fff;
    border-radius: 2px;
    background: #c70810;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.event-type.type-race { background: #9000bd; }
.event-type.type-school { background: #0868b7; }
.event-type.type-other { background: #444; }

.event-card-image .event-type {
    position: absolute;
    top: 15px;
    left: 15px;
}

.event-past-label {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 7px 10px;
    color: #fff;
    border-radius: 2px;
    background: rgba(20, 20, 20, .9);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.event-card-image time {
    position: absolute;
    left: 15px;
    bottom: 15px;
    display: flex;
    align-items: center;
    flex-direction: column;
    min-width: 65px;
    padding: 9px;
    color: #111;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .25);
}

.event-card-image time strong {
    font-size: 1.6rem;
    line-height: 1;
}

.event-card-image time span {
    font-size: .68rem;
}

.event-card-content {
    padding: 24px;
}

.event-circuit {
    margin: 0;
    color: #777;
    font-size: .73rem;
    font-weight: 800;
    text-transform: uppercase;
}

.event-card-content h2 {
    margin: 9px 0 14px;
    font-size: 1.55rem;
    line-height: 1.05;
}

.event-card-content h2 a {
    color: inherit;
    text-decoration: none;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    font-size: .78rem;
    font-weight: 700;
}

.event-card-attendees {
    display: flex;
    align-items: center;
    min-height: 42px;
    color: #696969;
    font-size: .75rem;
    font-weight: 700;
}

.event-card-avatars {
    display: flex;
    margin-right: 10px;
}

.event-card-avatars > span {
    display: grid;
    width: 32px;
    height: 32px;
    margin-left: -8px;
    overflow: hidden;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #202020;
    place-items: center;
    font-size: .68rem;
    font-weight: 900;
}

.event-card-avatars > span:first-child { margin-left: 0; }
.event-card-avatars img { width: 100%; height: 100%; object-fit: cover; }
.event-card-avatars .event-card-avatar-more { background: #202020; }

.event-card-content > p:not(.event-circuit) {
    min-height: 4.3em;
    margin: 15px 0;
    color: #5c5c5c;
    font-size: .9rem;
    line-height: 1.45;
}

.events-pagination {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 45px;
}

.events-pagination a {
    display: grid;
    width: 38px;
    height: 38px;
    color: #111;
    place-items: center;
    border: 1px solid #ccc;
    text-decoration: none;
}

.events-pagination a.active {
    color: #fff;
    border-color: #c70810;
    background: #c70810;
}

.events-empty {
    padding: 70px 30px;
    text-align: center;
    background: #f5f5f5;
}

.event-detail-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background-image: var(--event-image);
    background-position: center;
    background-size: cover;
}

.event-detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,.92), rgba(0,0,0,.08) 75%);
}

.event-detail-hero .event-detail-container {
    position: relative;
    padding-bottom: 62px;
}

.event-breadcrumb {
    display: flex;
    gap: 10px;
    margin-bottom: 35px;
    font-size: .76rem;
}

.event-breadcrumb a,
.event-detail-hero p a {
    color: #fff;
}

.event-detail-hero h1 {
    margin-top: 20px;
    font-size: clamp(3rem, 7vw, 6.3rem);
}

.event-detail-hero p {
    margin: 20px 0 0;
    color: #ddd;
    font-weight: 700;
}

.event-detail-body {
    padding: 0 0 90px;
}

.event-facts {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: -28px 0 65px;
    box-shadow: 0 15px 35px rgba(0,0,0,.12);
}

.event-facts > div {
    padding: 24px 28px;
    background: #fff;
    border-right: 1px solid #ddd;
}

.event-facts > div:last-child { border: 0; }
.event-facts span { display: block; color: #777; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.event-facts strong { display: block; margin-top: 5px; font-size: 1.15rem; }

.event-section + .event-section {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 1px solid #ddd;
}

.event-section h2,
.event-app-card h2,
.event-circuit-card h2 {
    margin: 0 0 20px;
    font-family: "DIN MX", Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    text-transform: uppercase;
}

.event-description {
    color: #444;
    font-size: 1.03rem;
    line-height: 1.75;
}

.event-attendee-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.event-attendee {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: #222;
    border: 1px solid #ddd;
    text-decoration: none;
}

.event-attendee img,
.event-attendee > span {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    object-fit: cover;
}

.event-attendee > span {
    display: grid;
    color: #fff;
    background: #c70810;
    place-items: center;
    font-weight: 900;
}

.event-attendee strong {
    overflow: hidden;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-app-card,
.event-circuit-card {
    padding: 30px;
    background: #111;
    color: #fff;
}

.event-app-card p:not(.event-section-kicker) { color: #ccc; line-height: 1.55; }
.event-open-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 8px;
    padding: 0 22px;
    border-radius: 3px;
    background: #f10b13;
    color: #fff;
    font-size: .84rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
}
.event-open-app:hover { background: #ce080e; color: #fff; }
.event-app-card small { display: block; margin-top: 18px; color: #aaa; line-height: 1.45; }
.event-store-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.event-store-links img { width: 135px; height: auto; }

.event-circuit-card {
    display: flex;
    gap: 18px;
    margin-top: 22px;
    color: #111;
    border: 1px solid #ddd;
    background: #fff;
}

.event-circuit-card img { width: 78px; height: 78px; object-fit: contain; }
.event-circuit-card span { color: #777; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.event-circuit-card h2 { margin: 5px 0 8px; font-size: 1.35rem; }
.event-circuit-card a { color: #b9070e; font-weight: 800; }

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

@media (max-width: 767px) {
    .events-hero { padding: 70px 0 55px; }
    .events-filters { grid-template-columns: 1fr; }
    .events-grid { grid-template-columns: 1fr; }
    .event-detail-hero { min-height: 440px; }
    .event-detail-hero .event-detail-container { padding-bottom: 45px; }
    .event-facts { grid-template-columns: repeat(2, 1fr); margin-bottom: 45px; }
    .event-facts > div:nth-child(2) { border-right: 0; }
    .event-facts > div:nth-child(-n+2) { border-bottom: 1px solid #ddd; }
    .event-attendee-grid { grid-template-columns: 1fr; }
    .event-detail-layout { --bs-gutter-y: 2rem; }
}
