/* =====================================
   LLC — EVENTS PAGE
   Layers on top of home.css (load home.css first).
   Reuses its colours, sidebar, topbar, mobile nav,
   .feed-heading, .feed-label, .empty-feed, .create-button.
===================================== */

.events-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 32px;
}

/* =====================================
   HERO
===================================== */

.events-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(28px, 4vw, 46px) clamp(24px, 4vw, 46px) clamp(56px, 6vw, 72px);
    background: linear-gradient(150deg, #5a2f8d 0%, #7447a8 55%, #9468cc 100%);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(90, 47, 141, 0.28);
    color: #fff;
}

.events-hero::before,
.events-hero::after {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.events-hero::before {
    top: -90px;
    right: -70px;
    width: 320px;
    height: 320px;
}

.events-hero::after {
    top: -30px;
    right: -10px;
    width: 200px;
    height: 200px;
}

.events-hero .eyebrow {
    color: rgba(255, 255, 255, 0.78);
}

.events-hero h2 {
    margin: 8px 0 14px;
    font-size: clamp(36px, 5.6vw, 60px);
    font-weight: 850;
    letter-spacing: -2.2px;
    line-height: 1.02;
}

.events-hero h2 span {
    color: #e6d3ff;
}

.events-hero>p:not(.eyebrow) {
    max-width: 440px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 15.5px;
    line-height: 1.6;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Lane markings that slowly roll along the bottom of the hero */
.hero-road {
    position: absolute;
    right: 0;
    bottom: 22px;
    left: 0;
    height: 3px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.6) 0 30px, transparent 30px 62px);
    background-size: 62px 100%;
    animation: road 1.6s linear infinite;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

@keyframes road {
    to {
        background-position: -62px 0;
    }
}

/* =====================================
   TOOLBAR: SEARCH + TABS
===================================== */

.events-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.events-search {
    display: flex;
    flex: 1 1 320px;
    gap: 10px;
    min-width: 0;
    margin: 0;
}

.search-field {
    position: relative;
    display: block;
    flex: 1;
    min-width: 0;
}

.search-field .icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transform: translateY(-50%);
    pointer-events: none;
    transition: color 160ms ease;
}

.search-field:focus-within .icon {
    color: var(--violet);
}

.search-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    background: var(--surface-soft);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-field input::placeholder {
    color: var(--muted);
}

.search-field input:focus {
    outline: none;
    background: #fff;
    border-color: var(--violet);
    box-shadow: 0 0 0 4px var(--violet-light);
}

.events-search button {
    height: 46px;
    padding: 0 22px;
    background: var(--violet-gradient);
    color: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: var(--shadow-brand);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.events-search button:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.events-search button:active {
    transform: scale(0.98);
}

.events-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.events-tabs a {
    padding: 10px 18px;
    color: var(--ink-soft);
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 650;
    white-space: nowrap;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.events-tabs a:hover {
    background: #fff;
    color: var(--ink);
}

.events-tabs a.active {
    background: var(--violet-gradient);
    color: #fff;
    box-shadow: var(--shadow-brand);
}

/* =====================================
   EVENT CARDS
===================================== */

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 22px;
}

.event-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    animation: event-in 520ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    animation-delay: calc(var(--i, 0) * 60ms);
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

@keyframes event-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

/* Violet line sweeps across the top on hover */
.event-card::before {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 4;
    height: 3px;
    background: linear-gradient(90deg, #6a3d9f, #b48be6, #8553be);
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 450ms cubic-bezier(0.2, 0.7, 0.2, 1);
    pointer-events: none;
}

.event-card:hover,
.event-card:focus-within {
    border-color: var(--violet-border);
    box-shadow: 0 2px 6px rgba(30, 20, 45, 0.05), 0 18px 44px rgba(116, 70, 168, 0.16);
}

.event-card:hover::before,
.event-card:focus-within::before {
    transform: scaleX(1);
}

@media (hover: hover) {
    .event-card:hover {
        transform: translateY(-4px);
    }
}

/* Image */

.event-image-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #16141a;
}

.event-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 400ms ease;
}

.event-card:hover .event-image {
    transform: scale(1.05);
}

.event-image-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(150deg, #2a1745, #5a2f8d);
    color: rgba(255, 255, 255, 0.35);
}

.event-image-fallback .icon {
    width: 46px;
    height: 46px;
    stroke-width: 1.4;
}

/* Bottom fade so the plate tag always reads */
.event-image-link::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(12, 6, 22, 0.5), transparent 48%);
    content: "";
    pointer-events: none;
}

/* Viewfinder corners that close in on hover */
.event-image-link::before {
    --c: rgba(255, 255, 255, 0.92);
    --l: 22px;
    --t: 2px;
    position: absolute;
    inset: 14px;
    z-index: 2;
    background:
        linear-gradient(var(--c), var(--c)) left top / var(--l) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) left top / var(--t) var(--l) no-repeat,
        linear-gradient(var(--c), var(--c)) right top / var(--l) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) right top / var(--t) var(--l) no-repeat,
        linear-gradient(var(--c), var(--c)) left bottom / var(--l) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) left bottom / var(--t) var(--l) no-repeat,
        linear-gradient(var(--c), var(--c)) right bottom / var(--l) var(--t) no-repeat,
        linear-gradient(var(--c), var(--c)) right bottom / var(--t) var(--l) no-repeat;
    content: "";
    opacity: 0;
    transition: opacity 280ms ease, inset 280ms ease;
    pointer-events: none;
}

.event-card:hover .event-image-link::before {
    inset: 20px;
    opacity: 1;
}

/* License-plate tag, same as the feed */
.image-tag {
    position: absolute;
    bottom: 22px;
    left: 22px;
    z-index: 3;
    padding: 5px 11px 5px 24px;
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--ink);
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1.3;
}

.image-tag::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 13px;
    background: var(--violet-gradient);
    border-radius: 4px 0 0 4px;
    content: "";
}

/* Past events are dimmed until you hover them */
.event-card.is-past .event-image {
    filter: grayscale(0.7) brightness(0.92);
}

.event-card.is-past:hover .event-image {
    filter: none;
}

/* Content */

.event-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 20px 4px;
}

.event-clan {
    align-self: flex-start;
    margin: 0;
    padding: 4px 11px;
    background: var(--violet-light);
    color: var(--violet);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.event-content h3 {
    margin: 12px 0 6px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.event-content h3 a:hover {
    color: var(--violet);
}

.event-description {
    min-height: 45px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.event-meta {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding: 14px 0;
    border-top: 1px solid var(--border-soft);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 550;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.event-meta .icon {
    width: 16px;
    height: 16px;
    color: var(--violet);
}

/* Footer link spans the full card width */

.event-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--surface-soft);
    border-top: 1px solid var(--border-soft);
    color: var(--violet);
    font-size: 13.5px;
    font-weight: 750;
    transition: background 160ms ease;
}

.event-link .icon {
    width: 17px;
    height: 17px;
    transition: transform 200ms ease;
}

.event-link:hover {
    background: var(--violet-light);
}

.event-link:hover .icon {
    transform: translateX(4px);
}

/* =====================================
   PAGINATION
===================================== */

.events-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 36px 0 8px;
}

.events-pagination a,
.events-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 9px 14px;
    background: var(--panel);
    color: var(--ink-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 650;
}

.events-pagination a {
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.events-pagination a:hover {
    background: var(--violet-light);
    border-color: var(--violet-border);
    color: var(--violet);
}

.events-pagination .current {
    background: var(--violet-gradient);
    border-color: transparent;
    box-shadow: var(--shadow-brand);
    color: #fff;
    font-weight: 800;
}

.events-pagination .page-dots {
    background: transparent;
    border-color: transparent;
    min-width: 24px;
    padding: 0;
}

/* =====================================
   RESPONSIVE
===================================== */

@media (max-width: 650px) {
    .events-page {
        padding: 18px 14px 0;
    }

    .events-hero {
        padding: 26px 22px 58px;
        border-radius: 14px;
    }

    .events-hero h2 {
        letter-spacing: -1.6px;
    }

    .events-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .events-search {
        flex: none;
        flex-direction: column;
    }

    .events-search button {
        width: 100%;
        height: 46px;
    }

    .events-tabs {
        display: flex;
    }

    .events-tabs a {
        flex: 1;
        text-align: center;
    }

    .events-page .feed-heading {
        margin: 26px 2px 14px;
    }

    .events-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .events-pagination {
        gap: 6px;
    }

    .events-pagination a,
    .events-pagination span {
        min-width: 38px;
        min-height: 38px;
        padding: 7px 11px;
    }
}