/*Race Page*/
/* ------------------------------
   MOBILE-FRIENDLY LAYOUT
------------------------------ */

.race-container {
    width: 95%;
    max-width: 750px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.race-header-main {
    font-size: 22pt;
    font-weight: bold;
    text-align: center;
    color: white;
    background: red;
    padding: 10px 0;
}

.race-header-sub {
    font-size: 14pt;
    color: white;
    background: black;
    text-align: center;
    padding: 6px 0;
}

/* Race list */
.race-year-title {
    font-size: 16pt;
    font-weight: bold;
    margin-top: 1em;
}

.race-item {
    margin-bottom: 6px;
}

.race-toggle {
    display: block;
    padding: 8px;
    background: #eee;
    border-radius: 4px;
    text-decoration: none;
    color: #000;
    font-size: 12pt;
}

.race-toggle:hover {
    background: #ddd;
}

/* Fly-out panel */
.race-flyout {
    display: none;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #ccc;
    margin: 8px 0 12px 0;
    border-radius: 4px;
}

/* Results table */
.race-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 10pt;
    margin-top: 10px;
    background: white;
}

.race-table th {
    background: black;
    color: white;
    border: 1px solid #999;
    padding: 4px 6px;
    text-align: left;
}

.race-table td {
    border: 1px solid #ccc;
    padding: 4px 6px;
}

.race-table tr:nth-child(even) {
    background: #f9f9f9;
}

/* Photos */
.race-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.race-photo-item {
    width: 160px;
    text-align: center;
}

.race-photo-item img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
}

.race-photo-caption {
    font-size: 10pt;
    margin-top: 4px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .race-photo-item {
        width: 48%;
    }
    .race-table th, .race-table td {
        font-size: 9pt;
        padding: 3px;
    }
}
