@import url('https://fonts.googleapis.com/css2?family=Sarina&family=Pacifico&display=swap');

:root {
    --color-primary: #40E0D0;
    /* Turquoise */
    --color-secondary: #FFD700;
    /* Sunny Yellow */
    --color-accent: #ff6b6b;
    /* Sunset Red/Pink for excitement */
    --color-dark: #004d40;
    /* Deep Teal/Green */
    --color-text: #0f172a;
    /* Navy Blue/Black */
    --color-light: #F5F5DC;
    /* Cream/Sand */
    --color-white: #ffffff;



    --font-hero: "Sarina", cursive;
    --font-heading: "Pacifico", cursive;
    --font-body: 'Nunito', sans-serif;

    --spacing-section: 8rem;
    /* Increased for better separation with angles */
    --skew-angle: -3deg;
    --skew-angle-rev: 3deg;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    align-content: center;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-light);
    color: var(--color-text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--color-dark);
    /*text-transform: uppercase;*/
}

h1 {
    font-size: 3.5rem;
    transform: skewX(var(--skew-angle));
    /* Skew headings for effect */
    display: inline-block;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-dark);
    display: inline-block;
    position: relative;
    z-index: 10;
}

h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: #334155;
}

.text-accent {
    color: var(--color-primary);
}

.text-white {
    color: var(--color-white);
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--color-secondary);
    color: var(--color-dark);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    text-decoration: none;
    /* Angled shape */
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: all 0.3s;
    border: none;
    /*text-transform: uppercase;*/
    letter-spacing: 1px;
    position: relative;
}

.btn:hover {
    transform: translate(-3px, -3px);
    background-color: var(--color-white);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    box-shadow: 5px 5px 0 var(--color-accent);
}

.btn:active {
    transform: translate(0, 0);
    box-shadow: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-dark);
}

.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}
.btn-big {
    padding-right:4.5rem;
    padding-left:4.5rem;
}


/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    transition: padding 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
    transition: all 0.3s;
}

header.scrolled {
    padding: 1rem 2rem;
    background: transparent;
}

header.scrolled::before {
    background: transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-light);
    text-decoration: none;
    letter-spacing: 1px;
    transform: skewX(var(--skew-angle));
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    transform: skewX(var(--skew-angle-rev));
}

header.theme-light .logo {
    color: var(--color-dark);
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--color-light);
    font-weight: 800;
    /*text-transform: uppercase;*/
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: color 0.3s;
    position: relative;
}

header.theme-light nav>ul>li>a:not(.btn) {
    color: var(--color-dark);
}

header.theme-light nav a::before {
    background: var(--color-dark);
}

@media (max-width: 768px) {
    nav a {
        color: var(--color-dark);
    }
}

nav a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--color-primary);
    transition: width 0.3s;
    transform: skewX(var(--skew-angle));
}

nav a:hover {
    color: var(--color-primary);
}

nav a:hover::before {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: -10px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 60%;
    left: -1rem;
    background-color: var(--color-dark);
    /* Dark background for contrast */
    min-width: 220px;
    padding: 1rem 0;
    z-index: 1000;
    flex-direction: column;
    gap: 0;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 90% 100%, 0 100%);
}

/* Only trigger hover on desktop */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        display: flex;
        animation: fadeInUp 0.2s ease-out;
    }
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    color: var(--color-white);
    text-transform: capitalize;
    transition: all 0.2s;
    letter-spacing: normal;
    white-space: nowrap;
}

.dropdown-menu a::before {
    display: none;
    /* Remove underline effect for dropdown items */
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
    transform: translateX(5px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0px);
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    margin-left: 8rem;
}

.mobile-menu-btn span {
    display: block;
    width: 30px;
    height: 4px;
    background-color: var(--color-dark);
    transform: skewX(var(--skew-angle));
    transition: background-color 0.3s;
}

header.theme-light .mobile-menu-btn span {
    background-color: var(--color-dark);
}

header:not(.theme-light) .mobile-menu-btn span {
    background-color: var(--color-light);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--color-dark);
    padding: 2rem;
    /* Angled bottom */
    clip-path: polygon(0 0, 100% 0, 100% 90vh, 0 100%);
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
}

/* Overlay to darken video */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    text-align: center;
    /* Skew the container */
    transform: skewY(var(--skew-angle));
}

.hero-content>* {
    /* Unskew content */
    transform: skewY(var(--skew-angle-rev));
}

.hero-supertitle {
    display: block;
    font-family: var(--font-body);
    font-weight: 800;
    /*text-transform: uppercase;*/
    letter-spacing: 0.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
    /*background: var(--color-dark);*/
    display: inline-block;
    padding: 0.5rem 1rem;
    /*transform: skewX(var(--skew-angle)) skewY(var(--skew-angle-rev)) !important;*/
    /* Double transform fix */
}

.hero h1 {
    font-family: var(--font-hero);
    font-size: clamp(2.5rem, 5vw, 3rem);
    transform: skewX(var(--skew-angle)) skewY(var(--skew-angle-rev)) !important;
    margin-bottom: 1rem;
    color: var(--color-white);
    /*text-shadow: 5px 5px 0px var(--color-primary);*/
    line-height: 0.9;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-light);
    font-weight: 300;
    transform: skewY(var(--skew-angle-rev));
}

/* About Section */
.about {
    padding: var(--spacing-section) 2rem;
    background-color: var(--color-white);
    position: relative;
    margin-top: -6rem;
    /* Overlap caused by hero clip */
    padding-top: 10rem;
    /* Compensate for overlap */
    z-index: 5;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    /* Angled image frame */
    clip-path: polygon(10% 0, 100% 10%, 90% 100%, 0 90%);
    transition: clip-path 0.5s;
    filter: sepia(20%);
}

.about-image:hover img {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    filter: none;
}

/* Race Categories */
.races-intro {
    background-color: var(--color-light);
    padding: var(--spacing-section) 2rem 5rem;
    margin-top: -5rem;
    padding-top: 8rem;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
    position: relative;
    z-index: 4;
}

.races-container {
    width: 100%;
}

.race-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    background-attachment: scroll;
    overflow: hidden;
    padding: 4rem 0;
    /* Zig-zag separators */
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 95%);
    margin-top: -4rem;
    z-index: 3;
    /* Fly-in animation */
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.race-section:nth-of-type(2n) {
    transform: translateX(60px);
}

.race-section.in-view {
    opacity: 1;
    transform: translateX(0);
}

.race-section:nth-child(even) {
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
}

.race-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.race-content-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    /* Default right alignment */
    padding: 0 2rem;
}

.race-section:nth-child(even) .race-content-wrapper {
    justify-content: flex-start;
    /* Alternate alignment */
}


.race-content-box {
    width: 100%;
    max-width: 600px;
    padding: 4rem 4rem;
    color: var(--color-white);
    position: relative;
    /* Skewed box container */
    transform: skewX(var(--skew-angle));
    backdrop-filter: blur(10px);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.2);
}

/* Unskew content inside box */
.race-content-box>* {
    transform: skewX(var(--skew-angle-rev));
}

/* Color Variants for the content box background */
.race-content-box.theme-teal {
    background: rgba(0, 77, 64, 0.9);
    border-left: 5px solid var(--color-primary);
}

.race-content-box.theme-pink {
    background: rgba(255, 107, 107, 0.9);
    border-left: 5px solid var(--color-dark);
}

.race-content-box.theme-blue {
    background: rgba(15, 23, 42, 0.9);
    border-left: 5px solid var(--color-secondary);
}

.race-header {
    margin-bottom: 2rem;
}

.race-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--color-white);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.5rem;
    margin-bottom: 0.5rem;
}

.race-title {
    font-size: 3.5rem;
    /*text-transform: uppercase;*/
    line-height: 1;
    color: var(--color-white);
    margin: 0;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.race-details-list {
    list-style: none;
    margin: 2rem 0 2rem 0;
}

.race-details-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.race-details-list strong {
    color: var(--color-secondary);
    font-size: 1.4rem;
    display: block;
    font-family: var(--font-heading);
}

.race-meta {
    font-size: 1.2em;
    opacity: 1;
    display: block;
    margin-top: 0.2rem;
    font-weight: 300;
}

/* Custom Button for Races */
.btn-race {
    display: inline-flex;
    align-items: center;
    background-color: var(--color-white);
    color: var(--color-dark);
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    /*font-weight: 800;*/
    text-decoration: none;
    font-size: 1.6rem;
    letter-spacing: 1px;
    border: none;
    position: relative;
    transition: all 0.3s ease;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn-race:hover {
    background-color: var(--color-secondary);
    transform: translate(5px, -5px);
    box-shadow: -5px 5px 0 var(--color-dark);
}

.vertical-label {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    color: rgba(255, 255, 255, 0.1);
    font-weight: 900;
    font-size: 8rem;
    line-height: 1;
    text-transform: uppercase;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
}

.race-section:nth-child(even) .vertical-label {
    right: auto;
    left: 2rem;
    transform: translateY(-50%);
    /* No rotation needed for left side typically, or rotate(0) */
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
}

/* Partners Section */
.partners {
    padding: var(--spacing-section) 2rem;
    background-color: var(--color-white);
    clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 100%);
    margin-top: -4rem;
    position: relative;
    z-index: 2;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.card {
    background: var(--color-light);
    padding: 2rem 2rem;
    /* Skewed Card */
    transform: skewX(var(--skew-angle));
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, background 0.3s;
    position: relative;
}

.card>* {
    transform: skewX(var(--skew-angle-rev));
}

.card:hover {
    transform: skewX(var(--skew-angle)) translateY(-10px);
    background: var(--color-white);
    box-shadow: 10px 10px 0 var(--color-secondary);
    z-index: 10;
}

.card-tag {
    display: inline-block;
    background: var(--color-dark);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1.5rem;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
}

.partner-logo {
    max-width: 40%;
    margin: 0 auto;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.3s;
}
@media (max-width: 768px) {
    .partner-logo {
        max-width: 80%;
    }
}

.card:hover .partner-logo {
    filter: grayscale(0%);
}

/* Route Section */
.route {
    padding: var(--spacing-section) 2rem;
    background-color: var(--color-dark);
    color: var(--color-white);
    text-align: center;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
    margin-top: -4rem;
    position: relative;
    z-index: 1;
}

.route h2 {
    color: var(--color-secondary);
}

.route p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

/* Important Notes */
.important-notes {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 3rem 2rem;
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
    margin-top: -2rem;
}

.important-notes .content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.notes-list {
    list-style: none;
    /* remove default bullets */
}

.notes-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    gap: 1rem;
}

.note-index {
    font-weight: 800;
    color: var(--color-dark);
}


/* Footer */
footer {
    background-color: var(--color-text);
    color: var(--color-white);
    padding: 4rem 2rem 0rem;
    clip-path: polygon(0 5%, 100% 0, 100% 100%, 0 100%);
    margin-top: -3rem;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: left;
}

.brand h3 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.footer-logo {
    height: 120px;
    width: auto;
    margin-bottom: 1rem;
}

.brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
}

.widget-title {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transform: skewX(var(--skew-angle));
    display: inline-block;
}

.widget-content ul {
    list-style: none;
    padding: 0;
}

.widget-content li {
    margin-bottom: 0.6rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    line-height: 1.4;
}

.widget-content i {
    color: var(--color-secondary);
    margin-top: 4px;
}

.widget-content a {
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s;
}

.widget-content a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.socials {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.socials a {
    color: var(--color-primary);
    font-size: 1.5rem;
    transition: transform 0.2s;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Angled social icons */
    clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
}

.socials a:hover {
    transform: translateY(-5px);
    background: var(--color-secondary);
    color: var(--color-dark);
}

/* Utility Class for Oblique Sections */
.section-oblique {
    position: relative;
    padding: var(--spacing-section) 2rem;
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    margin-top: -6rem;
    z-index: 1;
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --skew-angle: 0deg;
        --skew-angle-rev: 0deg;
        --spacing-section: 4rem;
    }

    /* Reset aggresive angle clips for mobile to be more subtle or flat */
    .hero,
    .about,
    .races-intro,
    .race-section,
    .partners,
    .route,
    footer,
    .important-notes {
        clip-path: none;
        margin-top: 0;
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    /* Keep slight angle for hero bottom */
    .hero {
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    }

    h1 {
        font-size: 2.5rem;
        transform: none;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-content {
        transform: none;
    }

    .hero-content>* {
        transform: none;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 85%;
        background: var(--color-light);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        align-items: center;
        z-index: 999;
        border-radius: 20px 0 0 20px;
    }

    nav ul.active {
        display: flex;
    }

    /* Mobile Dropdown adjustments */
    .dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* Hide sub-menu by default on mobile */
    .dropdown-menu {
        position: static;
        display: none;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 2rem;
        background: rgba(0, 0, 0, 0.05);
        width: 100%;
        text-align: center;
        margin-top: 1rem;
        min-width: auto;
        clip-path: none;
    }

    /* Show when parent is active (toggled via JS) */
    .dropdown.active .dropdown-menu {
        display: flex;
        animation: fadeIn 0.3s;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .dropdown-menu a {
        padding: 0.5rem;
        font-size: 0.9rem;
        color: var(--color-dark);
    }

    .dropdown-menu a:hover {
        transform: none;
        color: var(--color-primary);
    }

    .race-section {
        flex-direction: column;
        text-align: center;
        background-attachment: scroll;
        min-height: 520px;
        border-radius: 20px;
        margin: 1rem auto;
        width: calc(100% - 2rem);
        max-width: 100%;
        overflow: hidden;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    }

    .race-overlay-dark {
        background: linear-gradient(to top,
                rgba(0, 0, 0, 0.85) 0%,
                rgba(0, 0, 0, 0.5) 40%,
                rgba(0, 0, 0, 0.2) 100%);
    }

    .race-content-wrapper {
        justify-content: center;
        align-items: flex-end;
        padding: 1rem 1rem;
        height: 100%;
    }

    .race-section:nth-child(even) .race-content-wrapper {
        justify-content: center;
    }

    .race-content-box {
        width: 100%;
        transform: none;
        max-width: 100%;
        background: none !important;
        border-left: none !important;
        box-shadow: none;
        backdrop-filter: none;
        padding: 1rem;
        opacity: 0.85;
        border-radius: 1rem;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .race-content-box>* {
        transform: none;
    }

    .race-title {
        font-size: 2.5rem;
    }

    .race-details-list {
        margin: 0;
        padding: 0;
    }

    .race-details-list li {
        margin-bottom: 1rem;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding-bottom: 0.5rem;
    }

    .race-meta {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .btn-race {
        width: 100%;
        justify-content: center;
    }

    .vertical-label {
        display: none;
    }

    .card {
        transform: none;
    }

    .card>* {
        transform: none;
    }

    .card:hover {
        transform: translateY(-5px);
    }
}

/* Breadcrumb */
.breadcrumb-section {
    padding: 8rem 2rem 2rem;
    /* Top padding accounts for fixed header */
    background-color: var(--color-light);
    text-align: center;
}

.breadcrumb {
    display: inline-flex;
    list-style: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--color-white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--color-secondary);
}

.breadcrumb a {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 600;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--color-primary);
}

.breadcrumb li:last-child {
    color: var(--color-primary);
    font-weight: 800;
}

/* FAQ Section */
.faq-page {
    padding: 4rem 2rem var(--spacing-section);
    background-color: var(--color-light);
    min-height: 60vh;
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.accordion-item {
    background: var(--color-white);
    border-radius: 12px;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    border-color: rgba(64, 224, 208, 0.3);
    /* Subtle primary color border on hover */
}

.accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-dark);
    transition: color 0.3s;
}


/* Sidebar Layout */
.grid-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .grid-sidebar {
        grid-template-columns: 1fr 2fr;
    }
}

.sidebar-widget {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-widget h4 {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--color-light);
    padding-bottom: 0.5rem;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.5rem;
}

.sidebar-widget li::before {
    content: "•";
    color: var(--color-secondary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.rules-content h4 {
    color: var(--color-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-secondary);
    display: inline-block;
}

.rules-content ul {
    list-style: none;
    margin-bottom: 2rem;
}

.rules-content li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.rules-content li::before {
    content: "➝";
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.accordion-icon {
    font-size: 1.5rem;
    color: var(--color-secondary);
    transition: transform 0.3s ease;
    /* Ensure icon doesn't shrink */
    flex-shrink: 0;
    margin-left: 1rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
    /* Make + turn into x */
    color: var(--color-accent);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding: 0 1.5rem;
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.5rem 1.5rem;
    /* Re-apply padding when open */
    max-height: 500px;
    /* Arbitrary large number, or use JS to set scrollHeight */
}

/* Coming Soon Section */
.coming-soon {
    padding: var(--spacing-section) 2rem;
    text-align: center;
    background-color: var(--color-white);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.coming-soon i {
    font-size: 4rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

.coming-soon h2 {
    color: var(--color-dark);
    margin-bottom: 1rem;
    font-size: 3rem;
}

.coming-soon p {
    color: var(--color-text);
    max-width: 600px;
    font-size: 1.25rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* Route Map Section */
.route-map-section {
    padding: var(--spacing-section) 2rem;
    background-color: var(--color-light);
    text-align: center;
}

.route-map-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.route-map-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    border: 4px solid var(--color-dark);
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.1);
    background-color: var(--color-white);
}

.route-map-caption {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--color-text);
    opacity: 0.8;
}

/* Custom Added Classes to replace inline styles */
.container-main {
    max-width: 1200px;
    margin: 0 auto;
}

.bg-swim {
    background-image: url('../assets/images/swim_background.webp');
}

.bg-cycle {
    background-image: url('../assets/images/cycle_background.webp');
}

.bg-run {
    background-image: url('../assets/images/run_background.webp');
}

@media (max-width: 768px) {
    .bg-swim {
        background-position: 62% 0;
    }

    .bg-cycle {
        background-position: 8% 0px;
    }

    .bg-run {
        background-position: 80% 0px;
    }
}

.rules-page {
    padding: var(--spacing-section) 2rem;
    background-color: var(--color-light);
}

.rules-grid-mt-3 {
    margin-top: 3rem;
    align-items: start;
    gap: 2rem;
}

.rules-grid-mt-2 {
    margin-top: 2rem;
    align-items: start;
    gap: 2rem;
}

/*.socials-start {
    justify-content: flex-start;
}*/

/* Mobile Fly-in Animation for Race Cards */
@media (max-width: 768px) {
    .race-section {
        transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.8s ease-out;
        opacity: 0;
        will-change: transform, opacity;
    }

    .race-section.in-view {
        transform: translateX(0) skewX(var(--skew-angle));
        opacity: 1;
    }
}

.brand {
    text-align: center;
}