*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --global--font-primary: sofia-pro, "Avenir Next", Avenir, sans-serif;
    --global--font-secondary: "Inter", sans-serif;
    --global--font-size-base: 1rem;
    --global--font-size-body: 1.125rem;
    --global--font-size-xs: 0.75rem;
    --global--font-size-sm: 0.94rem;
    --global--font-size-md: 1.25rem;
    --global--font-size-lg: 3.375rem;
    --global--font-size-xl: 3.875rem;
    --global--font-size-page-title: var(--global--font-size-xl);
    --global--line-height-body: 1.6;
    --global--line-height-heading: 1.1;
    --global--color-the-airline-blue: #00377B;
    --global--color-the-airline-light-blue: #0072BC;
    --global--color-the-airline-bright-blue: #5DA9DD;
    --global--color-the-airline-pale-blue: #F3FAFF;
    --global--color-the-airline-grey-blue: #F0F2F7;
    --global--color-the-airline-yellow: #FFF200;
    --global--color-primary: #333333;
    --global--color-secondary: #00377B;
    --global--color-link: #0072BC;
    --global--color-link-hover: #5DA9DD;
}

body {
    font-family: var(--global--font-secondary);
    font-size: var(--global--font-size-body);
    font-weight: 400;
    margin: 0;
    color: var(--global--color-primary);
    background: #f3f3f3;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: var(--global--line-height-body);
}

header {
    background: var(--global--color-the-airline-blue);
    color: #fff;
    padding: 0 1.5rem;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    min-height: 104px;
    margin: 0 auto;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 64px;
    width: auto;
    max-width: 100%;
    display: block;
}

@media (max-width: 480px) {
    .logo img {
        height: auto;
        max-height: 40px;
    }
}

/* --- Nav toggle button (hidden on desktop) --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 4px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: opacity 0.2s;
}

.nav-primary ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-primary a {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 12px 7px 12px 10px;
    color: #fff;
    text-decoration: none;
    text-underline-offset: 3px;
    font-family: var(--global--font-secondary);
    font-size: 15px;
    font-weight: 600;
    line-height: 18px;
    transition: opacity 0.2s;
}

.nav-primary a:hover {
    opacity: 0.8;
}

.nav-primary a.is-active,
.nav-primary a.is-active:hover,
.nav-primary a.is-active:visited {
    color: var(--global--color-the-airline-yellow);
    opacity: 1;
}

main {
    flex: 1 0 auto;
    width: 100%;
    padding: 1.9rem 1.5rem 2.4rem;
    max-width: 1240px;
    margin: 0 auto;
}

main h1,
main h2,
main h3 {
    font-family: var(--global--font-primary);
    color: var(--global--color-secondary);
    letter-spacing: normal;
    font-weight: 600;
}

main h1 {
    font-size: 62px;
    line-height: 1.1;
}

main h2 {
    font-size: var(--global--font-size-lg);
    line-height: var(--global--line-height-heading);
}

main h3 {
    font-size: calc(1.4 * var(--global--font-size-md));
    line-height: var(--global--line-height-heading);
}

main p,
main li {
    font-size: 18px;
    color: var(--global--color-primary);
    line-height: var(--global--line-height-body);
}

a {
    color: var(--global--color-link);
}

a:hover {
    color: var(--global--color-link-hover);
}

.departureBoard {
    width: 100%;
    max-width: 1100px;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #fff;
}

.departureBoard th {
    background: var(--global--color-the-airline-blue);
    color: #fff;
}

.departureBoard th,
.departureBoard td {
    padding: 0.75rem;
    border: 1px solid #d7ddea;
    text-align: left;
}

.live-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}

.live-status lottie-player {
    width: 72px;
    /* height: 44px; */
}

.departureBoard td.departure-time--link {
    cursor: pointer;
    text-decoration: underline dotted;
    text-underline-offset: 0.12em;
}

.departureBoard td.departure-time--link:hover {
    color: #0d2d5e;
}

/* Stop cards */
.stops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card {
    border: 1px solid #d7ddea;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.card__header {
    background: var(--global--color-the-airline-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.card__header-label {
    font-weight: 700;
    font-size: 1rem;
}

.card__header-icon {
    background: var(--global--color-the-airline-bright-blue);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card__header-icon .material-icons {
    font-size: 1.4rem;
    color: var(--global--color-the-airline-yellow);
}

.card__body {
    padding: 1.25rem;
}

.stops-route-map {
    width: 100%;
    height: 340px;
    border: 1px solid #d7ddea;
    border-radius: 6px;
    overflow: hidden;
    background: var(--global--color-the-airline-grey-blue);
}

.route-maps {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.route-map-panel {
    border: 1px solid #d7ddea;
    border-radius: 6px;
    background: #fff;
    padding: 1rem;
}

.route-map-panel h3 {
    margin: 0 0 0.75rem;
    color: var(--global--color-the-airline-blue);
}

.stop-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.stop-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--global--color-the-airline-grey-blue);
}

.stop-list li:last-child {
    border-bottom: none;
}

.stop-list a {
    color: var(--global--color-the-airline-blue);
    text-decoration: none;
    font-size: 0.95rem;
}

.stop-list a:hover {
    text-decoration: underline;
}

.stop-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

.stop-overview__details h2 {
    margin-top: 0;
}

.stop-overview__details p {
    margin: 0 0 0.75rem;
}

.stop-overview__map {
    min-width: 0;
    position: relative;
}

.map-fullscreen-toggle {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 500;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    background: rgba(0, 55, 123, 0.92);
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.map-fullscreen-toggle:hover {
    background: rgba(0, 55, 123, 1);
}

.stop-map {
    width: 100%;
    height: 320px;
    border: 1px solid #d7ddea;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    background: var(--global--color-the-airline-grey-blue);
}

.stop-overview__map:fullscreen {
    padding: 1rem;
    background: #fff;
}

.stop-overview__map:fullscreen .stop-map {
    height: calc(100vh - 2rem);
    border-radius: 0;
}

footer {
    margin-top: auto;
    background: #f3f3f3;
    border-top: 1px solid #d9d9d9;
}

.footer-main,
.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.9rem 1.5rem;
}

.footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border-bottom: 1px solid #d6d6d6;
}

.airline-footer-main__nav-app-wrapper {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
}

.airline-footer-main-navigation {
    display: none;
}

.airline-app-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.airline-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.airline-app img {
    width: auto;
    height: 38px;
    display: block;
}

.footer__logo {
    flex-shrink: 0;
}

.footer__logo img {
    width: 200px;
    max-width: 100%;
    height: auto;
    display: block;
}

.footer-bottom--brand {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d6d6d6;
}

.footer_corporate_logo {
    max-width: 200px;
}

.footer_corporate_logo img {
    width: 100%;
    height: auto;
    display: block;
}

.footer-bottom--legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-top: 1.25rem;
    padding-bottom: 1.4rem;
}

.copyright-text {
    margin: 0;
    font-family: var(--global--font-primary);
    color: var(--global--color-primary);
    font-size: 12.5px;
    line-height: 32px;
}

.airline-footer-bottom-navigation .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1.2rem;
}

.airline-footer-bottom-navigation a {
    font-family: var(--global--font-primary);
    color: var(--global--color-primary);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.2;
}

.airline-footer-bottom-navigation a:hover {
    text-decoration: underline;
}

.error-page {
    max-width: 640px;
    margin: 2.5rem auto 3.5rem;
}

.error-page h1 {
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e5ec;
    color: var(--global--color-the-airline-blue);
    font-size: 62px;
    line-height: 1.1;
}

.error-page p {
    margin: 0 0 1rem;
    color: var(--global--color-primary);
    font-size: 18px;
}

.btn {
    display: inline-block;
    margin-top: 0.4rem;
    border: 1px solid #0b3c80;
    border-radius: 4px;
    padding: 0.55rem 0.9rem;
    color: #0b3c80;
    text-decoration: none;
    font-weight: 600;
}

.btn:hover {
    background: #0b3c80;
    color: #fff;
}

.journey-timing-page {
    max-width: 980px;
}

.journey-live-page {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    background: #f2f3f6;
}

.journey-live {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    min-height: calc(100vh - 220px);
}

.journey-live__sidebar {
    background: #ffffff;
    border-right: 1px solid #d6dcea;
    overflow-y: auto;
}

.journey-live__header {
    background: #1f3760;
    color: #fff;
    padding: 0.9rem 1rem 0.8rem;
}

.journey-live__header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.journey-live__vehicle {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: min(360px, calc(100% - 1.8rem));
    max-height: calc(100% - 1.8rem);
    overflow-y: auto;
    z-index: 500;
}

.journey-live__vehicle:empty {
    display: none;
}

.journey-live__vehicle .journey-vehicle-card {
    background: #ffffff;
    border: 1px solid #d5dcea;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(16, 31, 61, 0.08);
    overflow: hidden;
}

.journey-live__vehicle .journey-vehicle-card__top {
    padding: 0.95rem 0.95rem 0.8rem;
    background: #ffffff;
    border-bottom: 1px solid #dde3ef;
}

.journey-live__vehicle .journey-vehicle-card__route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.journey-live__vehicle .journey-vehicle-card__badge {
    flex-shrink: 0;
    min-width: 80px;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #213866;
    color: #fff;
}

.journey-live__vehicle .journey-vehicle-card__brand {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.95;
    text-transform: lowercase;
}

.journey-live__vehicle .journey-vehicle-card__line {
    display: block;
    margin-top: 0.18rem;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
}

.journey-live__vehicle .journey-vehicle-card__destination {
    min-width: 0;
}

.journey-live__vehicle .journey-vehicle-card__destination-title {
    margin: 0;
    color: #182743;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.journey-live__vehicle .journey-vehicle-card__destination-subtitle {
    margin: 0.22rem 0 0;
    color: #4e5b76;
    font-size: 0.9rem;
    line-height: 1.28;
}

.journey-live__vehicle .journey-vehicle-card__bus {
    display: grid;
    place-items: center;
    min-height: 112px;
    margin-bottom: 0.8rem;
    border-radius: 10px;
    border: 1px solid #d8deea;
    background: linear-gradient(180deg, #eef3f8 0%, #dde6f0 100%);
}

.journey-live__vehicle .journey-vehicle-card__bus svg {
    width: 165px;
    height: auto;
    display: block;
}

.journey-live__vehicle .journey-vehicle-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.journey-live__vehicle .journey-vehicle-card__pill {
    flex: 1;
    min-width: 0;
    padding: 0.38rem 0.5rem;
    border: 1px solid #d1d9e6;
    border-radius: 6px;
    background: #fff;
    color: #1b2944;
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
}

.journey-live__vehicle .journey-vehicle-card__body {
    padding: 0.85rem 0.95rem 0.95rem;
}

.journey-live__vehicle .journey-vehicle-card__section + .journey-vehicle-card__section {
    margin-top: 0.9rem;
}

.journey-live__vehicle .journey-vehicle-card__heading {
    margin: 0 0 0.38rem;
    color: #1b2843;
    font-size: 0.84rem;
    font-weight: 800;
}

.journey-live__vehicle .journey-vehicle-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.22rem;
}

.journey-live__vehicle .journey-vehicle-card__list li {
    position: relative;
    padding-left: 0.82rem;
    color: #23314c;
    font-size: 0.78rem;
    line-height: 1.35;
}

.journey-live__vehicle .journey-vehicle-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42rem;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 999px;
    background: #39a457;
}

.journey-live__vehicle .journey-vehicle-card__empty {
    color: #6d7890;
    font-size: 0.8rem;
    font-style: italic;
}

.journey-live__header p {
    margin: 0.25rem 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.journey-live__timeline {
    margin: 0;
    padding: 0.7rem 0 1rem;
    list-style: none;
}

.journey-live__stop {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.3rem 0.55rem;
    padding: 0.38rem 1rem;
    border-left: 4px solid transparent;
    align-items: start;
}

.journey-live__stop.is-current {
    background: #f5f7fd;
    border-left-color: #233769;
}

.journey-live__time-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.05rem;
}

.journey-live__time {
    color: #2f3550;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
}

.journey-live__deviation {
    font-size: 0.73rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.journey-live__deviation--ontime {
    color: #1a7a38;
}

.journey-live__deviation--late {
    color: #b52020;
}

.journey-live__deviation--early {
    color: #b57a00;
}

.journey-live__name {
    color: #283149;
    font-size: 0.9rem;
    line-height: 1.25;
}

.journey-live__map-wrap {
    min-width: 0;
    position: relative;
}

.journey-live__map {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 104px);
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.journey-timing-query {
    margin: 1rem 0 1.2rem;
    border: 1px solid #d8deea;
    border-radius: 8px;
    background: #fff;
    padding: 0.85rem 1rem;
}

.journey-timing-message {
    margin: 0 0 0.8rem;
    font-size: 0.95rem;
}

.journey-timing-message--error {
    color: #9c2020;
}

.journey-timing-message--success {
    color: #1d6a33;
}

.journey-timing-message--loading {
    color: #364c78;
}

.journey-timing-table th,
.journey-timing-table td {
    font-size: 0.93rem;
}

@media (max-width: 700px) {
    /* Collapsed nav */
    .nav-toggle {
        display: flex;
    }

    .header-container {
        flex-wrap: wrap;
        align-items: center;
    }

    .logo img {
        height: 38px;
    }

    main h1 {
        font-size: calc(0.66 * var(--global--font-size-xl));
    }

    main h2 {
        font-size: calc(0.6 * var(--global--font-size-lg));
    }

    main h3 {
        font-size: calc(1.2 * var(--global--font-size-md));
    }

    .nav-primary {
        display: none;
        width: 100%;
        order: 3;
    }

    .nav-primary.is-open {
        display: block;
    }

    .nav-primary ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
    }

    .nav-primary ul li a {
        display: block;
        padding: 0.65rem 0.25rem;
        border-top: 1px solid rgba(255,255,255,0.12);
    }

    .stops-grid {
        grid-template-columns: 1fr;
    }

    .stop-overview {
        grid-template-columns: 1fr;
    }

    .stop-map {
        height: 260px;
    }

    .stops-route-map {
        height: 240px;
    }

    /* Departure board: collapse to card rows */
    .departureBoard,
    .departureBoard tbody {
        display: block;
    }

    .departureBoard thead {
        display: none;
    }

    .departureBoard tbody tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        column-gap: 0.75rem;
        padding: 0.85rem 1rem;
        border: none;
        border-bottom: 1px solid #d7ddea;
        border-left: 4px solid var(--global--color-the-airline-blue);
        background: #fff;
    }

    .departureBoard td {
        border: none;
        padding: 0;
    }

    /* Service name — top left */
    .departureBoard td:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
        font-size: 1.05rem;
        font-weight: 600;
        align-self: end;
        padding-bottom: 0.2rem;
    }

    /* Destination — bottom left */
    .departureBoard td:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
        font-size: 0.85rem;
        color: #555;
        align-self: start;
    }

    /* Time badge — top right (live) */
    .departureBoard td:nth-child(3) {
        grid-column: 2;
        grid-row: 1;
        font-size: 1.05rem;
        font-weight: 700;
        color: #1e6e1e;
        background: #e6f4e6;
        padding: 0.3rem 0.65rem;
        border-radius: 6px;
        white-space: nowrap;
        align-self: end;
        text-align: center;
    }

    /* Time badge — scheduled (not live) */
    .departureBoard td:nth-child(3).departure-time--scheduled {
        color: #444;
        background: #ebebeb;
    }

    /* Live status — bottom right */
    .departureBoard td:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
        display: flex;
        justify-content: flex-end;
        align-self: start;
    }

    /* Hide vehicle and stop columns on mobile */
    .departureBoard td:nth-child(5),
    .departureBoard td:nth-child(6) {
        display: none;
    }

    .live-status lottie-player {
        width: 44px;
    }

    .footer-main {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .footer-bottom--legal {
        flex-direction: column;
        align-items: flex-start;
    }

    .airline-footer-bottom-navigation .menu {
        justify-content: flex-start;
        gap: 0.8rem 1rem;
    }

    .airline-app img {
        height: 36px;
    }

    .footer__logo img {
        width: 170px;
    }

    .journey-live {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .journey-live__sidebar {
        max-height: 42vh;
    }

    .journey-live__vehicle .journey-vehicle-card__route {
        flex-direction: column;
        align-items: stretch;
    }

    .journey-live__vehicle .journey-vehicle-card__meta {
        flex-direction: column;
    }

    .journey-live__vehicle {
        position: static;
        width: auto;
        max-height: none;
        overflow: visible;
        padding: 0.75rem;
    }

    .journey-live__map {
        min-height: 60vh;
    }
}
