/* ====================================================================
   FUTURISTIC EVENT LIST CARDS
   Matches the Race Data Terminal language of the results page
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --el-green:      #0bbf6a;
    --el-green-glow: rgba(11, 191, 106, 0.38);
    --el-gold:       #d6b35a;
    --el-gold-dim:   rgba(214, 179, 90, 0.18);
    --el-border:     rgba(255, 255, 255, 0.09);
    --el-text:       #e8f5ee;
    --el-muted:      #7ba890;
    --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Strip default Bootstrap card styling from event cards ── */
.event-card .custom-card-style-1,
.event-card .card {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    height: 100%;
}

/* ══════════════════════════════════════
   CARD SHELL
   ══════════════════════════════════════ */
.ev-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(255,255,255,0.065) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid var(--el-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 16px 50px rgba(0,0,0,0.42);
    transition: transform 0.32s var(--ease-out), box-shadow 0.32s var(--ease-out);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Green neon top-edge line */
.ev-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%; right: 25%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--el-green), transparent);
    border-radius: 999px;
    z-index: 3;
    opacity: 0.65;
    transition: left 0.35s var(--ease-out), right 0.35s var(--ease-out), opacity 0.35s;
}

.ev-card:hover::before {
    left: 6%; right: 6%;
    opacity: 1;
}

.ev-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 0 0 1px rgba(11,191,106,0.18) inset,
        0 28px 70px rgba(0,0,0,0.5),
        0 0 40px rgba(11,191,106,0.07);
}

/* ══════════════════════════════════════
   IMAGE SECTION
   ══════════════════════════════════════ */
.ev-img-wrap {
    position: relative;
    height: 175px;
    overflow: hidden;
    flex-shrink: 0;
    line-height: 0; /* kills inline gap below img */
}

/* Make the anchor a block so it fills the wrapper */
.ev-img-wrap > a {
    display: block;
    height: 100%;
}

.ev-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s var(--ease-out);
    display: block;
}

.ev-card:hover .ev-img {
    transform: scale(1.06);
}

/* Bottom-to-top dark gradient so body content blends into image */
.ev-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(4,13,10,0.96) 0%,
        rgba(4,13,10,0.35) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
}

/* ── Meta row: category tag + date (in card body, always visible) ── */
.ev-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ev-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Orbitron', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--el-green);
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(11,191,106,0.4);
}

.ev-date i { font-size: 0.6rem; }

/* Category tag — sits in card body, always visible against dark bg */
.ev-category-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.57rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--el-gold);
    background: rgba(214, 179, 90, 0.12);
    border: 1px solid rgba(214, 179, 90, 0.28);
    border-radius: 6px;
    padding: 3px 9px;
}

/* ══════════════════════════════════════
   CARD BODY
   ══════════════════════════════════════ */
.ev-body {
    padding: 0.95rem 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.3rem;
    background: linear-gradient(160deg, rgba(10,25,18,0.65) 0%, rgba(4,13,10,0.82) 100%);
}

.ev-title {
    font-family: 'Space Grotesk', 'Poppins', sans-serif;
    font-size: 0.93rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}

.ev-title a {
    color: var(--el-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ev-title a:hover {
    color: var(--el-green);
}

.ev-desc {
    font-size: 0.76rem;
    color: var(--el-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Footer row ── */
.ev-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.ev-closes {
    font-size: 0.68rem;
    color: var(--el-muted);
    line-height: 1;
}

.ev-closes strong {
    color: var(--el-green);
    font-weight: 700;
}

.ev-cta {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--el-gold);
    text-decoration: none;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease, gap 0.2s ease;
}

.ev-cta i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.ev-cta:hover {
    color: var(--el-green);
}

.ev-cta:hover i {
    transform: translateX(3px);
}

/* ══════════════════════════════════════
   ENTRANCE ANIMATION
   ══════════════════════════════════════ */
@keyframes evCardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.event-card {
    opacity: 0;
    animation: evCardIn 0.45s var(--ease-out) both;
}

/* Stagger first 12 cards */
.event-card:nth-child(1)  { animation-delay: 0.04s; }
.event-card:nth-child(2)  { animation-delay: 0.08s; }
.event-card:nth-child(3)  { animation-delay: 0.12s; }
.event-card:nth-child(4)  { animation-delay: 0.16s; }
.event-card:nth-child(5)  { animation-delay: 0.20s; }
.event-card:nth-child(6)  { animation-delay: 0.24s; }
.event-card:nth-child(7)  { animation-delay: 0.28s; }
.event-card:nth-child(8)  { animation-delay: 0.31s; }
.event-card:nth-child(9)  { animation-delay: 0.34s; }
.event-card:nth-child(10) { animation-delay: 0.36s; }
.event-card:nth-child(11) { animation-delay: 0.38s; }
.event-card:nth-child(12) { animation-delay: 0.40s; }

/* ══════════════════════════════════════
   MOBILE TWEAKS
   ══════════════════════════════════════ */
@media (max-width: 576px) {
    .ev-img-wrap   { height: 150px; }
    .ev-date-day   { font-size: 1rem; }
    .ev-title      { font-size: 0.88rem; }
    .ev-body       { padding: 0.8rem 0.85rem 0.75rem; }
}
