/* ========================================
   RACE CARDS - ULTRA MODERN DESIGN
   ======================================== */

.race-card-modern {
    background: linear-gradient(135deg, rgba(36, 91, 163, 0.08), rgba(30, 36, 51, 0.95));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 28px;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.race-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0052A3, #DE2731, #0052A3);
    background-size: 200% 100%;
    animation: gradientMove 4s ease infinite;
}

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

.race-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(36, 91, 163, 0.4);
    border-color: rgba(36, 91, 163, 0.5);
}

.race-card-modern:hover .race-date-badge {
    transform: scale(1.05);
}

.race-date-badge {
    background: linear-gradient(135deg, #0052A3, #1a4a8a);
    color: white;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    min-width: 90px;
    box-shadow: 0 8px 24px rgba(36, 91, 163, 0.5);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.race-date-month {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
    margin-bottom: 6px;
}

.race-date-day {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.race-flag {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.race-card-modern:hover .race-flag {
    transform: scale(1.1);
    border-color: rgba(36, 91, 163, 0.5);
}

.race-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.race-flag i {
    font-size: 28px;
    color: #0052A3;
}

.race-info {
    flex: 1;
    min-width: 0;
}

.race-name {
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 14px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.race-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.race-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #A0AEC0;
    font-weight: 500;
}

.race-detail-item i {
    width: 22px;
    text-align: center;
    font-size: 16px;
    color: #4A90E2;
}

.race-detail-item strong {
    color: #FFFFFF;
    font-weight: 600;
}

.race-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.race-tech-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-spec-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tech-spec-label {
    font-size: 11px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.tech-spec-value {
    font-size: 16px;
    color: #FFFFFF;
    font-weight: 700;
}

.race-track-preview {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(0, 82, 163, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.race-card-modern:hover .race-track-preview {
    transform: scale(1.05);
    border-color: #0052A3;
    box-shadow: 0 8px 24px rgba(0, 82, 163, 0.3);
}

.race-track-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
    filter: none;
}

/* Race status badges - Modern style */
.badge-scheduled {
    background: linear-gradient(135deg, #4A90E2, #2c7bc7);
    animation: pulse-scheduled 2s infinite;
}

.badge-ongoing {
    background: linear-gradient(135deg, #ECC94B, #d69e2e);
    animation: pulse-ongoing 1.5s infinite;
}

.badge-completed {
    background: linear-gradient(135deg, #48BB78, #38a169);
}

.badge-cancelled {
    background: linear-gradient(135deg, #F56565, #e53e3e);
}

@keyframes pulse-scheduled {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(74, 144, 226, 0); }
}

@keyframes pulse-ongoing {
    0%, 100% { box-shadow: 0 0 0 0 rgba(236, 201, 75, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(236, 201, 75, 0); }
}

/* Upcoming Races Section */
.upcoming-races {
    background: linear-gradient(135deg, rgba(36, 91, 163, 0.05), rgba(30, 36, 51, 0.6));
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.upcoming-races h3 {
    font-size: 26px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.upcoming-races h3::before {
    content: '';
    width: 4px;
    height: 32px;
    background: linear-gradient(180deg, #0052A3, #DE2731);
    border-radius: 2px;
}

.race-item {
    background: linear-gradient(135deg, rgba(36, 91, 163, 0.08), rgba(30, 36, 51, 0.4));
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.race-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0052A3, #DE2731);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.race-item:hover {
    transform: translateX(8px);
    border-color: rgba(36, 91, 163, 0.4);
    box-shadow: 0 8px 24px rgba(36, 91, 163, 0.2);
}

.race-item:hover::before {
    opacity: 1;
}

.race-item:last-child {
    margin-bottom: 0;
}

.race-item h4 {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.race-item h4::before {
    content: '🏁';
    font-size: 20px;
}

.race-item p {
    font-size: 14px;
    color: #A0AEC0;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.race-item p i {
    color: #0052A3;
    width: 18px;
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #A0AEC0;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .race-card-modern {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .race-track-preview {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 768px) {
    .race-card-modern {
        flex-direction: column;
        padding: 20px;
    }
    
    .race-date-badge {
        align-self: flex-start;
    }
    
    .race-track-preview {
        width: 100%;
        height: 200px;
        max-width: 100%;
    }
    
    .race-tech-specs {
        grid-template-columns: repeat(2, 1fr);
    }
}
