/* =========================================================
   BRAGA HALF MARATHON 2027
   GALLERY
   RUNNING PORTUGAL
========================================================= */


/* =========================================================
   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;
}

body.lightbox-open {
    overflow: hidden;
}

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: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.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: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 28px;
}

.brand {
    flex: 0 0 245px;
}

.brand img {
    width: 245px;
}


/* =========================================================
   MAIN 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;

    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 {
    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:hover {
    background: #f7f3f2;
    color: #8b1d28;
}


/* =========================================================
   LANGUAGE
========================================================= */

.language-selector {
    position: relative;
}

.language-button {
    min-width: 70px;
    height: 38px;

    padding: 0 13px;

    border:
        1px solid #d6dbe0;

    background: #ffffff;
    color: #26384c;

    font-size: 11px;
    font-weight: 900;

    cursor: pointer;
}

.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,
        transform .18s ease,
        visibility .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:hover {
    background: #f7f3f2;
    color: #8b1d28;
}

.mobile-toggle {
    display: none;
}


/* =========================================================
   HERO
========================================================= */

.gallery-hero {
    min-height: 380px;

    display: flex;
    align-items: center;

    background-image:

        linear-gradient(
            90deg,
            rgba(25,38,52,.88) 0%,
            rgba(25,38,52,.60) 36%,
            rgba(25,38,52,.14) 68%,
            rgba(25,38,52,.02) 100%
        ),

        url("../images/braga-hero-2027.jpg");

    background-size: cover;
    background-position: center;
}

.gallery-hero-inner {
    width: min(1220px,94%);
    margin: auto;
}

.gallery-hero-copy {
    max-width: 620px;

    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    color: #8b1d28;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: .20em;

    text-transform: uppercase;
}

.hero-kicker {
    color: #e9cdd0;
}

.gallery-hero h1 {
    margin-top: 12px;

    font-size:
        clamp(48px,5vw,70px);

    line-height: .98;

    font-weight: 900;

    text-transform: uppercase;
}

.gallery-hero p {
    margin-top: 19px;

    color: #ffffff;

    font-size: 18px;
}


/* =========================================================
   COUNTDOWN
========================================================= */

.countdown-section {
    border-bottom:
        1px solid #e7e7e7;
}

.mini-countdown {
    width: min(1180px,94%);
    min-height: 82px;
    margin: auto;

    display: grid;

    grid-template-columns:
        1.35fr
        repeat(4,.7fr)
        1.25fr;
}

.mini-countdown > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 13px 12px;

    border-right:
        1px solid #eeeeee;
}

.countdown-intro {
    align-items: flex-start !important;
}

.countdown-intro strong {
    color: #26384c !important;
    font-size: 13px !important;
}

.countdown-intro span {
    color: #8b1d28 !important;
}

.mini-countdown strong {
    color: #8b1d28;

    font-size: 27px;
    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;
}

.race-day strong {
    color: #ffffff !important;
    font-size: 16px !important;
}

.race-day span {
    color: #e3c3c6 !important;
}


/* =========================================================
   INTRO
========================================================= */

.gallery-intro {
    padding:
        78px 20px 62px;
}

.gallery-intro-inner {
    max-width: 850px;

    margin: auto;

    text-align: center;
}

.gallery-intro h2 {
    margin-top: 10px;

    font-size:
        clamp(35px,4vw,50px);

    font-weight: 900;
}

.gallery-intro p {
    max-width: 730px;

    margin:
        18px auto 0;

    color: #68727c;

    font-size: 16px;

    line-height: 1.7;
}


/* =========================================================
   GALLERY
========================================================= */

.gallery-section {
    padding:
        10px 20px 90px;
}

.gallery-grid {
    width: min(1180px,96%);

    margin: auto;

    display: grid;

    grid-template-columns:
        repeat(3,1fr);

    grid-auto-rows: 280px;

    gap: 12px;
}

.gallery-item {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    padding: 0;

    border: 0;

    background: #26384c;

    cursor: pointer;

    text-align: left;
}

.gallery-large {
    grid-row: span 2;
}

.gallery-wide {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .55s ease,
        filter .4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);

    filter: brightness(.88);
}


/* =========================================================
   IMAGE OVERLAY
========================================================= */

.gallery-overlay {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding:
        60px 24px 22px;

    background:
        linear-gradient(
            180deg,
            rgba(20,31,43,0) 0%,
            rgba(20,31,43,.82) 100%
        );

    color: #ffffff;
}

.gallery-overlay span {
    display: block;

    color: #e3c3c6;

    font-size: 8px;
    font-weight: 900;

    letter-spacing: .15em;

    text-transform: uppercase;
}

.gallery-overlay strong {
    display: block;

    margin-top: 5px;

    color: #ffffff;

    font-size: 18px;
    font-weight: 900;
}


/* =========================================================
   RACE PHOTOGRAPHY NOTE
========================================================= */

.race-gallery-note {
    padding:
        70px 20px;

    background: #f5f2ef;
}

.race-gallery-note-inner {
    max-width: 780px;

    margin: auto;

    text-align: center;
}

.race-gallery-note h2 {
    margin-top: 9px;

    color: #26384c;

    font-size: 34px;
}

.race-gallery-note p {
    max-width: 650px;

    margin:
        14px auto 0;

    color: #68727c;

    line-height: 1.7;
}


/* =========================================================
   RUNNING PORTUGAL
========================================================= */

.running-portugal-section {
    padding:
        70px 20px;

    background: #26384c;

    color: #ffffff;
}

.running-portugal-inner {
    width: min(900px,92%);

    margin: auto;

    display: grid;

    grid-template-columns:
        100px 1fr;

    gap: 35px;

    align-items: center;
}

.rp-mark {
    width: 90px;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        2px solid #e3c3c6;

    font-size: 27px;
    font-weight: 900;
}

.rp-copy > span {
    color: #e3c3c6;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: .17em;

    text-transform: uppercase;
}

.rp-copy h2 {
    margin-top: 7px;

    color: #ffffff;

    font-size: 34px;
}

.rp-copy p {
    max-width: 650px;

    margin-top: 12px;

    color:
        rgba(255,255,255,.72);

    line-height: 1.7;
}


/* =========================================================
   CTA
========================================================= */

.gallery-cta {
    padding:
        60px 20px;

    background: #8b1d28;

    color: #ffffff;
}

.gallery-cta-inner {
    width: min(1050px,92%);

    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.gallery-cta span {
    color: #e3c3c6;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: .13em;

    text-transform: uppercase;
}

.gallery-cta h2 {
    margin-top: 7px;

    font-size: 34px;
}

.gallery-cta-button {
    min-width: 185px;
    height: 49px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    color: #8b1d28;

    font-size: 10px;
    font-weight: 900;

    text-transform: uppercase;
}

.gallery-cta-button:hover {
    background: #26384c;

    color: #ffffff;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    padding:
        38px 20px 28px;

    background: #1d2c3b;

    color: #ffffff;
}

.footer-main {
    width: min(1050px,92%);

    margin: auto;

    display: flex;
    justify-content: space-between;

    gap: 30px;
}

.footer-brand strong,
.footer-event strong {
    display: block;

    font-size: 13px;
    font-weight: 900;

    letter-spacing: .06em;
}

.footer-brand span,
.footer-event span {
    display: block;

    margin-top: 5px;

    color:
        rgba(255,255,255,.58);

    font-size: 10px;
}

.footer-event {
    text-align: right;
}

.footer-disclaimer {
    width: min(1050px,92%);

    margin:
        25px auto 0;

    padding-top: 20px;

    border-top:
        1px solid rgba(255,255,255,.10);
}

.footer-disclaimer p {
    max-width: 800px;

    color:
        rgba(255,255,255,.47);

    font-size: 9px;

    line-height: 1.6;
}


/* =========================================================
   LIGHTBOX
========================================================= */

.gallery-lightbox {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;

    background:
        rgba(15,24,33,.94);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-inner {
    max-width: 1200px;
    width: 100%;

    text-align: center;
}

.lightbox-inner img {
    max-width: 100%;
    max-height: 78vh;

    margin: auto;

    object-fit: contain;
}

.lightbox-caption {
    margin-top: 15px;

    color: #ffffff;

    font-size: 14px;
    font-weight: 800;
}

.lightbox-close {
    position: absolute;

    top: 20px;
    right: 28px;

    width: 45px;
    height: 45px;

    border: 0;

    background: transparent;

    color: #ffffff;

    font-size: 36px;

    cursor: pointer;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .gallery-grid {
        grid-template-columns:
            repeat(2,1fr);
    }

    .gallery-wide {
        grid-column: span 1;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 820px) {

    .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 #dddddd;

        background: #ffffff;

        font-size: 20px;
    }

    .main-menu {
        position: absolute;

        top: 100%;
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;

        gap: 0;

        background: #ffffff;
    }

    .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;
    }

    .menu-dropdown {
        width: 100%;
    }

    .menu-dropdown-panel {
        position: static;

        width: 100%;

        display: none;

        opacity: 1;
        visibility: visible;

        transform: none;

        box-shadow: none;
    }

    .menu-dropdown.open
    .menu-dropdown-panel {
        display: block;
    }

    .menu-dropdown-panel a {
        text-align: center;
    }

    .language-selector {
        margin-left: auto;
    }

    .mini-countdown {
        grid-template-columns:
            repeat(4,1fr);
    }

    .countdown-intro,
    .race-day {
        grid-column:
            1 / 5;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 520px) {

    .brand {
        flex:
            0 0 150px;
    }

    .brand img {
        width: 150px;
    }

    .gallery-hero {
        min-height: 330px;
    }

    .gallery-hero h1 {
        font-size: 40px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;

        grid-auto-rows: 265px;
    }

    .gallery-large {
        grid-row: span 1;
    }

    .gallery-wide {
        grid-column: span 1;
    }

    .running-portugal-inner {
        grid-template-columns: 1fr;
    }

    .rp-mark {
        width: 70px;
        height: 70px;
    }

    .gallery-cta-inner {
        flex-direction: column;

        align-items: flex-start;
    }

    .gallery-cta-button {
        width: 100%;
    }

    .footer-main {
        flex-direction: column;
    }

    .footer-event {
        text-align: left;
    }

    .gallery-lightbox {
        padding: 18px;
    }

}