:root {
    --dark-blue: #1a2a6c;
    --race-red: #b21f1f;
    --slogan-orange: #fdbb2d;
    --text-color: #333;
    --content-font: monospace, sans-serif;
    --header-font: 'Impact', sans-serif;
    --backround-color: #f8f9fa;
    --section-spacing: 30px;
}

body {
    font-family: var(--content-font);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    font-size: 1.2rem;
    background-color: var(--backround-color);
}

.logo {
    height: 8rem;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

h2 {
    font-family: var(--header-font);
    border-bottom: 2px solid var(--dark-blue);
    letter-spacing: 1.5px;
    display: inline-block;
    color: var(--dark-blue);
    margin-top: var(--section-spacing);
    margin-bottom: 20px;
    clear: both;
}

.slogan {
    background: linear-gradient(135deg, var(--dark-blue), var(--race-red), var(--slogan-orange));
    color: white;
    font-family: var(--header-font);
    text-shadow: 1px 1px 2px black, 0 0 25px var(--dark-blue), 0 0 5px var(--dark-blue);
    padding: 20px;
    border: 3px solid var(--slogan-orange);
    box-shadow: 0px 0px 15px 5px var(--slogan-orange);
    border-radius: 10px;
    display: inline-block;
    transition: all 0.3s ease;
}

.slogan:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 20px 10px var(--race-red);
}

.hard {
    font-weight: bold;
    font-size: 1.2rem;
}

.harder {
    font-weight: bolder;
    font-size: 1.4rem;
}

main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

article {
    margin-bottom: var(--section-spacing);
}

section {
    width: 80%;
    align-self: center;
    flex: 9;
    font-family: var(--content-font);
    color: var(--text-color);
    background-color: #f8f9fa;
    border-left: 4px solid var(--race-red);
    padding: 1rem 2rem;
    margin: var(--section-spacing) 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.6;
    transition: all 0.2s ease-in-out;
    border-radius: 0 8px 8px 0;
}

section:hover {
    background-color: #e9ecef;
    border-left-color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.center{
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    align-items: center;
    flex-wrap: wrap;
}

.center a, .center img {
    display: block;
    margin: 10px auto;
    max-width: 100%;
}

table{
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 20px auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    max-width: 800px;
}

td, th {
    text-align: left;
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: var(--dark-blue);
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #e2e2e2;
}

header {
    flex: 1;
    font-family: var(--header-font);
    display: flex;
    width: 100%;
    color: var(--dark-blue);
    text-align: center;
    padding: 20px 0;
    justify-content: space-around;
    align-items: center;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

footer {
    background: linear-gradient(to right, var(--dark-blue), var(--race-red));
    color: white;
    padding: 15px;
    text-align: center;
    border-top: 1px solid var(--text-color);
    width: 100%;
    flex: 1;
    display: flex;
    justify-content: space-around;
    max-height: 3rem;
    margin-top: auto;
}

a {
    text-decoration: none;
    color: #e9ecef;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

small {
    font-size: 0.9rem
}

.powered {
    font-size: 0.6rem;
}

em {
    font-weight: bold;
    font-style: normal;
}

.textlink {
    color: var(--text-color);
    text-decoration: underline;
    font-family: var(--content-font);
    font-weight: bold;
    transition: color 0.2s ease;
}

.textlink:hover {
    color: var(--race-red);
}

.event-list {
    font-family: var(--content-font);
    color: var(--text-color);
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 20px auto;
    border-left: 4px solid var(--slogan-orange);
}

.event-list ol {
    list-style-position: inside;
    padding-left: 0;
}

.event-list li {
    margin-bottom: 15px;
    position: relative;
    transition: transform 0.2s ease;
    padding-left: 0;
}

.event-list li:hover {
    transform: translateX(5px);
}

.next-race {
    background: linear-gradient(to right, rgba(253, 187, 45, 0.1), rgba(178, 31, 31, 0.1));
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 6px;
    border-left: 3px solid var(--race-red);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.next-race:after {
    content: "NEXT RACE!";
    position: absolute;
    top: -10px;
    right: 10px;
    background-color: var(--race-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    letter-spacing: 1px;
    z-index: 1;
}

.next-race .textlink {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--race-red);
    display: inline-block;
    margin-left: 5px;
}

.next-race strong {
    display: inline-block;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@media (max-width: 850px) {
    .desktop {
        display: none;
    }

    header {
        flex-direction: column;
        padding: 10px 0;
    }

    .logo {
        height: 6rem;
        margin: 10px 0;
    }

    .slogan {
        font-size: 1.5rem;
        padding: 15px;
        margin: 10px;
        text-align: center;
    }

    section {
        width: 90%;
        padding: 1rem 1.5rem;
        border-radius: 0 6px 6px 0;
    }

    table {
        width: 100%;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        border-radius: 6px;
    }

    .center {
        flex-direction: column;
        align-items: center;
    }

    .event-list {
        width: 95%;
        padding: 15px;
    }

    footer {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 20px 0;
        max-height: none;
    }

    .hard {
        font-size: 1.1rem;
    }

    .harder {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    body {
        font-size: 1rem;
    }

    .center img {
        max-width: 80%;
        margin: 15px auto;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 4rem;
    }

    .slogan {
        font-size: 1.2rem;
        padding: 10px;
    }

    section {
        width: 95%;
        border-left: none;
        border-top: 4px solid var(--race-red);
        border-radius: 0 0 6px 6px;
    }

    .event-list li {
        padding-left: 15px;
    }
    
    td, th {
        padding: 8px 10px;
    }
}

.fundraising-img{
    width: 100%;
    height: auto;
    max-width: 60%;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: block;
}

.fundraising-img:hover {
    transform: scale(1.02);
}

.project-entry {
    margin: 30px 0;
}

.project-name {
    background: linear-gradient(135deg, var(--dark-blue), var(--race-red));
    padding: 10px 18px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    position: relative;
    border-left: 4px solid var(--slogan-orange);
    transition: all 0.3s ease;
    overflow: hidden;
}

.project-name:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 20px;
    background: repeating-linear-gradient(
        45deg,
        var(--slogan-orange),
        var(--slogan-orange) 5px,
        transparent 5px,
        transparent 10px
    );
    opacity: 0.7;
}

.project-name:before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(
        to right,
        var(--dark-blue),
        var(--dark-blue) 10px,
        var(--slogan-orange) 10px,
        var(--slogan-orange) 20px
    );
}

.project-name:hover {
    transform: translateY(-2px) skewX(-2deg);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

.project-name a {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    display: inline-block;
    position: relative;
    padding-left: 5px;
    transition: all 0.3s ease;
}

.project-name a:before {
    width: 8px;
    height: 8px;
    background-color: var(--slogan-orange);
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.project-name:hover a {
    transform: translateX(3px);
}

.project-name:hover a:before {
    transform: scale(1.3);
}

footer a {
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

footer a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.completed {
    color: #888;
    font-style: italic;
    font-size: 0.9em;
    margin-left: 5px;
    text-decoration: none;
    background-color: rgba(178, 31, 31, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

li:has(.completed) {
    opacity: 0.6;
    color: #888;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    padding: 5px;
}

li:has(.completed) *:not(.completed) {
    text-decoration: line-through;
}

details {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

summary {
    cursor: pointer;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--dark-blue), var(--race-red));
    color: white;
    font-weight: bold;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
}

summary::after {
    content: "+";
    font-size: 1.5em;
    margin-left: 10px;
    font-weight: bold;
    transition: transform 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

details[open] summary::after {
    content: "-";
    transform: rotate(180deg);
}

summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

details[open] summary {
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
}

.result-year {
    font-size: 1.2em;
    font-weight: 800;
    letter-spacing: 1px;
    background: var(--slogan-orange);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    display: inline-block;
}

.trophy-icon {
    font-size: 1.4em;
    margin-left: auto;
    margin-right: 15px;
    display: inline-block;
    animation: trophyShine 2s infinite;
    color: gold;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
}

@keyframes trophyShine {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(5deg) scale(1.2); text-shadow: 0 0 8px rgba(255, 215, 0, 0.9); }
    100% { transform: rotate(0deg) scale(1); }
}