/* =========================================================
   BRAGA HALF MARATHON 2027
   RESULTS
========================================================= */


/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #26384c;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
}


/* =========================================================
   TOP BAR
========================================================= */

.identity-bar {
    min-height: 38px;
    background: #26384c;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.identity-inner {
    width: min(1220px, 94%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.identity-place,
.identity-date {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.identity-date {
    color: #e3c3c6;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: relative;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid rgba(38, 56, 76, .12);
}

.header-inner {
    width: min(1220px, 94%);
    min-height: 100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}


/* =========================================================
   LOGO
========================================================= */

.brand {
    flex: 0 0 245px;
}

.brand img {
    width: 245px;
    height: auto;
}


/* =========================================================
   MENU
========================================================= */

.main-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
}

.main-menu > a,
.menu-dropdown-toggle {
    position: relative;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: #26384c;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.main-menu > a::after,
.menu-dropdown-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    height: 2px;
    background: #8b1d28;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.main-menu > a:hover::after,
.main-menu > a.active::after,
.menu-dropdown-toggle:hover::after,
.menu-dropdown-toggle.active::after {
    transform: scaleX(1);
}


/* =========================================================
   INFO DROPDOWN
========================================================= */

.menu-dropdown {
    position: relative;
}

.menu-dropdown-toggle {
    gap: 7px;
}

.menu-dropdown-panel {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    width: 215px;
    background: #ffffff;
    border-top: 3px solid #8b1d28;
    box-shadow: 0 12px 32px rgba(0,0,0,.16);

    opacity: 0;
    visibility: hidden;

    transform:
        translateX(-50%)
        translateY(-7px);

    transition:
        opacity .18s ease,
        transform .18s ease,
        visibility .18s ease;
}

.menu-dropdown.open
.menu-dropdown-panel {
    opacity: 1;
    visibility: visible;

    transform:
        translateX(-50%)
        translateY(0);
}

.menu-dropdown-panel a {
    display: block;
    padding: 12px 17px;
    border-bottom: 1px solid #eeeeee;
    color: #344353;
    font-size: 12px;
    font-weight: 700;
}

.menu-dropdown-panel a:last-child {
    border-bottom: 0;
}

.menu-dropdown-panel a:hover,
.menu-dropdown-panel a.active {
    background: #f7f3f2;
    color: #8b1d28;
}


/* =========================================================
   LANGUAGE
========================================================= */

.language-selector {
    position: relative;
    flex: 0 0 auto;
}

.language-button {
    min-width: 70px;
    height: 38px;
    padding: 0 13px;
    border: 1px solid #d6dbe0;
    background: #ffffff;
    color: #26384c;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .09em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.language-button:hover {
    border-color: #8b1d28;
    color: #8b1d28;
}

.language-panel {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 170px;
    background: #ffffff;
    border-top: 3px solid #8b1d28;
    box-shadow: 0 10px 30px rgba(0,0,0,.17);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}

.language-selector.open
.language-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-panel a {
    display: block;
    padding: 11px 16px;
    border-bottom: 1px solid #eeeeee;
    color: #344353;
    font-size: 12px;
    font-weight: 700;
}

.language-panel a:last-child {
    border-bottom: 0;
}

.language-panel a:hover {
    background: #f7f3f2;
    color: #8b1d28;
}


/* =========================================================
   MOBILE BUTTON
========================================================= */

.mobile-toggle {
    display: none;
}


/* =========================================================
   HERO
========================================================= */

.inner-hero {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: center;
    overflow: hidden;

    background-image:
        linear-gradient(
            90deg,
            rgba(25,38,52,.86) 0%,
            rgba(25,38,52,.62) 35%,
            rgba(25,38,52,.20) 67%,
            rgba(25,38,52,.04) 100%
        ),
        url("../images/braga-hero-2027.jpg");

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.inner-hero-inner {
    position: relative;
    z-index: 2;
    width: min(1220px, 94%);
    margin: 0 auto;
}

.inner-hero-copy {
    max-width: 630px;
    color: #ffffff;
}

.inner-eyebrow {
    margin-bottom: 12px;
    color: #f0d8da;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .20em;
    text-transform: uppercase;
}

.inner-hero h1 {
    color: #ffffff;
    font-size: clamp(46px, 5vw, 68px);
    line-height: .98;
    font-weight: 900;
    letter-spacing: -.03em;
    text-transform: uppercase;
}

.inner-hero p {
    max-width: 580px;
    margin-top: 18px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.55;
    text-shadow: 0 2px 9px rgba(0,0,0,.35);
}


/* =========================================================
   COUNTDOWN
========================================================= */

.countdown-section {
    background: #ffffff;
    border-bottom: 1px solid #e7e7e7;
}

.mini-countdown {
    width: min(1180px, 94%);
    min-height: 82px;
    margin: 0 auto;

    display: grid;

    grid-template-columns:
        1.35fr
        repeat(4, .70fr)
        1.25fr;

    align-items: stretch;
}

.mini-countdown > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 13px 12px;

    text-align: center;

    border-right: 1px solid #eeeeee;
}

.mini-countdown > div:last-child {
    border-right: 0;
}

.countdown-intro {
    align-items: flex-start !important;
    text-align: left !important;
    padding-left: 5px !important;
}

.countdown-intro strong {
    color: #26384c !important;
    font-size: 13px !important;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.countdown-intro span {
    color: #8b1d28 !important;
    font-size: 10px !important;
}

.mini-countdown strong {
    color: #8b1d28;
    font-size: 27px;
    line-height: 1;
    font-weight: 900;
}

.mini-countdown span {
    margin-top: 5px;
    color: #777777;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.race-day {
    background: #26384c;
}

.mini-countdown .race-day strong {
    color: #ffffff;
    font-size: 16px;
}

.mini-countdown .race-day span {
    color: #e3c3c6;
}


/* =========================================================
   COMMON
========================================================= */

.section-eyebrow {
    color: #8b1d28;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .20em;
    text-transform: uppercase;
}


/* =========================================================
   RESULTS INTRO
========================================================= */

.results-intro {
    padding: 70px 20px 50px;
    background: #ffffff;
}

.results-intro-inner {
    width: min(1050px, 92%);
    margin: 0 auto;
    text-align: center;
}

.results-intro h2 {
    margin-top: 12px;
    color: #26384c;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.1;
    font-weight: 900;
}

.results-intro p {
    max-width: 760px;
    margin: 18px auto 0;
    color: #68727c;
    font-size: 16px;
    line-height: 1.7;
}


/* =========================================================
   OFFICIAL RESULTS SECTION
========================================================= */

.official-results-section {
    padding: 60px 20px 85px;
    background: #f5f2ef;
}

.official-results-inner {
    width: min(1250px, 96%);
    margin: 0 auto;
}

.results-year {
    text-align: center;
    margin-bottom: 32px;
}

.results-year > span {
    color: #8b1d28;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.results-year h2 {
    margin-top: 9px;
    color: #26384c;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    font-weight: 900;
}

.results-year > p {
    margin-top: 12px;
    color: #68727c;
    font-size: 15px;
}


/* =========================================================
   21K / 5K SELECTOR
========================================================= */

.results-race-selector {
    max-width: 560px;
    margin: 30px auto 0;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 10px;
}

.race-result-link {
    min-height: 70px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 10px 20px;

    background: #ffffff;

    border: 1px solid #d9dde1;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.race-result-link strong {
    color: #26384c;
    font-size: 17px;
    font-weight: 900;
}

.race-result-link span {
    margin-top: 3px;
    color: #68727c;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.race-result-link:hover {
    border-color: #8b1d28;
    transform: translateY(-2px);
}

.race-result-link.active {
    background: #8b1d28;
    border-color: #8b1d28;
}

.race-result-link.active strong,
.race-result-link.active span {
    color: #ffffff;
}


/* =========================================================
   IFRAME
========================================================= */

.iframe-wrapper {
    width: 100%;
    background: #ffffff;
    border: 1px solid #dfe2e4;
    box-shadow: 0 10px 30px rgba(38,56,76,.08);

    overflow: hidden;
}

.iframe-wrapper iframe {
    display: block;
    width: 100%;
    height: 1250px;
    border: 0;
    background: #ffffff;
}


/* =========================================================
   IFRAME HELP
========================================================= */

.iframe-help {
    margin-top: 25px;
    text-align: center;
}

.iframe-help p {
    color: #68727c;
    font-size: 13px;
    line-height: 1.6;
}

.official-results-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 220px;
    height: 48px;

    margin-top: 16px;
    padding: 0 22px;

    background: #8b1d28;
    color: #ffffff;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;

    transition:
        background .2s ease,
        transform .2s ease;
}

.official-results-button:hover {
    background: #26384c;
    transform: translateY(-2px);
}


/* =========================================================
   2027 RESULTS
========================================================= */

.future-results {
    padding: 70px 20px;
    background: #8b1d28;
    color: #ffffff;
}

.future-results-inner {
    width: min(1080px, 92%);
    margin: 0 auto;
    text-align: center;
}

.future-results span {
    color: #f0d8da;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.future-results h2 {
    margin-top: 9px;
    color: #ffffff;
    font-size: clamp(29px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 900;
}

.future-results p {
    max-width: 690px;
    margin: 16px auto 0;
    color: rgba(255,255,255,.84);
    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   BRAGA STRIP
========================================================= */

.braga-strip {
    padding: 40px 20px;
    background: #26384c;
    color: #ffffff;
    text-align: center;
}

.braga-strip strong {
    display: block;
    color: #ffffff;
    font-size: 26px;
    font-weight: 900;
}

.braga-strip span {
    display: block;
    margin-top: 7px;
    color: #e3c3c6;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    padding: 25px 20px;
    background: #1d2c3b;
    color: rgba(255,255,255,.66);
    text-align: center;
    font-size: 10px;
    letter-spacing: .07em;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

    .header-inner {
        gap: 18px;
    }

    .brand {
        flex-basis: 205px;
    }

    .brand img {
        width: 205px;
    }

    .main-menu {
        gap: 15px;
    }

    .main-menu > a,
    .menu-dropdown-toggle {
        font-size: 10px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 820px) {

    .identity-inner {
        min-height: 42px;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        padding: 6px 0;
    }

    .header-inner {
        min-height: 82px;
        gap: 12px;
    }

    .brand {
        flex: 0 0 180px;
    }

    .brand img {
        width: 180px;
    }

    .mobile-toggle {
        display: flex;
        width: 42px;
        height: 38px;
        align-items: center;
        justify-content: center;
        border: 1px solid #d5dade;
        background: #ffffff;
        color: #26384c;
        font-size: 20px;
        cursor: pointer;
    }

    .main-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #ffffff;
        border-top: 1px solid #eeeeee;
        box-shadow: 0 12px 25px rgba(0,0,0,.12);
    }

    .site-header.menu-open
    .main-menu {
        display: flex;
    }

    .main-menu > a,
    .menu-dropdown-toggle {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        border-bottom: 1px solid #eeeeee;
    }

    .main-menu > a::after,
    .menu-dropdown-toggle::after {
        display: none;
    }

    .menu-dropdown {
        width: 100%;
    }

    .menu-dropdown-panel {
        position: static;
        width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: 0;
    }

    .menu-dropdown.open
    .menu-dropdown-panel {
        display: block;
        transform: none;
    }

    .menu-dropdown-panel a {
        text-align: center;
        background: #f7f5f4;
    }

    .language-selector {
        margin-left: auto;
    }

    .inner-hero {
        min-height: 340px;
        align-items: flex-end;
        padding-bottom: 45px;

        background-image:
            linear-gradient(
                180deg,
                rgba(22,33,46,.10) 0%,
                rgba(22,33,46,.32) 42%,
                rgba(22,33,46,.90) 100%
            ),
            url("../images/braga-hero-2027.jpg");

        background-position: 63% center;
    }

    .inner-hero p {
        font-size: 16px;
    }

    .mini-countdown {
        grid-template-columns: repeat(4, 1fr);
    }

    .countdown-intro {
        grid-column: 1 / 5;
        min-height: 58px;
        align-items: center !important;
        text-align: center !important;
        border-bottom: 1px solid #eeeeee;
    }

    .race-day {
        grid-column: 1 / 5;
        min-height: 58px;
    }

    .official-results-section {
        padding-left: 10px;
        padding-right: 10px;
    }

    .official-results-inner {
        width: 100%;
    }

    .iframe-wrapper iframe {
        height: 1100px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 520px) {

    .identity-place,
    .identity-date {
        font-size: 8px;
    }

    .brand {
        flex-basis: 150px;
    }

    .brand img {
        width: 150px;
    }

    .language-button {
        min-width: 58px;
        padding: 0 8px;
    }

    .inner-hero {
        min-height: 315px;
    }

    .inner-hero h1 {
        font-size: 40px;
    }

    .mini-countdown > div {
        padding: 12px 4px;
    }

    .mini-countdown strong {
        font-size: 21px;
    }

    .mini-countdown span {
        font-size: 7px;
        letter-spacing: .06em;
    }

    .results-intro {
        padding: 55px 15px 40px;
    }

    .results-race-selector {
        grid-template-columns: 1fr;
    }

    .official-results-section {
        padding-top: 50px;
        padding-bottom: 65px;
    }

    .iframe-wrapper iframe {
        height: 1000px;
    }

    .future-results {
        padding: 55px 15px;
    }

}