/* ============================================
   EVENTS SECTION - 100% NEW DESIGN
   Futuristic Motorsport GUI
   ============================================ */

/* Note: Variables inherited from tokens.css */

/* ── Section Header ── */
.events-section {
    margin: 5rem auto;
    position: relative;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
    color: var(--color-primary);
    text-shadow:
        0 0 20px rgba(230, 0, 0, 0.5),
        0 0 40px rgba(230, 0, 0, 0.3);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60%;
    height: 3px;
    background: var(--gradient-primary);
    box-shadow: 0 0 10px rgba(230, 0, 0, 0.6);
}

/* ── Event Card (Race) ── */
.event-card-race {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 550px;
    background: var(--gradient-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(230, 0, 0, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 40px rgba(230, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-card-race::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg,
            rgba(0, 0, 0, 0.03),
            rgba(0, 0, 0, 0.03) 2px,
            transparent 2px,
            transparent 4px);
    pointer-events: none;
    z-index: 1;
}

.event-card-race:hover {
    transform: translateY(-8px);
    border-color: rgba(230, 0, 0, 0.6);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 60px rgba(230, 0, 0, 0.3);
}

/* Event Image */
.event-card-image {
    position: relative;
    width: 100%;
    height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    z-index: 2;
}

.event-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
    transition: opacity var(--transition-normal);
}

.event-card-race:hover .event-card-image::before {
    opacity: 0.7;
}

/* Date Badge */
.race-date-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 12px 8px;
    background: linear-gradient(135deg, rgba(230, 0, 0, 0.95) 0%, rgba(179, 0, 0, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 20px rgba(230, 0, 0, 0.6);
    transition: all var(--transition-normal);
}

.event-card-race:hover .race-date-badge {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(230, 0, 0, 0.8);
}

.race-day {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.race-month {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
}

/* Status Badge */
.race-status {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all var(--transition-normal);
}

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

/* Content Area */
.race-content {
    padding: 1.5rem;
    flex-grow: 1;
    z-index: 3;
    position: relative;
}

.race-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(230, 0, 0, 0.4);
    background: linear-gradient(135deg, #FFFFFF 0%, #FFE0E0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.race-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.race-meta i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-primary-light);
}

/* Footer & Progress */
.race-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    z-index: 3;
    position: relative;
}

.race-progress-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
}

.race-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(230, 0, 0, 0.6);
    animation: progressGlow 2s ease-in-out infinite;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes progressGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Register Button */
.btn-race {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(230, 0, 0, 0.4);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-race:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(230, 0, 0, 0.6);
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 992px) {
    .event-card-race {
        min-height: 520px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
    }

    .event-card-race {
        min-height: 500px;
    }

    .event-card-image {
        height: 220px;
    }

    .race-title {
        font-size: 1.25rem;
    }
}

/* Legacy Overrides Cleaned:
   - flex-between -> layout.css
   - grid-* -> layout.css
   - card-glass -> components.css
*/