/* ==========================================================================
   Project North Star - Main Stylesheet
   Clean, balanced stylesheet rebuilt from the approved site styles.
   Author: Rory & OpenAI
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared header and hamburger navigation
   -------------------------------------------------------------------------- */

.site-header {
    position: relative;
    background-color: #213b86;
    color: white;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 20px;
}

.logo {
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
}

.hamburger {
    display: flex;
    width: 48px;
    height: 48px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: white;
    cursor: pointer;
}

.hamburger:hover,
.hamburger:focus-visible {
    background-color: rgba(255, 255, 255, 0.15);
}

.hamburger:focus-visible {
    outline: 3px solid #ffcdd9;
    outline-offset: 2px;
}

.hamburger-icon {
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.topnav {
    position: absolute;
    z-index: 50;
    top: 100%;
    right: 20px;
    display: none;
    width: min(300px, calc(100vw - 40px));
    padding: 8px;
    box-sizing: border-box;
    background-color: #213b86;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0 0 7px 7px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.topnav.is-open {
    display: block;
}

.topnav a {
    display: block;
    cursor: pointer;
    padding: 13px 14px;
    color: white;
    text-align: left;
    text-decoration: none;
    font-size: 1.05rem;
    border-radius: 4px;
}

.topnav a:hover,
.topnav a:focus-visible {
    background-color: #3052b0;
    color: white;
}

.topnav a:focus-visible {
    outline: 3px solid #ffcdd9;
    outline-offset: -3px;
}

.topnav a.active {
    background-color: #ffcdd9;
    color: black;
}

.hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    text-align: center;
}

.hero h1 {
    color: #213b86;
    margin-bottom: 10px;
}

.race-date {
    font-size: 1.2rem;
    font-weight: bold;
    color: #213b86;
    margin-bottom: 20px;
}

.hero-image {
    width: 100%;
    max-width: 820px;
    height: auto;
    margin-top: 20px;
    border-radius: 8px;
}

.button {
    display: inline-block;
    cursor: pointer;
    background: #213b86;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    margin: 20px 0;
}

.button:hover {
    background: #3052b0;
}

.charity {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

footer {
    text-align: center;
    padding: 20px;
}

.about-race {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.about-race h2 {
    color: #213b86;
}

.content {
    max-width: 900px;
    margin: 15px auto 40px;
    padding: 20px;
    text-align: center;
}

.content h1 {
    margin-top: 0;
    margin-bottom: 20px;
}

.race-status-wrapper {
    text-align: center;
    margin: 18px 0 25px;
}

.race-status-bar {

    display: inline-flex;
    justify-content: center;
    align-items: center;

    width: 420px;
    max-width: calc(100% - 40px);
    min-height: 54px;

    background: #6EC6FF;
    color: #000;

    padding: 0 20px;

    font-weight: bold;

    border: 2px solid #213b86;
    border-radius: 8px;

    box-sizing: border-box;
}

.race-status-bar .button {
    margin: 0;
    background: #213b86;
    color: white;
}

.race-status-bar .button:hover {
    background: #3052b0;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    width: calc(100% - 40px);
    max-width: 700px;
    margin: 30px auto;
}

.results-grid .button {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px 8px;
    box-sizing: border-box;
    text-align: center;
}

@media screen and (max-width: 600px) {
    .results-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        width: calc(100% - 32px);
    }
}

.course-image {
    display: block;
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 30px auto 0;
    border-radius: 8px;
}

.site-identity {
    text-align: center;
    padding: 20px;
}

.race-name {
    margin: 0;
    color: #213b86;
    font-size: 1.7rem;
    font-weight: bold;
}

/* --------------------------------------------------------------------------
   Results Tables
   -------------------------------------------------------------------------- */

.results-table-wrapper {
    max-width: 900px;
    max-height: 75vh;
    margin: 30px auto;
    overflow-y: auto;
    border: 1px solid #CCCC66;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: #FFFFCC;
}

.results-table th {
    padding: 12px;
    color: #000;
    text-align: left;
    background: #FFFF66;
    border: 1px solid #CCCC66;
}

.results-table td {
    padding: 10px 12px;
    border: 1px solid #DDDD99;
}

.results-table tbody tr:nth-child(even) {
    background: #FFFFE6;
}

.results-table tbody tr:hover {
    background: #FFFF99;
}

.results-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.results-table tbody tr.category-winner {
    background: #00FFFF;
    font-weight: bold;
}

.results-table tbody tr.category-winner td {
    border-top: 2px solid #0099CC;
    border-bottom: 2px solid #0099CC;
}

@media screen and (max-width: 600px) {
    .results-table-wrapper {
        max-height: none;
        overflow-y: visible;
        border: 0;
    }
}

/* --------------------------------------------------------------------------
   2020 COVID Page
   -------------------------------------------------------------------------- */

.covid-message {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    text-align: center;
    background: #f5f5f5;
    border: 2px solid #213b86;
    border-radius: 8px;
}

.covid-message h2 {
    color: #213b86;
    margin-bottom: 10px;
}

.covid-message h3 {
    margin-bottom: 10px;
    color: #444;
}

.covid-message p {
    font-weight: bold;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Our Story
   -------------------------------------------------------------------------- */

.story-page {
    width: calc(100% - 40px);
    max-width: 900px;
    margin: 30px auto;
}

.story-introduction {
    margin-bottom: 35px;
    text-align: center;
}

.story-introduction h1 {
    color: #213b86;
    margin-bottom: 20px;
}

.story-introduction p {
    max-width: 760px;
    margin: 0 auto 16px;
    line-height: 1.7;
}

.story-chapter {
    margin: 0 auto 28px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #d8ddeb;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(33, 59, 134, 0.08);
}

.story-chapter h2 {
    color: #213b86;
    margin-top: 0;
    margin-bottom: 18px;
}

.story-chapter p {
    line-height: 1.7;
}

.story-milestone {
    margin-top: 22px;
    padding: 18px 20px;
    background: #f5f7fc;
    border-left: 4px solid #213b86;
    border-radius: 4px;
}

.story-milestone h3 {
    color: #213b86;
    margin: 0 0 8px;
}

.story-milestone p:last-child {
    margin-bottom: 0;
}

/* Project North Star feature chapter */

.north-star-chapter {
    padding: 34px;
    background: #eef7ff;
    border: 3px solid #213b86;
}

.north-star-label {
    margin: 0 0 6px;
    color: #000;
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.north-star-chapter h2 {
    margin-bottom: 24px;
    font-size: 2rem;
    text-align: center;
}

.north-star-chapter blockquote {
    max-width: 720px;
    margin: 25px auto;
    padding: 20px 24px;
    color: #213b86;
    font-size: 1.15rem;
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
    background: #ffffff;
    border-left: 5px solid #213b86;
    border-radius: 6px;
}

.north-star-achievements {
    max-width: 740px;
    margin: 20px auto;
    padding-left: 24px;
}

.north-star-achievements li {
    margin-bottom: 12px;
    line-height: 1.6;
}

.north-star-closing {
    margin-top: 26px;
    color: #213b86;
    font-size: 1.15rem;
    font-weight: bold;
    text-align: center;
}

/* Closing chapter */

.story-continues {
    text-align: center;
}

.story-continues p {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
}

.story-thanks {
    color: #213b86;
    font-size: 1.25rem;
    font-weight: bold;
}

/* Acknowledgements */

.story-acknowledgements {
    margin: 35px auto 0;
    padding: 25px;
    text-align: center;
    background: #f5f5f5;
    border-top: 3px solid #213b86;
    border-radius: 6px;
}

.story-acknowledgements h2 {
    color: #213b86;
    margin-top: 0;
}

.story-acknowledgements p {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
    line-height: 1.7;
}

.project-credit {
    margin-top: 25px;
}

/* Mobile adjustments */

@media screen and (max-width: 600px) {
    .story-page {
        width: calc(100% - 24px);
        margin-top: 20px;
    }

    .story-chapter {
        padding: 20px;
    }

    .north-star-chapter {
        padding: 22px 18px;
    }

    .north-star-chapter h2 {
        font-size: 1.6rem;
    }

    .north-star-chapter blockquote {
        padding: 16px;
        font-size: 1rem;
    }

    .story-milestone {
        padding: 15px;
    }
}

/* --------------------------------------------------------------------------
   Registration
   -------------------------------------------------------------------------- */

.registration-charity-message {
    max-width: 700px;
    margin: 25px auto;
    padding: 18px 22px;
    background: #6EC6FF;
    border-left: 5px solid #213b86;
    border-radius: 6px;
    color: #000;
    line-height: 1.6;
}

.registration-charity-message p {
    margin: 0;
}

.registration-runner-limit {
    margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Registration Form
   -------------------------------------------------------------------------- */

.registration-section {
    max-width: 700px;
    margin: 30px auto;
    padding: 24px;
    text-align: left;
    background: #ffffff;
    border: 1px solid #d8ddeb;
    border-radius: 8px;
    box-sizing: border-box;
}

.registration-section h2 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #213b86;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Standard Registration Fields
   -------------------------------------------------------------------------- */

.registration-field {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 22px;
}

.registration-field label {
    margin: 0;
    font-weight: bold;
    text-align: right;
}

.registration-field input {
    width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Gender and Age Group
   -------------------------------------------------------------------------- */

.registration-options {
    margin: 26px 0;
    padding: 18px 20px;
    border: 1px solid #d8ddeb;
    border-radius: 6px;
}

.registration-options legend {
    padding: 0 8px;
    color: #213b86;
    font-weight: bold;
}

.registration-options label {
    display: block;
    margin: 12px 0;
    cursor: pointer;
}

.registration-options input {
    margin-right: 8px;
}

/* --------------------------------------------------------------------------
   Declaration
   -------------------------------------------------------------------------- */

.registration-declaration {
    background: #f5f7fc;
}

.registration-declaration p {
    line-height: 1.6;
}

.registration-declaration label {
    display: block;
    margin-top: 18px;
    font-weight: bold;
}

/* --------------------------------------------------------------------------
   Mobile Registration Form
   -------------------------------------------------------------------------- */

@media screen and (max-width: 600px) {

    .registration-section {
        padding: 18px;
    }

    .registration-field {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-bottom: 20px;
    }

    .registration-field label {
        text-align: left;
    }

    .registration-options {
        padding: 15px;
    }
}

/* --------------------------------------------------------------------------
   Registration Review
   -------------------------------------------------------------------------- */

.registration-help {
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

.registration-copy-runner {
    margin: 22px 0 0;
    text-align: center;
    font-weight: bold;
}

.review-section {
    text-align: left;
}

.review-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.review-row:last-child {
    border-bottom: 0;
}

.registration-pricing-type {
    margin-top: 18px;
    text-align: center;
    font-weight: bold;
}

.registration-highlight {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px 24px;
    box-sizing: border-box;

    background: #6EC6FF;
    color: #000;

    border: 2px solid #213b86;
    border-radius: 8px;

    text-align: center;
}

.registration-highlight p {
    margin: 0;
}

.registration-payment-highlight strong {
    display: block;
    margin-top: 8px;
    font-size: 2rem;
    color: #213b86;
}

.registration-highlight-note {
    margin-top: 10px !important;
}

.registration-warning {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px 24px;
    box-sizing: border-box;

    background: #fff4e5;
    border: 2px solid #b35c00;
    border-radius: 8px;

    text-align: center;
}

.registration-warning ul {
    max-width: 620px;
    margin: 15px auto 0;
    text-align: left;
}

.registration-warning p {
    margin-bottom: 0;
}

.registration-confirmation {
    margin: 30px auto 10px;
    font-weight: bold;
}

.registration-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.registration-actions .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media screen and (max-width: 600px) {

    .review-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .registration-actions {
        gap: 8px;
    }

}
/* --------------------------------------------------------------------------
   Registration Holding Page
   -------------------------------------------------------------------------- */

.registration-holding-page {
    text-align: center;
}

.registration-holding-page p {
    text-align: center;
}

/* --------------------------------------------------------------------------
   Registration Medical Information
   -------------------------------------------------------------------------- */

.registration-medical-field {
    margin: 28px 0 10px;
}

.registration-medical-field > label {
    display: block;
    margin-bottom: 8px;
    color: #213b86;
}

.registration-medical-field textarea {
    width: 100%;
    min-height: 110px;
    padding: 10px 12px;
    box-sizing: border-box;
    resize: vertical;
    font: inherit;
}

.registration-medical-field .registration-help {
    margin: 8px 0 0;
    text-align: left;
}

.registration-medical-notice {
    background: #f5f7fc;
}

.registration-medical-notice p {
    line-height: 1.6;
}
