/*
 * Alpine: X-Marathon brand layer (colours and typography carried over from theme1821)
 * and styles for the J4/J5/J6 layouts (hero, cards, gallery, video, footer).
 * Loaded after aqmain.css / aq.css.
 */

:root {
    --xm-accent: #468eef;
    --xm-accent-dark: #2a6fcf;
    --xm-ink: #000;
    --xm-heading: #1a1a1a;
    --xm-muted: #6f6357;
    --xm-bg: #fff;
    --xm-footer-bg: #000;
    --xm-font: "Droid Sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    --xm-font-display: "Racing Sans One", "Droid Sans", "Noto Sans", sans-serif;
}

/* ------------------------------------------------------------------ base */

/* Article content uses rem-based inline sizes written for a 16px root (Bootstrap 5 build uses the same root) */
html { font-size: 16px; }

/* Footer always at the bottom: the page content grows to fill short pages */
html body.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
body.site > .body { flex: 1 0 auto; }
body.site > .c-footer { flex-shrink: 0; }

html body.site {
    font-family: var(--xm-font);
    font-size: 16px;
    line-height: 1.75;
    color: var(--xm-ink);
    background-color: var(--xm-bg);
}

body.site h1, body.site h2, body.site h3, body.site h4, body.site h5, body.site h6,
body.site .h1, body.site .h2, body.site .h3, body.site .h4 {
    font-family: var(--xm-font);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--xm-heading);
}

body.site h1, body.site .h1 { font-size: 40px; }
body.site h2, body.site .h2 { font-size: 24px; }
body.site h3, body.site .h3 { font-size: 26px; color: var(--xm-accent); }
body.site h4, body.site .h4 { font-size: 18px; }

body.site a { color: var(--xm-accent); }
body.site a:hover, body.site a:focus { color: var(--xm-accent-dark); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --------------------------------------------------------------- buttons */

body.site .btn,
body.site a.btn,
body.site button.btn,
body.site p.readmore a {
    font-family: var(--xm-font-display);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .03em;
    text-transform: uppercase;
    line-height: 20px;
    padding: 7px 20px;
    color: #fff;
    background: var(--xm-accent);
    border: 0;
    border-radius: 0;
    transition: background-color .2s;
}

body.site .btn:hover,
body.site .btn:focus,
body.site p.readmore a:hover { background: var(--xm-accent-dark); color: #fff; }

/* Buttons are never underlined (aqmain.css underlines every link inside a paragraph: "p a") */
body.site .btn,
body.site .btn:hover,
body.site .btn:focus,
body.site p a.btn,
body.site p.readmore a,
body.site p.readmore a:hover,
body.site p.readmore a:focus { text-decoration: none; }

/* ---------------------------------------------------------------- header */

button.c-header__menu,
button.c-nav__close {
    padding: 0;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.c-header__brand img { max-height: 70px; width: auto; }
.c-header--home .c-header__brand img { max-height: 90px; }

.other {
    position: relative;
    background: #111 url("../../../images/slider/2024/x-marathon-navigation-trekking-2024.webp") center / cover no-repeat;
}

.other::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.other > .container { position: relative; }
.other .c-header { padding-bottom: 40px; }

/* Home header spans the full width like the content below it (the old 15px inset made it narrower at tablet size) */
.c-header.c-header--home { left: 0; right: 0; }
.other .c-icon, .c-header--home .c-icon { color: #fff; }

.c-nav__list > .active > a,
.c-nav__list li > a:hover { background: var(--xm-accent); }

/* ------------------------------------------------------------ hero slider */

.c-landing { background: #000; }

.xm-hero { position: absolute; inset: 0; }

.xm-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s ease, visibility 0s linear 1.5s;
}

.xm-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1.5s ease;
}

.xm-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xm-hero__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.15) 40%, rgba(0,0,0,.45));
}

.xm-hero__caption {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 90%;
    max-width: 900px;
    transform: translate(-50%, -40%);
    text-align: center;
    color: #fff;
}

body.site .xm-hero__title {
    margin: 0 0 10px;
    font-size: clamp(40px, 9vw, 70px);
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.xm-hero__text, .xm-hero__text p, .xm-hero__text span { color: #fff !important; }
.xm-hero__text p { margin: 0 0 12px; font-size: 18px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.xm-hero__text img { max-width: 180px; height: auto; }

.xm-hero__nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    font-size: 32px;
    line-height: 40px;
    color: #fff;
    background: rgba(0,0,0,.35);
    border: 0;
    cursor: pointer;
}

.xm-hero__nav:hover, .xm-hero__nav:focus { background: var(--xm-accent); }
.xm-hero__nav--prev { left: 10px; }
.xm-hero__nav--next { right: 10px; }

/* ---------------------------------------------------- feature / intro */

.xm-feature { padding: 60px 0 40px; text-align: center; }
body.site .xm-intro__title { margin: 0 0 25px; font-size: 32px; }
.xm-intro__body p { line-height: 1.9; }

/* ------------------------------------------------------- youtube video */

.xm-video {
    position: relative;
    height: 80vh;
    min-height: 320px;
    max-height: 760px;
    overflow: hidden;
    background: #000 center / cover no-repeat;
}

.xm-video__frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh;   /* 16:9 cover */
    min-width: 100%;
    height: 56.25vw;
    min-height: 100%;
    border: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.xm-video__play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    background: rgba(0,0,0,.55);
    border-radius: 50%;
}

.xm-video__play::after {
    content: "";
    position: absolute;
    left: 32px;
    top: 24px;
    border-style: solid;
    border-width: 16px 0 16px 26px;
    border-color: transparent transparent transparent #fff;
}

.xm-video.is-playing .xm-video__play { display: none; }

.xm-content-bottom { margin-top: 40px; }
.xm-content-bottom .xm-video { height: 60vh; }

/* --------------------------------------------------- page / categories */

body.site .xm-page-title,
body.site .page_header h1 {
    margin: 0 0 30px;
    font-size: 26px;
    color: var(--xm-accent);
}

.xm-cards { margin-bottom: 20px; }

.xm-card { margin-bottom: 40px; text-align: center; }
.xm-card__img { display: block; overflow: hidden; margin-bottom: 18px; }

.xm-card__img img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .4s ease;
}

.xm-card__img:hover img { transform: scale(1.04); }

body.site .xm-card .item_title { margin: 0 0 6px; font-size: 20px; line-height: 1.2; }
body.site .xm-card .item_title a { color: var(--xm-heading); }
body.site .xm-card .item_title a:hover { color: var(--xm-accent); }

.item_published {
    font-family: var(--xm-font-display);
    font-size: 15px;
    color: var(--xm-accent);
}

/* News cards (category layout "News cards"): wide lead card, then a card grid. Whole card is clickable. */
.xm-news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    transition: box-shadow .2s ease, transform .2s ease;
}
.xm-news-card:hover,
.xm-news-card:focus-within { box-shadow: 0 10px 30px rgba(0, 0, 0, .12); transform: translateY(-3px); }

.xm-news-card__media { overflow: hidden; aspect-ratio: 16 / 10; }
.xm-news-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.xm-news-card:hover .xm-news-card__media img { transform: scale(1.04); }
.xm-news-card__media.xm-card__img--placeholder { aspect-ratio: 16 / 10; }

.xm-news-card__body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 22px; }

body.site .xm-news-card__date { margin: 0 0 8px; font-family: var(--xm-font-display); font-size: 14px; color: var(--xm-accent); }
body.site .xm-news-card__title { margin: 0 0 10px; font-size: 19px; line-height: 1.25; }
body.site .xm-news-card__title a { color: var(--xm-heading); text-decoration: none; }
body.site .xm-news-card__title a:hover,
body.site .xm-news-card__title a:focus-visible { color: var(--xm-accent); }
.xm-news-card__title a:focus-visible { outline: none; }
.xm-news-card:has(.xm-news-card__title a:focus-visible) { outline: 3px solid var(--xm-accent); outline-offset: 2px; }

body.site .xm-news-card__text { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: #444; }
body.site .xm-news-card__more { margin: auto 0 0; }
.xm-news-card__link { font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--xm-accent); }
.xm-news-card__link::after { content: " \203A"; }

/* Lead card: photo left, text right from 992px; stacked on smaller screens */
.xm-news-card--lead { margin-bottom: 30px; }
body.site .xm-news-card--lead .xm-news-card__title { font-size: 26px; }
body.site .xm-news-card--lead .xm-news-card__text { font-size: 16px; }

@media (min-width: 992px) {
    .xm-news-card--lead { flex-direction: row; min-height: 380px; }
    .xm-news-card--lead .xm-news-card__media { flex: 0 0 55%; aspect-ratio: auto; }
    .xm-news-card--lead .xm-news-card__body { justify-content: center; padding: 40px; }
    body.site .xm-news-card--lead .xm-news-card__title { font-size: 30px; }
}

.xm-news-grid { margin-bottom: 20px; }

@media (prefers-reduced-motion: reduce) {
    .xm-news-card, .xm-news-card__media img { transition: none; }
    .xm-news-card:hover, .xm-news-card:focus-within { transform: none; }
}

.xm-entry { margin-bottom: 40px; }
.xm-entry::after { content: ""; display: table; clear: both; }
body.site .xm-entry .item_title { font-size: 22px; margin: 0 0 15px; }
.xm-entry .item-image { margin: 0 0 20px; }
.xm-entry .item-image.float-start,
.xm-entry .item-image.left { float: left; margin: 0 30px 20px 0; max-width: 40%; }

/* Text wraps around the photo and continues full width below it */

/* Phones: photo full width above the text */
@media (max-width: 767px) {
    .xm-entry .item-image.float-start,
    .xm-entry .item-image.left { float: none !important; margin: 0 0 20px; max-width: 100%; }
}
.xm-entry .item-image img { max-width: 100%; height: auto; }

.xm-gallery {
    display: grid;
    grid-template-columns: repeat(var(--xm-gallery-cols, 3), 1fr);
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 767px) {
    .xm-gallery { grid-template-columns: repeat(2, 1fr); }
}

.xm-gallery__item { margin: 0; }
.xm-gallery__item img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block; }
.xm-gallery__item figcaption { margin-top: 6px; font-size: 14px; text-align: center; }

/* ---------------------------------------------- logos / acknowledgement */

.xm-mainbottom { padding: 40px 0 50px; text-align: center; }
.xm-mainbottom img { max-width: 100%; height: auto; }
.xm-mainbottom .row { margin-bottom: 30px; }

body.site .xm-mainbottom h4 {
    max-width: 900px;
    margin: 20px auto 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--xm-accent);
}

/* ---------------------------------------------------------------- footer */

.c-footer { background: var(--xm-footer-bg); color: #fff; padding-top: 30px; }
.c-footer a { color: #fff; }

.xm-copyright { padding: 20px 0; font-size: 11px; text-transform: uppercase; color: var(--xm-muted); }

.xm-copyright .container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 30px;
    align-items: center;
    justify-content: space-between;
}

body.site .xm-copyright a { color: var(--xm-muted); }
body.site .xm-copyright a:hover { color: #fff; }

.xm-copyright .moduletable { float: none; width: auto; padding: 0; }

.xm-copyright .c-nav__list li a {
    padding: 0;
    font-size: 11px;
    background: none;
}

.xm-copyright .c-nav__list,
.xm-copyright ul.mod-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.xm-copyright__text a { margin-left: 12px; }

.xm-backtop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 20;
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,.7);
}

.xm-backtop::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-left: 2px solid #fff;
    border-top: 2px solid #fff;
    transform: rotate(45deg);
}

.xm-backtop:hover { background: var(--xm-accent); }

/* --------------------------------------------------- error / offline */

.xm-error, .xm-offline { padding: 60px 15px; text-align: center; }
.xm-error__code { margin-top: 30px; font-size: 13px; color: var(--xm-muted); }
.xm-offline__form { max-width: 320px; margin: 30px auto 0; text-align: left; }
.xm-offline__form .btn { margin-top: 15px; width: 100%; }
.xm-offline__logo img { max-width: 280px; height: auto; }

@media (prefers-reduced-motion: reduce) {
    .xm-hero__slide, .xm-card__img img { transition: none; }
}

/* ----------------------------------------------------------------- forms */

/* Joomla's show/hide password button uses Font Awesome icons, which this template doesn't load:
   draw the eye (and the crossed-out eye once the password is shown) with an SVG mask */
.input-password-toggle :is(.icon-eye, .icon-eye-slash) {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    background: currentColor;
    -webkit-mask: var(--xm-eye) center / contain no-repeat;
    mask: var(--xm-eye) center / contain no-repeat;
    --xm-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.input-password-toggle .icon-eye-slash {
    --xm-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}
.input-password-toggle :is(.icon-eye, .icon-eye-slash)::before { content: none; }

/* ----------------------------------------------------------- right column */

/* Right column (position "right", e.g. "Why adventure races?" on About us): text blocks with a divider,
   separated from the content by a thin line on desktop */
@media (min-width: 992px) {
    #aside { padding-left: 40px; border-left: 1px solid #e6e6e6; }
}
@media (max-width: 991px) {
    #aside { margin-top: 30px; padding-top: 30px; border-top: 1px solid #e6e6e6; }
}

.xm-aside-list__item { padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid #ededed; }
.xm-aside-list__item:last-child { border-bottom: 0; margin-bottom: 0; }
body.site .xm-aside-list__title {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--xm-accent);
}
body.site .xm-aside-list__text,
body.site .xm-aside-list__text p { margin: 0; font-size: 15px; line-height: 1.65; color: #444; }

/* ----------------------------------------------------------- breadcrumbs */

/* Core Breadcrumbs module (position "breadcrumbs"), above the page content on inner pages */
.xm-breadcrumbs { margin-top: 24px; }
.xm-breadcrumbs + .maincontent { margin-top: 24px; }

/* A lone "Home" (pages without their own menu item, e.g. login) adds nothing: hide it, keep the normal spacing */
.xm-breadcrumbs:not(:has(.breadcrumb-item + .breadcrumb-item)) { display: none; }
.xm-breadcrumbs:not(:has(.breadcrumb-item + .breadcrumb-item)) + .maincontent { margin-top: 50px; }

.xm-breadcrumbs .breadcrumb {
    --bs-breadcrumb-divider-color: #b5b5b5;
    --bs-breadcrumb-item-active-color: var(--xm-heading);
    padding: 0 !important;        /* Joomla adds px-3 py-2 */
    margin: 0;
    line-height: 1.5;
    letter-spacing: .02em;
}

/* Joomla's location-pin icon before the trail: the icon font isn't loaded */
.xm-breadcrumbs .mod-breadcrumbs__divider { display: none; }

body.site .xm-breadcrumbs .breadcrumb a { color: var(--xm-muted); text-decoration: none; }
body.site .xm-breadcrumbs .breadcrumb a:hover,
body.site .xm-breadcrumbs .breadcrumb a:focus-visible { color: var(--xm-accent); text-decoration: underline; }
.xm-breadcrumbs .breadcrumb-item.active { font-weight: 700; }

/* Desktop: larger trail */
@media (min-width: 992px) {
    .xm-breadcrumbs .breadcrumb { --bs-breadcrumb-font-size: 18px; --bs-breadcrumb-item-padding-x: .625rem; }
}

/* Phones: one line; a long current-page title (already shown in the header) ends in "…" */
@media (max-width: 767px) {
    .xm-breadcrumbs { margin-top: 16px; }
    .xm-breadcrumbs + .maincontent { margin-top: 16px; }
    .xm-breadcrumbs:not(:has(.breadcrumb-item + .breadcrumb-item)) + .maincontent { margin-top: 50px; }

    .xm-breadcrumbs .breadcrumb { flex-wrap: nowrap; }
    .xm-breadcrumbs .breadcrumb-item { flex-shrink: 0; white-space: nowrap; }
    .xm-breadcrumbs .breadcrumb-item.active { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* ------------------------------------------------------------ pagination */

/* Joomla wraps ul.pagination in div.pagination: style the parts by their own classes.
   Dark rounded buttons, current page in the accent colour, "PAGE 1 OF 7" centred underneath. */
div.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 20px 0 50px;
    padding: 0;
}

div.pagination .counter {
    order: 2;
    margin: 0;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8a8a8a;
}

ul.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Joomla's paging markup adds Bootstrap's mb-4 utility; the wrapper above already spaces it */
ul.pagination.mb-4 { margin-bottom: 0 !important; }

ul.pagination .page-item { margin: 0; }

ul.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #202020;
    border: 1px solid #333;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color .15s, color .15s, border-color .15s;
}

ul.pagination a.page-link:hover,
ul.pagination a.page-link:focus-visible { color: #fff; background: #333; border-color: #4a4a4a; }

ul.pagination .active .page-link { color: #fff; background: var(--xm-accent); border-color: var(--xm-accent); cursor: default; }
ul.pagination .disabled .page-link { color: #555; background: #202020; border-color: #2a2a2a; opacity: .7; cursor: default; }

/* First / prev / next / last: Joomla's icon font isn't loaded, draw the arrows as text */
ul.pagination .page-link [class^="icon-angle"] { display: block; margin-top: -4px; font-style: normal; font-size: 20px; line-height: 1; }
ul.pagination .icon-angle-double-left::before { content: "\00AB"; }
ul.pagination .icon-angle-left::before { content: "\2039"; }
ul.pagination .icon-angle-right::before { content: "\203A"; }
ul.pagination .icon-angle-double-right::before { content: "\00BB"; }

/* Phones: smaller buttons and no first/last, so the pages and prev/next fit on one line */
@media (max-width: 480px) {
    ul.pagination { gap: 4px; }
    ul.pagination .page-link { min-width: 32px; height: 36px; padding: 0 6px; font-size: 14px; }
    ul.pagination .page-item:has(:is(.icon-angle-double-left, .icon-angle-double-right)) { display: none; }
}

/* ------------------------------------------------------- slide-out nav */

.c-nav { z-index: 1000; padding: 0; background: #0b0b0b; }

/* Like the Sprint Series menu: list centred in the screen, close button and logo pinned to the top corners.
   Top/bottom padding keeps the list clear of the logo; a menu taller than the screen scrolls. */
.c-nav .container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 100px;
    padding-bottom: 100px;
}

.c-nav .c-nav__close.top { top: 8px; left: 5px; }
.c-nav .c-header__brand { position: absolute; top: 20px; right: 15px; margin: 0; }
.c-nav .c-nav__inner { position: static; width: 100%; padding: 0; }
.c-nav__close i, .c-nav__close.top i { color: #fff; }
.c-nav__close:hover i { color: var(--xm-accent); }

/* Size, weight and spacing match the Sprint Series menu */
.c-nav__inner .c-nav__list {
    display: flex;
    flex-direction: column;
    gap: 3.5px;
    margin: 0;
    padding: 0;
}

.c-nav__inner .c-nav__list li a,
.c-nav__inner .c-nav__link {
    display: inline-block;
    padding: 2px 0;
    font-family: var(--xm-font);
    font-size: 17.5px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: none;
}

.c-nav__inner .c-nav__list li a:hover,
.c-nav__inner .c-nav__list li a:focus,
.c-nav__inner .c-nav__list .active > a { color: var(--xm-accent); background: none; text-decoration: none; }

/* Page-header titles sit on a photo: keep them white */
body.site .subheader h1,
body.site .subheader h2 { color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }

/* ---------------------------------------------------------- page header */

.other .c-header { padding-bottom: 10px; }

body.site .subheader {
    padding: 50px 15px 80px;
    text-align: center;
    color: #fff;
}

body.site .subheader__title {
    margin: 0;
    font-family: var(--xm-font);
    font-size: clamp(30px, 5.5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

body.site .subheader__subtitle {
    margin: 12px 0 0;
    font-family: var(--xm-font-display);
    font-size: 20px;
    color: #fff;
}

body.site .subheader .btn { margin-top: 24px; }

@media (min-width: 768px) {
    body.site .subheader { padding: 70px 15px 110px; }
}

/* Register pages with a photo (template setting "Tall Photo Header"): photo fills the whole screen,
   title and Register button centred on it, like the old live site */
.header-tall .other > .container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;   /* phones: the visible height, without the browser bars */
}
body.site.header-tall .subheader {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 60px;
}
body.site.header-tall .subheader .btn { padding: 12px 34px; font-size: 16px; }

/* ------------------------------------------------------ article text */

/* Articles use the full container width, like the header, footer and card pages */

.item-page p,
.item-page li { line-height: 1.75; }

body.site .item-page h2 { margin: 40px 0 14px; font-size: 26px; color: var(--xm-heading); }
body.site .item-page h3 { margin: 32px 0 12px; font-size: 21px; color: var(--xm-accent); }
body.site .item-page h4,
body.site .item-page h5 { margin: 24px 0 10px; font-size: 17px; }

.item-page ul,
.item-page ol { padding-left: 1.3em; margin-bottom: 18px; }
.item-page li { margin-bottom: 6px; }

.item-page img { max-width: 100%; height: auto; }

.item-page .item-image,
.item-page figure.item-image { margin: 0 0 28px; }

.item-page .item-image img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.item-page table { width: 100%; margin-bottom: 20px; border-collapse: collapse; }
.xm-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
.xm-table-scroll > table { margin-bottom: 0; }
.item-page table td,
.item-page table th { padding: 8px 10px; border-bottom: 1px solid #e4e4e4; vertical-align: top; }

.xm-content-bottom .xm-intro__body { font-size: 15px; }

/* -------------------------------------- blog lists (Past editions) as rows */

.blog { max-width: 980px; margin: 0 auto; }

.blog .items-row { margin-bottom: 0; }

.blog .items-row .item {
    padding: 28px 0;
    border-bottom: 1px solid #e6e6e6;
}

body.site .blog .item .page-header h2 { margin: 0 0 10px; font-size: 20px; line-height: 1.25; }
.blog .item .page-header { margin: 0; padding: 0; border: 0; }

.blog .item figure.item-image { margin: 0 0 16px; }

.blog .item figure.item-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

@media (min-width: 768px) {
    .blog .items-row .item:has(> figure.item-image) {
        display: grid;
        grid-template-columns: 300px 1fr;
        column-gap: 30px;
        align-items: start;
    }

    .blog .item:has(> figure.item-image) > figure.item-image { grid-column: 1; grid-row: 1 / span 20; margin: 0; }
    .blog .item:has(> figure.item-image) > :not(figure) { grid-column: 2; }
}

/* List pages (Latest news, About us): keep photos to a sensible height */
.xm-entry .item-image img,
.xm-entry figure.item-image img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

/* The page header already shows this title: keep the component's H1 for SEO / screen readers only */
.header-mirrors-h1 main h1:first-of-type {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Friendly empty states */
.eb-container .alert-info {
    padding: 22px 26px;
    font-size: 16px;
    color: var(--xm-heading);
    background: #f2f7fe;
    border: 0;
    border-left: 4px solid var(--xm-accent);
    border-radius: 0;
}

/* Ajax pagination: dim the list while the next page loads */
.xm-category.is-loading,
.blog.is-loading {
    opacity: .45;
    pointer-events: none;
    transition: opacity .15s;
}

.xm-category:focus,
.blog:focus { outline: none; }

/* ------------------------------------------- reading size (scales with screen) */

.item-page { font-size: 16px; }

body.site .item-page p,
body.site .item-page li,
body.site .item-page td { font-size: inherit; line-height: 1.7; }

body.site .xm-entry .item_introtext,
body.site .xm-entry .item_introtext p { font-size: 17px; line-height: 1.7; }

@media (min-width: 768px) {
    .item-page { font-size: 17px; }
}

@media (min-width: 1200px) {
    .item-page { font-size: 18px; }
}

@media (min-width: 1600px) {
    .item-page { font-size: 19px; }
}

/* ------------------------------------------- footer bottom (matches live) */

.xm-copyright { padding: 45px 0 40px; text-transform: none; }

.xm-copyright .container { align-items: flex-start; }

.xm-copyright__brand {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 6px 14px;
}

.xm-copyright__logo { display: block; line-height: 0; }
.xm-copyright__logo img { width: 390px; max-width: 100%; height: auto; }

body.site .xm-copyright__text {
    margin: 0 0 4px;
    font-size: 12px;
    line-height: 1.4;
    text-transform: none;
    color: var(--xm-muted);
}

.xm-copyright__text a { margin-left: 4px; }

/* Footer links: uppercase, dot separators */
.xm-copyright .c-nav__list,
.xm-copyright ul.mod-menu { gap: 0; padding-top: 6px; }

.xm-copyright .c-nav__list li a,
.xm-copyright ul.mod-menu li a {
    font-size: 12px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.xm-copyright .c-nav__list li + li::before,
.xm-copyright ul.mod-menu li + li::before {
    content: "\2022";
    margin: 0 9px;
    font-size: 10px;
    color: var(--xm-muted);
}

@media (max-width: 767px) {
    .xm-copyright .container { flex-direction: column; align-items: center; text-align: center; }
    .xm-copyright__brand { flex-direction: column; align-items: center; }
    .xm-copyright__logo img { width: 260px; }
    .xm-copyright .c-nav__list,
    .xm-copyright ul.mod-menu { justify-content: center; }
}

/* Footer links stay plain grey like the live site (no underline for the current page) */
body.site .xm-copyright a,
body.site .xm-copyright a:focus,
body.site .xm-copyright .active > a { text-decoration: none; font-weight: 400; color: var(--xm-muted); background: none; }
body.site .xm-copyright a:hover { color: #fff; }

/* Phones: links wrap, so use spacing instead of dots (no stray dot at a line start) */
@media (max-width: 767px) {
    .xm-copyright .c-nav__list,
    .xm-copyright ul.mod-menu { gap: 6px 18px; }

    .xm-copyright .c-nav__list li + li::before,
    .xm-copyright ul.mod-menu li + li::before { content: none; }
}

/* ================================================================ motion */

/* Smooth cross-fade between pages (View Transitions; other browsers navigate normally) */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: .35s; animation-timing-function: ease; }

@keyframes xm-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}

@keyframes xm-settle {
    from { transform: scale(1.07); }
    to   { transform: scale(1); }
}

/* Page header: title, subtitle, button rise in one after another */
.xm-anim .subheader > * { animation: xm-rise .8s cubic-bezier(.2, .65, .3, 1) both; }
.xm-anim .subheader > *:nth-child(2) { animation-delay: .12s; }
.xm-anim .subheader > *:nth-child(3) { animation-delay: .24s; }

/* Home hero: slow settle on the photo, caption rises in on each slide */
.xm-anim .xm-hero__slide.is-active .xm-hero__img { animation: xm-settle 9s ease-out both; }
.xm-anim .xm-hero__slide.is-active .xm-hero__caption > * { animation: xm-rise .9s cubic-bezier(.2, .65, .3, 1) both; animation-delay: .35s; }
.xm-anim .xm-hero__slide.is-active .xm-hero__caption > *:nth-child(2) { animation-delay: .5s; }

/* Scroll reveal: hidden until xm.js marks them in view (.is-in) */
.xm-anim :is(.xm-card, .xm-news-card, .xm-entry, .blog .items-row, .xm-feature .xm-intro, .xm-homevideo, .xm-mainbottom .row, .xm-mainbottom h4, .item-page, .xm-content-bottom > *, .eventinfo) {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.2, .65, .3, 1), transform .7s cubic-bezier(.2, .65, .3, 1);
    transition-delay: var(--xm-delay, 0ms);
}

.xm-anim :is(.xm-card, .xm-news-card, .xm-entry, .blog .items-row, .xm-feature .xm-intro, .xm-homevideo, .xm-mainbottom .row, .xm-mainbottom h4, .item-page, .xm-content-bottom > *, .eventinfo).is-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

/* Card without any photo: branded placeholder (X-Marathon logo on a dark gradient), same 4:3 frame */
.xm-card__img--placeholder {
    aspect-ratio: 4 / 3;
    background:
        url("../../../images/footer_logo.png") center / 58% auto no-repeat,
        linear-gradient(135deg, #0d1b2a 0%, #1c3d63 55%, var(--xm-accent) 130%);
}

/* Past editions rows: the row photo replaces inline photos in the intro text
   (old posts float fixed-width images that squeeze the text, especially on phones) */
.blog .items-row .item > :not(figure) img { display: none; }
.blog .items-row .item > :not(figure) [style*="float"] { float: none !important; width: auto !important; }

.blog .item figure.xm-row-image a { display: block; }

.blog .item figure.xm-row-image.xm-card__img--placeholder,
.blog .item figure.xm-row-image.xm-card__img--placeholder a { aspect-ratio: 4 / 3; }

/* Phones: photo full width on top, then title, text and button */
@media (max-width: 767px) {
    .blog .items-row .item { padding: 22px 0; }
    .blog .item figure.item-image { margin: 0 0 14px; }
    body.site .blog .item .page-header h2 { font-size: 19px; }
}

/* Phones: Joomla floats intro images left ("Image Float"); stack them full width instead */
@media (max-width: 767px) {
    .blog .item figure.item-image {
        float: none !important;
        width: 100% !important;
        max-width: none;
    }

    .blog .item figure.item-image img { width: 100%; }
}

/* ==========================================================================
   Shared Adventure Junkie page components ("aj"), copied from Coastal Quest
   aj-quest.css and themed for X-Marathon (tokens in section 1).
   Use in articles and modules: wrap content in <div class="aj"> and use the
   aj-* classes below. Do not add inline styles to articles or modules.
   ========================================================================== */
/* ============================================================
   aj-quest.css — Adventure Junkie shared article components
   Theme: Coastal Quest (blue). Paste into the template's user.css
   (Joomla 5 Cassiopeia: media/templates/site/cassiopeia/css/user.css).

   Same convention as sprint.css:
   - article HTML is clean markup: no <style>, no inline styles, no inline SVG
   - every rule is scoped under .aj, so nothing leaks into the template
   - icons are CSS masks on ::before, so TinyMCE can't strip them
   - all colour comes from tokens, so another Quest event (Adrenalin,
     Capital, Alpine) re-themes by overriding the token block only
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;0,800;1,800&display=swap');

/* ---------- 1. Tokens (theme: X-Marathon) ---------- */
.aj{
  --aj-c:#468eef;          /* X-Marathon blue (logo X, site buttons) */
  --aj-c-hover:#2a6fcf;
  --aj-c-btn:#468eef;      /* button fill: identical to site buttons */
  --aj-c-dark:#2a6fcf;     /* deeper blue for text/links on white (AA) */
  --aj-c-light:#9cc3f8;    /* light blue on dark backgrounds */
  --aj-c-tint:#f2f7fe;     /* pale blue tint */
  --aj-on-c:#fff;
  --aj-navy:#0d1b2a;       /* dark band / footer-ish */
  --aj-sand:#f4f6f9;       /* alternate section background */
  --aj-hot:#e5562a;        /* race-bib orange: warnings, Epic badge — use sparingly */
  --aj-ink:#1a1a1a;        /* body text (near-black, matches site headings) */
  --aj-muted:#555;
  --aj-line:#e4e4e4;
  --aj-card:#fff;
  --aj-radius:4px;         /* X-Marathon cards: near-square, like the site buttons */
  --aj-font-body:'Noto Sans','Droid Sans','Helvetica Neue',Arial,sans-serif;
  /* type scale — change these to resize every article at once */
  --aj-fs-body:18px;
  --aj-fs-lead:21px;
  --aj-fs-small:16.5px;
  --aj-fs-label:13.5px;       /* eyebrows, tags, fact labels */
  --aj-fs-h1:clamp(32px,4vw,46px);
  --aj-fs-h2:clamp(24px,2.6vw,32px);
  --aj-fs-h3:22px;
  --aj-lh:1.6;

  max-width:1200px;margin:0 auto;color:var(--aj-ink);font-family:var(--aj-font-body);
  --aj-fs:var(--aj-fs-body);font-size:var(--aj-fs-body);line-height:var(--aj-lh);
}
/* beat template rules on bare p/li/td (they set their own size + line-height) */
.aj p,.aj li,.aj td,.aj th,.aj figcaption,.aj small,.aj span{line-height:var(--aj-lh);}
.aj p,.aj li,.aj td{--aj-fs:inherit;font-size:inherit;font-family:inherit;}
.aj *,.aj *::before,.aj *::after{box-sizing:border-box;}
/* headings use the template's own heading font — no font-family set here */
.aj h1,.aj h2,.aj h3,.aj h4{color:var(--aj-ink);margin:0;line-height:1.15;}
.aj p,.aj ul,.aj ol,.aj figure{margin:0;}
.aj img{max-width:100%;height:auto;display:block;}
.aj a{color:var(--aj-c-dark);text-decoration-thickness:1px;text-underline-offset:2px;}
.aj a:hover{color:var(--aj-c-hover);}
.aj a:focus-visible,.aj .aj-btn:focus-visible{outline:3px solid var(--aj-c-dark);outline-offset:3px;}
.aj strong{font-weight:700;}

/* ---------- 2. Icons (mask on ::before — colour = currentColor) ---------- */
.aj .aj-ic::before{content:"";display:inline-block;flex:none;width:1.6em;height:1.6em;
  background:currentColor;-webkit-mask:var(--aj-i) center/contain no-repeat;mask:var(--aj-i) center/contain no-repeat;}
.aj .aj-ic--check{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");}
.aj .aj-ic--pin{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-6.2 7-12a7 7 0 1 0-14 0c0 5.8 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");}
.aj .aj-ic--cal{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");}
.aj .aj-ic--clock{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E");}
.aj .aj-ic--trek{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 20 9 8.5l3.8 6.6L15.5 11 21.5 20z'/%3E%3Cpath d='M7.4 11.3 9 12.6l1.6-1.4'/%3E%3C/svg%3E");}
.aj .aj-ic--bike{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5.5' cy='16.5' r='3.5'/%3E%3Ccircle cx='18.5' cy='16.5' r='3.5'/%3E%3Cpath d='M5.5 16.5 9.5 9h6l3 7.5M9.5 9l3 7.5h-7M13.5 6h3l-1 3'/%3E%3C/svg%3E");}
.aj .aj-ic--kayak{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 15.5c4.5-3 14.5-3 19 0-4.5 3-14.5 3-19 0z'/%3E%3Cpath d='M5 5.5l14 14'/%3E%3Cpath d='M3.6 4.1 6.4 6.9M17.6 18.1l2.8 2.8'/%3E%3C/svg%3E");}
.aj .aj-ic--nav{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15.5 8.5-2 5-5 2 2-5z'/%3E%3C/svg%3E");}
.aj .aj-ic--info{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E");}
.aj .aj-ic--alert{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2.5 20h19z'/%3E%3Cpath d='M12 10v4M12 17h.01'/%3E%3C/svg%3E");}
.aj .aj-ic--arrow{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");}
.aj .aj-ic--wave{--aj-i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9c2.5-2.5 5-2.5 7.5 0s5 2.5 7.5 0 3.5-2 5-1M2 15c2.5-2.5 5-2.5 7.5 0s5 2.5 7.5 0 3.5-2 5-1'/%3E%3C/svg%3E");}

/* ---------- 3. Intro / page header ---------- */
.aj .aj-intro{text-align:center;padding:16px 0 40px;}
.aj .aj-eyebrow{display:inline-flex;align-items:center;gap:8.8px;font-family:var(--aj-font-body);font-weight:800;
  text-transform:uppercase;letter-spacing:.16em;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);color:var(--aj-c-dark);}
.aj .aj-eyebrow.aj-ic::before{width:1.5em;height:1.5em;color:var(--aj-c);}
.aj .aj-intro h1{--aj-fs:var(--aj-fs-h1);font-size:var(--aj-fs-h1);font-weight:800;text-transform:uppercase;letter-spacing:.01em;margin:9.6px auto 16px;max-width:22ch;}
.aj .aj-lead{color:var(--aj-muted);--aj-fs:var(--aj-fs-lead);font-size:var(--aj-fs-lead);--aj-lh:1.5;max-width:60ch;margin:0 auto 25.6px;}
/* "SURF COAST VICTORIA" highlight band from the hero */
.aj .aj-mark{display:inline-block;background:var(--aj-c);color:var(--aj-on-c);font-family:var(--aj-font-body);font-weight:700;
  text-transform:uppercase;letter-spacing:.02em;padding:.15em .45em;line-height:1.3;}

/* ---------- 4. Sections + titles ---------- */
.aj .aj-section{margin:0 0 52px;}
.aj .aj-section--sand{background:var(--aj-sand);padding:36px clamp(16px,3vw,36px);border-radius:var(--aj-radius);}
.aj .aj-title{--aj-fs:var(--aj-fs-h2);font-size:var(--aj-fs-h2);font-weight:800;text-transform:uppercase;letter-spacing:.02em;
  margin:0 0 20px;padding-bottom:11.2px;position:relative;}
.aj .aj-title::after{content:"";position:absolute;left:0;bottom:0;width:52px;height:4px;background:var(--aj-c);}
.aj .aj-title--center{text-align:center;}
.aj .aj-title--center::after{left:50%;transform:translateX(-50%);}
.aj .aj-sub{--aj-fs:var(--aj-fs-h3);font-size:var(--aj-fs-h3);font-weight:700;margin:24px 0 8px;}
.aj .aj-prose > * + *{margin-top:16px;}
.aj .aj-prose{max-width:none;}
.aj .aj-note{color:var(--aj-muted);--aj-fs:var(--aj-fs-small);font-size:var(--aj-fs-small);margin-top:16px;}
.aj .aj-note--center{text-align:center;}
.aj .aj-note + .aj-cards,.aj .aj-note + .aj-tiers{margin-top:20px;}
.aj .aj-prose + .aj-disc,.aj .aj-prose + .aj-cards{margin-top:24px;}

/* ---------- 5. Buttons + CTAs ---------- */
.aj .aj-btn{display:inline-block;background:var(--aj-c-btn);color:var(--aj-on-c)!important;text-decoration:none;
  font-family:var(--aj-font-body);font-style:italic;font-weight:800;--aj-fs:18px;font-size:18px;text-transform:uppercase;letter-spacing:.03em;
  padding:13.6px 38.4px;border-radius:0;border:2px solid var(--aj-c-btn);transition:background .15s ease,transform .15s ease;}
.aj .aj-btn:hover{background:var(--aj-c-dark);border-color:var(--aj-c-dark);transform:translateY(-1px);}
.aj .aj-btn--ghost{background:transparent;color:var(--aj-c-dark)!important;}
.aj .aj-btn--ghost:hover{color:var(--aj-on-c)!important;}
.aj .aj-final{text-align:center;margin:40px 0 16px;}
.aj .aj-ctaband{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px 32px;
  background:var(--aj-navy);color:#fff;padding:32px clamp(20px,3vw,40px);border-radius:var(--aj-radius);margin:48px 0 16px;
  border-left:6px solid var(--aj-c);}
.aj .aj-ctaband h2{color:#fff;--aj-fs:var(--aj-fs-h2);font-size:var(--aj-fs-h2);font-weight:800;text-transform:uppercase;}
.aj .aj-ctaband p{color:#c9d6e0;margin-top:5.6px;}
.aj .aj-ctaband .aj-btn:hover{background:#fff;border-color:#fff;color:var(--aj-navy)!important;}

/* ---------- 6. Cards (course cards, how-to cards, kit groups, schedule days) ---------- */
.aj .aj-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:24px;align-items:start;}
.aj .aj-cards--2{grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));}
.aj .aj-cards--stretch{align-items:stretch;}
.aj .aj-card{background:var(--aj-card);border:1px solid var(--aj-line);border-radius:var(--aj-radius);overflow:hidden;
  box-shadow:0 1px 2px rgba(19,42,60,.05),0 8px 24px rgba(19,42,60,.06);display:flex;flex-direction:column;}
.aj .aj-card__head{display:flex;flex-wrap:wrap;align-items:center;gap:4.8px 11.2px;background:var(--aj-c);color:var(--aj-on-c);padding:16px 24px;}
.aj .aj-card__head h3{color:inherit;--aj-fs:var(--aj-fs-h3);font-size:var(--aj-fs-h3);font-weight:800;text-transform:uppercase;letter-spacing:.02em;}
.aj .aj-card__head .aj-day{margin-left:auto;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);font-weight:700;text-transform:uppercase;letter-spacing:.08em;opacity:.95;white-space:nowrap;}
.aj .aj-card__head.aj-ic::before{width:1.5em;height:1.5em;}
.aj .aj-card__head--dark{background:var(--aj-navy);}
.aj .aj-card__head--hot{background:var(--aj-hot);}
.aj .aj-card__body{padding:24px;flex:1;}
.aj .aj-card__body > * + *{margin-top:12.8px;}
.aj .aj-card__foot{padding:17.6px 24px;border-top:1px solid var(--aj-line);background:var(--aj-c-tint);}
.aj .aj-card--plain .aj-card__body h3{--aj-fs:var(--aj-fs-h3);font-size:var(--aj-fs-h3);font-weight:800;text-transform:uppercase;letter-spacing:.02em;}
.aj .aj-card--link{transition:transform .15s ease,box-shadow .15s ease;}
.aj .aj-card--link:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(19,42,60,.06),0 14px 30px rgba(19,42,60,.1);}

/* ---------- 7. Pricing tiers (Enter) ---------- */
.aj .aj-tiers{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:24px;align-items:stretch;}
.aj .aj-tier{background:var(--aj-card);border:1px solid var(--aj-line);border-top:5px solid var(--aj-c);border-radius:var(--aj-radius);
  padding:22.4px 22.4px 19.2px;display:flex;flex-direction:column;box-shadow:0 8px 24px rgba(19,42,60,.06);}
.aj .aj-tier--feature{border-top-color:var(--aj-hot);}
.aj .aj-tier h3{--aj-fs:22.4px;font-size:22.4px;font-weight:800;text-transform:uppercase;}
.aj .aj-tier .aj-day{display:block;color:var(--aj-c-dark);font-weight:700;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);text-transform:uppercase;letter-spacing:.08em;margin:4px 0 16px;}
.aj .aj-tier--feature .aj-day{color:var(--aj-hot);}
.aj .aj-prices{width:100%;border-collapse:collapse;margin-top:auto;}
.aj .aj-prices th,.aj .aj-prices td{padding:9.6px 0;border-top:1px solid var(--aj-line);--aj-fs:var(--aj-fs-small);font-size:var(--aj-fs-small);}
.aj .aj-prices th{text-align:left;font-weight:600;color:var(--aj-muted);}
.aj .aj-prices td{text-align:right;font-family:var(--aj-font-body);font-weight:800;--aj-fs:19.2px;font-size:19.2px;font-variant-numeric:tabular-nums;}
.aj .aj-prices tr:first-child td{color:var(--aj-c-dark);}
.aj .aj-per{color:var(--aj-muted);--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);margin-top:9.6px;text-align:right;}

/* ---------- 8. Lists ---------- */
.aj .aj-list{list-style:none;padding:0;display:grid;gap:10.4px;}
.aj .aj-list--cols{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));column-gap:32px;}
.aj .aj-list > li{position:relative;padding-left:30.4px;}
.aj .aj-list > li::before{content:"";position:absolute;left:0;top:.2em;width:1.25em;height:1.25em;background:var(--aj-c);
  -webkit-mask:var(--aj-i) center/contain no-repeat;mask:var(--aj-i) center/contain no-repeat;}
.aj{--aj-i-check:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");--aj-i-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");}
.aj .aj-list > li{--aj-i:var(--aj-i-check);}
.aj .aj-list--arrow > li{--aj-i:var(--aj-i-arrow);}
/* kit list: item + who-carries tag */
.aj .aj-kit{list-style:none;padding:0;}
.aj .aj-kit > li{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;padding:11.2px 0;border-bottom:1px solid var(--aj-line);}
.aj .aj-kit > li:last-child{border-bottom:0;}
.aj .aj-kit .aj-kit__what{flex:1;}
.aj .aj-kit .aj-kit__what small{display:block;color:var(--aj-muted);--aj-fs:var(--aj-fs-small);font-size:var(--aj-fs-small);margin-top:2.4px;}
.aj .aj-tag{flex:none;display:inline-block;background:var(--aj-c-tint);color:var(--aj-c-dark);font-weight:700;
  text-transform:uppercase;letter-spacing:.07em;padding:.3em .65em;border-radius:2px;white-space:nowrap;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);}
.aj .aj-tag--hot{background:#fdeae3;color:#a8361a;}

/* ---------- 9. Quick facts (distances, event facts) ---------- */
.aj .aj-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,120px),1fr));gap:12px;list-style:none;padding:0;}
.aj .aj-card__foot .aj-facts{grid-template-columns:repeat(3,minmax(0,1fr));}
.aj .aj-facts > li{display:flex;flex-direction:column;align-items:flex-start;gap:2.4px;}
.aj .aj-facts .aj-fact__k{--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--aj-muted);display:flex;align-items:center;gap:5.6px;}
.aj .aj-facts .aj-fact__k.aj-ic::before{width:1.25em;height:1.25em;color:var(--aj-c);}
.aj .aj-facts .aj-fact__v{font-family:var(--aj-font-body);font-weight:800;--aj-fs:20px;font-size:20px;color:var(--aj-ink);font-variant-numeric:tabular-nums;}

/* ---------- 10. Discipline tiles ---------- */
.aj .aj-disc{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:20px;}
.aj .aj-disc > div{background:var(--aj-c-tint);border-radius:var(--aj-radius);padding:22.4px 20px;}
.aj .aj-disc h3{display:flex;align-items:center;gap:10.4px;--aj-fs:var(--aj-fs-h3);font-size:var(--aj-fs-h3);font-weight:800;text-transform:uppercase;color:var(--aj-c-dark);margin-bottom:8px;}
.aj .aj-disc h3.aj-ic::before{width:32px;height:32px;color:var(--aj-c);}
.aj .aj-disc p{color:var(--aj-muted);--aj-fs:var(--aj-fs-body);font-size:var(--aj-fs-body);}

/* ---------- 11. Policy timeline (refunds) ---------- */
.aj .aj-timeline{list-style:none;padding:0;position:relative;display:grid;gap:20px;}
.aj .aj-timeline::before{content:"";position:absolute;left:11.2px;top:6.4px;bottom:6.4px;width:3px;background:var(--aj-line);}
.aj .aj-timeline > li{position:relative;padding-left:41.6px;}
.aj .aj-timeline > li::before{content:"";position:absolute;left:0;top:3.2px;width:23.2px;height:23.2px;border-radius:50%;
  background:var(--aj-card);border:4px solid var(--aj-c);}
.aj .aj-timeline > li.aj-timeline--mid::before{border-color:#f0a23a;}
.aj .aj-timeline > li.aj-timeline--end::before{border-color:var(--aj-hot);}
.aj .aj-timeline h3{--aj-fs:var(--aj-fs-h3);font-size:var(--aj-fs-h3);font-weight:800;text-transform:uppercase;letter-spacing:.02em;margin-bottom:6.4px;}
.aj .aj-timeline .aj-list{margin-top:4.8px;}

/* ---------- 12. Callouts ---------- */
.aj .aj-callout{display:flex;gap:14.4px;align-items:flex-start;background:var(--aj-c-tint);border-left:5px solid var(--aj-c);
  padding:16px 20px;border-radius:0 var(--aj-radius) var(--aj-radius) 0;margin:24px 0;}
.aj .aj-callout.aj-ic::before{color:var(--aj-c-dark);width:1.5em;height:1.5em;margin-top:.05em;}
.aj .aj-callout > div > * + *{margin-top:6.4px;}
.aj .aj-callout--hot{background:#fdf0eb;border-left-color:var(--aj-hot);}
.aj .aj-callout--hot.aj-ic::before{color:var(--aj-hot);}

/* ---------- 13. Split (text + image) + gallery ---------- */
.aj .aj-split{display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:center;}
.aj .aj-split--rev > :first-child{order:2;}
.aj .aj-split img,.aj .aj-gallery img{width:100%;aspect-ratio:3/2;object-fit:cover;border-radius:var(--aj-radius);}
.aj .aj-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;}
.aj figcaption{--aj-fs:var(--aj-fs-small);font-size:var(--aj-fs-small);color:var(--aj-muted);margin-top:7.2px;}

/* ---------- 14. Schedule (module) ---------- */
.aj .aj-table{width:100%;border-collapse:collapse;}
.aj .aj-table td{padding:11.2px 20px;border-bottom:1px solid var(--aj-line);vertical-align:top;}
.aj .aj-table tr:last-child td{border-bottom:0;}
.aj .aj-table .t-time{white-space:nowrap;width:1%;font-weight:700;font-variant-numeric:tabular-nums;color:var(--aj-c-dark);}
.aj .aj-table .t-who{display:inline-block;margin-left:5.6px;}
.aj .aj-card .aj-table{margin:0;}
.aj .aj-card__body--flush{padding:0;}

/* ---------- 15. Event hero (event booking page) — details card + pitch, same layout as Sprint ---------- */
.aj .aj-hero{display:grid;grid-template-columns:minmax(280px,400px) 1fr;gap:40px;align-items:start;}
.aj .aj-details{background:var(--aj-card);border:1px solid var(--aj-line);border-radius:16px;overflow:hidden;
  box-shadow:0 2px 4px rgba(19,42,60,.05),0 14px 34px rgba(19,42,60,.08);}
.aj .aj-details__head{background:var(--aj-c);color:var(--aj-on-c);font-weight:800;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);
  text-transform:uppercase;letter-spacing:.14em;padding:13.6px 20px 13.6px 84px;}
.aj .aj-details ul{list-style:none;padding:0;margin:0;}
.aj .aj-details li{position:relative;min-height:84px;padding:16px 20px 16px 84px;border-top:1px solid var(--aj-line);
  display:flex;flex-direction:column;justify-content:center;}
.aj .aj-details li:first-child{border-top:0;}
/* icon tile = ::after (tint square), icon = ::before (mask) on top */
.aj .aj-details li::after{content:"";position:absolute;left:20px;top:50%;width:48px;height:48px;margin-top:-24px;
  border-radius:10px;background:var(--aj-c-tint);}
.aj .aj-details li.aj-ic::before{position:absolute;left:32px;top:50%;width:24px;height:24px;margin-top:-12px;z-index:1;color:var(--aj-c-dark);}
.aj .aj-details__k{display:block;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--aj-muted);}
.aj .aj-details__v{display:block;--aj-fs:20.8px;font-size:20.8px;font-weight:800;color:var(--aj-ink);}
.aj .aj-hero__pitch > * + *{margin-top:17.6px;}
.aj .aj-hero__pitch .aj-eyebrow{margin-top:8px;}
.aj .aj-hero__title{--aj-fs:var(--aj-fs-h2);font-size:var(--aj-fs-h2);font-weight:800;line-height:1.2;text-transform:none;letter-spacing:0;}
.aj .aj-hero__lead{color:var(--aj-muted);--aj-fs:var(--aj-fs-lead);font-size:var(--aj-fs-lead);}
.aj .aj-hero__facts{font-weight:700;color:var(--aj-ink);}
.aj .aj-hero__facts strong{color:var(--aj-c-dark);}
.aj .aj-hero__note{color:var(--aj-muted);--aj-fs:var(--aj-fs-small);font-size:var(--aj-fs-small);}

/* ---------- 15b. Dynamic pricing (PHP module) — Sprint layout, 4 courses per phase ---------- */
.aj .aj-pricing__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:stretch;}
.aj .aj-ptier{background:var(--aj-card);border:1px solid var(--aj-line);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;
  box-shadow:0 2px 4px rgba(19,42,60,.05),0 14px 34px rgba(19,42,60,.08);}
.aj .aj-ptier--featured{border:2px solid var(--aj-c);transform:translateY(-6px);box-shadow:0 4px 8px rgba(19,42,60,.06),0 22px 44px rgba(27,165,223,.18);}
.aj .aj-ptier__name{text-align:center;font-weight:800;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);text-transform:uppercase;letter-spacing:.14em;color:var(--aj-ink);
  padding:16px 16px 14.4px;display:flex;align-items:center;justify-content:center;gap:9.6px;flex-wrap:wrap;}
.aj .aj-ptier__badge{background:var(--aj-navy);color:#fff;--aj-fs:11.52px;font-size:11.52px;letter-spacing:.08em;padding:.3em .8em;border-radius:999px;}
.aj .aj-ptier__list{list-style:none;padding:6.4px 20px;margin:0;background:var(--aj-c-tint);}
.aj .aj-ptier--featured .aj-ptier__list{background:var(--aj-c);color:#fff;}
.aj .aj-ptier__list li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:11.2px 0;border-top:1px solid rgba(19,42,60,.08);}
.aj .aj-ptier__list li:first-child{border-top:0;}
.aj .aj-ptier--featured .aj-ptier__list li{border-top-color:rgba(255,255,255,.25);}
.aj .aj-ptier__course{font-weight:700;}
.aj .aj-ptier__course small{display:block;font-weight:600;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);opacity:.75;text-transform:uppercase;letter-spacing:.06em;}
.aj .aj-ptier__amt{font-weight:800;--aj-fs:30.4px;font-size:30.4px;line-height:1;font-variant-numeric:tabular-nums;white-space:nowrap;}
.aj .aj-ptier__amt sup{--aj-fs:.5em;font-size:.5em;vertical-align:.7em;margin-right:.08em;}
.aj .aj-ptier--closed .aj-ptier__amt,.aj .aj-ptier--closed .aj-ptier__course{opacity:.55;}
.aj .aj-ptier__per{text-align:center;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--aj-muted);padding:12.8px 16px 0;}
.aj .aj-ptier__until{text-align:center;color:var(--aj-muted);padding:5.6px 16px 16px;}
.aj .aj-ptier__action{margin-top:auto;padding:0 20px 20px;}
.aj .aj-ptier__btn{display:block;text-align:center;font-weight:800;text-transform:uppercase;letter-spacing:.05em;padding:13.6px 16px;border-radius:4px;text-decoration:none;}
.aj .aj-ptier__btn--open{background:var(--aj-c-btn);color:#fff!important;font-style:italic;--aj-fs:18px;font-size:18px;transition:background .15s ease;}
.aj .aj-ptier__btn--open:hover{background:var(--aj-c-hover);}
.aj .aj-ptier__btn--soon{background:var(--aj-c-tint);color:var(--aj-c-dark);}
.aj .aj-ptier__btn--closed{background:#efefef;color:#8a8a8a;}

/* ---------- 15c. Event details body (event page module) ---------- */
.aj .aj-qf{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:16px;}
.aj .aj-qf > li{background:var(--aj-card);border:1px solid var(--aj-line);border-radius:12px;padding:14.4px 16px;text-align:center;}
.aj .aj-qf__k{display:block;--aj-fs:12px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--aj-muted);}
.aj .aj-qf__v{display:block;font-weight:800;color:var(--aj-ink);margin-top:2.4px;}
.aj .aj-panel{background:var(--aj-c-tint);border-radius:16px;padding:28px 32px;}
.aj .aj-panel > * + *{margin-top:16px;}
.aj .aj-panel__punch{font-weight:800;color:var(--aj-c-dark);--aj-fs:var(--aj-fs-lead);font-size:var(--aj-fs-lead);}
.aj .aj-kicker{display:flex;align-items:center;gap:12.8px;font-weight:800;--aj-fs:var(--aj-fs-label);font-size:var(--aj-fs-label);text-transform:uppercase;letter-spacing:.14em;color:var(--aj-c-dark);margin:0 0 16px;}
.aj .aj-kicker::before{content:"";width:52px;height:4px;border-radius:2px;background:var(--aj-c);flex:none;}
.aj .aj-card--round{border-radius:16px;}
.aj .aj-dist{list-style:none;padding:0 20px;margin:0;}
.aj .aj-dist li{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:12px 0;border-top:1px solid var(--aj-line);}
.aj .aj-dist li:first-child{border-top:0;}
.aj .aj-dist__k{font-weight:700;}
.aj .aj-dist__v{font-weight:800;color:var(--aj-c-dark);white-space:nowrap;font-variant-numeric:tabular-nums;}
.aj .aj-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:24px 48px;}
.aj .aj-ctaband--center{flex-direction:column;justify-content:center;text-align:center;border-left:0;border-radius:16px;padding:36px 24px;}
.aj .aj-ctaband--center .aj-btn{border-radius:4px;}

/* ---------- 16. Responsive + motion ---------- */
@media (max-width:760px){
  .aj{--aj-fs-body:17px;--aj-fs-lead:19px;--aj-fs-small:16px;--aj-fs-label:13px;--aj-fs-h1:30px;--aj-fs-h2:24px;--aj-fs-h3:20px;}
  .aj .aj-split,.aj .aj-hero{grid-template-columns:1fr;gap:24px;}
  .aj .aj-pricing__grid{grid-template-columns:1fr;}
  .aj .aj-ptier--featured{transform:none;order:-1;}
  .aj .aj-split--rev > :first-child{order:0;}
  .aj .aj-gallery{grid-template-columns:1fr 1fr;}
  .aj .aj-ctaband{flex-direction:column;align-items:flex-start;}
  .aj .aj-table td{padding:10.4px 14.4px;}
}
@media (max-width:480px){ .aj .aj-gallery{grid-template-columns:1fr;} .aj .aj-btn{display:block;text-align:center;} }
@media (prefers-reduced-motion:reduce){ .aj *{transition:none!important;} }

/* ---------- 17. Template-proof text ----------
   Joomla templates style bare p/li/td/h* (size, line-height, font) with rules that
   outrank ours. These lock text inside .aj to this file's own scale. */
html body .aj :is(p,li,td,th,dd,dt,figcaption,blockquote,small){
  font-size:var(--aj-fs)!important;line-height:var(--aj-lh)!important;font-family:inherit!important;}
html body .aj :is(h1,h2,h3,h4){font-size:var(--aj-fs)!important;line-height:1.15!important;}

/* ---------- 18. X-Marathon template overrides ----------
   xm.css colours every .item-page h3 blue (body.site .item-page h3); inside aj
   components the heading colour must come from the component instead. */
body.site .aj :is(h1,h2,h3,h4,h5){color:var(--aj-ink);}
body.site .aj .aj-card__head :is(h2,h3,h4),
body.site .aj .aj-ctaband :is(h2,h3,h4),
body.site .aj .aj-final :is(h2,h3,h4){color:inherit;}
body.site .aj .aj-title,body.site .aj .aj-sub{color:var(--aj-ink);}

/* ---------- 19. X-Marathon layout fixes ----------
   The template gives every h2/h3 large top/bottom margins; inside card headers
   that pushes the title below its icon and makes long titles wrap under it. */
body.site .aj .aj-card__head{flex-wrap:nowrap;}
body.site .aj .aj-card__head :is(h2,h3,h4){margin:0 !important;flex:1 1 auto;min-width:0;}
body.site .aj .aj-card__head .aj-day{flex:0 0 auto;margin-left:auto;}
/* single pricing tier: centre it instead of leaving empty grid columns */
.aj .aj-pricing__grid--1{grid-template-columns:minmax(0,440px);justify-content:center;}

/* ---------- 20. X-Marathon SEO: one H1 per page ----------
   The page header already prints the H1, so article intros use an h2 with the
   same look as the old intro h1. */
.aj .aj-intro .aj-intro__title{--aj-fs:var(--aj-fs-h1);font-size:var(--aj-fs-h1);font-weight:800;text-transform:uppercase;letter-spacing:.01em;margin:9.6px auto 16px;max-width:22ch;line-height:1.15;}
