:root {
    --c-blue: #00598E;
    --c-red: #AC250E;
    --c-gold: #D3AE13;
    --c-white: #FFFFFF;
    --c-black: #000000;
    --c-grey: #ECEEEF;
    --transition: 0.35s cubic-bezier(0.76, 0, 0.24, 1);
}

* {
    box-sizing: border-box;
}

    *::before, *::after {
        box-sizing: border-box;
    }

    *::marker {
        font-family: sans-serif;
    }

main {
    flex: 1;
}

@media screen and (max-width: 768px) {
    main {
        padding-top: 1.5em;
    }
}

summary {
    cursor: pointer;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Arial", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: var(--c-black);
    font-size: 16px;
    background-color: var(--c-white);
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

p, li {
    font-size: 19px;
}

    p > a, li > a {
        font-weight: 700;
    }

@media screen and (max-width: 1300px) {
    p, li {
        font-size: 18px;
    }
}

@media screen and (max-width: 1024px) {
    p, li {
        font-size: 17px;
    }
}

figure {
    margin: 0;
}

img, svg, video, picture {
    max-width: 100%;
    max-height: 100%;
    height: auto;
}

a {
    text-decoration: underline;
    color: inherit;
    outline: 0;
    transition: var(--transition);
}

    a:hover, a:focus {
        text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
    }

    a:focus {
        background-color: var(--c-gold);
        box-shadow: 0 -2px var(--c-gold), 0 4px var(--c-black);
        color: var(--c-black) !important;
    }

button {
    background: none;
    border: 0;
    font-size: inherit;
    padding: 0;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: all 1s cubic-bezier(0.76, 0, 0.24, 1);
}

    button:disabled {
        cursor: default;
    }

input[type=submit] {
    cursor: pointer;
}

h1, h2, h3, h4 {
    font-weight: 700;
    font-style: normal;
    margin: 1em 0 0.35em;
}

h1 {
    font-size: 40px;
}

    h1 + h2 {
        margin-top: 0;
    }

h2 {
    font-size: 32px;
}

    h2 + h3 {
        margin-top: 0;
    }

h3, .h3 {
    font-size: 26px;
}

    h3 + h4, .h3 + .h4 {
        margin-top: 0;
    }

h4, .h4 {
    font-size: 22px;
}

    h4 + h5 {
        margin-top: 0;
    }

@media screen and (max-width: 500px) {
    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }

    h3, .h3 {
        font-size: 20px;
    }

    h4, .h4 {
        font-size: 18px;
    }
}

blockquote {
    position: relative;
    margin: 0;
    padding: 1.5em;
}

    blockquote > *:first-child {
        margin-top: 0;
    }

    blockquote > *:last-child {
        margin-bottom: 0;
    }

table {
    border: 3px solid var(--c-blue);
    border-collapse: collapse;
    width: 100%;
    white-space: nowrap;
}

    table thead {
        background-color: var(--c-blue);
        color: var(--c-white);
    }

        table thead tr:nth-child(odd) {
            background-color: var(--c-blue);
        }

    table th, table td {
        border: 3px solid var(--c-blue);
        border-collapse: collapse;
        text-align: center;
    }

    table th {
        padding: 8px 16px;
    }

    table td {
        padding: 4px 16px;
        height: 43px;
    }

        table td:first-child {
            font-weight: 700;
        }

    table tr:nth-child(odd) {
        background-color: var(--c-grey);
    }

small {
    font-size: 14px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background-color: var(--c-gold);
    color: var(--c-black);
    padding: 8px 16px;
    z-index: 200;
    font-weight: 700;
    text-decoration: none;
}

    .skip-link:focus {
        top: 0;
    }

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    transition: var(--transition);
}

.main-nav-item {
    font-size: 19px;
    margin-right: 1.5em;
    font-weight: 700;
    color: var(--c-white);
    text-decoration: underline;
    transition: var(--transition);
}

    .main-nav-item:last-child {
        margin-right: 0;
    }

    .main-nav-item:hover, .main-nav-item:focus {
        text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
    }

@media screen and (max-width: 1300px) {
    .main-nav-item {
        font-size: 18px;
    }
}

@media screen and (max-width: 1024px) {
    .main-nav {
        justify-content: flex-start;
        gap: 0.25em 0;
    }

    .main-nav-item {
        font-size: 16px;
        margin-right: 1em;
    }
}

/* Form inputs */
input {
    transition: 0.35s ease;
}

    input[type=text] {
        -webkit-appearance: none;
        background-color: var(--c-white);
        color: var(--c-blue);
        padding: 8px 16px;
        border: 3px solid var(--c-blue);
        border-radius: 0;
        width: 100%;
        margin-bottom: 0;
        outline: 0;
        font-size: 19px;
        font-family: inherit;
    }

        input[type=text]::-moz-placeholder {
            color: var(--c-blue);
            opacity: 0.6;
        }

        input[type=text]::placeholder {
            color: var(--c-blue);
            opacity: 0.6;
        }

        input[type=text]:focus {
            border-color: var(--c-blue);
            background-color: var(--c-gold);
            box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
        }

        input[type=text].is-invalid {
            background-color: var(--c-red);
            color: var(--c-white);
            border-color: var(--c-red);
        }

.postcode-finder-error {
    margin: 0.5em 0 0;
    color: var(--c-red);
    font-weight: 700;
}

.postcode-error-message {
    padding: 1em;
    margin-bottom: 1em;
}

.postcode-finder-wrap {
    margin-top: 2em;
}

.input-group label {
    display: block;
    margin: 0 0 0.25em;
    font-size: 19px;
    color: var(--c-black);
}

.postcode-finder-form {
    display: grid;
    grid-template-columns: 3fr 1fr;
    grid-gap: 1.5em;
    align-items: end;
    margin: 1em 0;
}

@media screen and (max-width: 1024px) {
    .postcode-finder-form {
        grid-gap: 1em;
    }
}

@media screen and (max-width: 768px) {
    .postcode-finder-form {
        grid-template-columns: 1fr;
    }
}

/* Header */
.header-internal {
    position: relative;
    z-index: 10;
    padding: 3em 3em 1em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    width: 240px;
}

.header-logo-wrap {
    text-decoration: none;
}

.header-logo span {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

@media screen and (max-width: 1024px) {
    .header-internal {
        flex-direction: column;
        align-items: stretch;
        padding: 1em;
        gap: 0.5em;
    }

    .header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1em;
    }

    .header-logo-wrap {
        flex: 1 1 auto;
        min-width: 0;
    }

    .header-logo span {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lang-selector.header-lang {
        flex-shrink: 0;
    }
}

@media screen and (max-width: 768px) {
    .header-logo span {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .header-logo span {
        font-size: 15px;
    }
}

/* Footer layout */
.footer-internal {
    padding: 1.5em 3em;
}

.footer-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.footer-nav-item {
    display: block;
    margin-right: 1.5em;
    margin-bottom: 8px;
    color: var(--c-white);
    text-decoration: underline;
}

    .footer-nav-item:last-child {
        margin-right: 0;
    }

.footer-copyright {
    padding: 1.5em 3em;
}

    .footer-copyright > * {
        font-size: 14px;
    }

@media screen and (max-width: 1024px) {
    .footer-internal {
        padding: 1.5em 1em;
    }

    .footer-copyright {
        padding: 1em;
    }
}

@media screen and (max-width: 900px) {
    .footer-internal {
        flex-direction: column;
    }
}

/* Language selector */
.lang-selector {
    background-color: var(--c-white);
    color: var(--c-blue);
    border: 3px solid var(--c-blue);
    cursor: pointer;
    overflow: hidden;
    max-height: 34px;
    transition: max-height var(--transition);
}

    .lang-selector.header-lang {
        position: absolute;
        top: 0;
        right: 3em;
        border: 0;
        max-height: 26px;
    }

    .lang-selector ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .lang-selector li {
        padding: 4px 12px;
        text-align: center;
        font-size: 16px;
    }

        .lang-selector li:first-child {
            cursor: default;
        }

    .lang-selector button {
        color: inherit;
    }

    .lang-selector a:hover, .lang-selector a:focus {
        color: var(--c-blue);
        opacity: 1;
    }

    .lang-selector:hover, .lang-selector:focus, .lang-selector:focus-within {
        max-height: 250px;
    }

@media screen and (max-width: 1024px) {
    .lang-selector.header-lang {
        position: static;
        top: auto;
        right: auto;
        max-height: 30px;
        background-color: var(--c-blue);
        color: var(--c-white);
        border: 2px solid rgba(255, 255, 255, 0.4);
    }

        .lang-selector.header-lang li {
            padding: 4px 16px;
        }

    .lang-selector.open {
        max-height: 250px;
    }
}

/* Accordion */
.accordion-item {
    margin-bottom: 2em;
    border: 0;
    overflow: hidden;
    transition: var(--transition);
}

    .accordion-item[open] .accordion-title::after {
        transform: rotate(-90deg);
    }

.accordion-title {
    padding: 0;
    background-color: var(--c-white);
    color: var(--c-blue);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-decoration: underline;
}

    .accordion-title h2,
    .accordion-title h3,
    .accordion-title h4 {
        margin: 0 1.5em 0 0;
    }

    .accordion-title:focus {
        text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
    }

        .accordion-title:focus h2,
        .accordion-title:focus h3,
        .accordion-title:focus h4 {
            background-color: var(--c-gold);
        }

    .accordion-title::after {
        content: "";
        font-size: 18px;
        transform: rotate(90deg);
        border-top: 7px solid transparent;
        border-bottom: 7px solid transparent;
        border-left: 12px solid var(--c-blue);
    }

    .accordion-title::-webkit-details-marker {
        display: none;
    }

.accordion-content {
    background-color: var(--c-white);
    padding: 1.5em 0;
    overflow: auto;
}

@media screen and (max-width: 1024px) {
    .accordion-title {
        justify-content: space-between;
    }

        .accordion-title:focus {
            text-decoration-thickness: max(3px, 0.1875rem, 0.12em);
        }

            .accordion-title:focus h2,
            .accordion-title:focus h3,
            .accordion-title:focus h4 {
                background-color: var(--c-white);
            }
}

/* Buttons */
.btn {
    position: relative;
    font-family: inherit;
    font-weight: 700;
    font-style: normal;
    display: inline-block;
    -webkit-appearance: none;
    background: none;
    color: var(--c-white);
    background-color: var(--c-blue);
    text-decoration: none;
    border: 3px solid var(--c-blue);
    border-radius: 0;
    padding: 8px 28px;
    text-align: center;
    outline: 0;
    cursor: pointer;
    font-size: 19px;
    transition: 0.5s ease;
}

    .btn:hover, .btn:focus {
        text-decoration: none;
        border-color: var(--c-gold);
    }

/* Grid layouts */
.two-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 5em;
}

@media screen and (max-width: 1024px) {
    .two-cols {
        grid-template-columns: 100%;
        grid-gap: 1.5em;
    }

        .two-cols.reverse {
            display: flex;
            flex-direction: column-reverse;
            grid-gap: 0;
        }

            .two-cols.reverse .col:first-child {
                margin-top: 1.5em;
            }
}

.three-two-fifths {
    display: grid;
    grid-template-columns: 3fr 2fr;
    grid-gap: 5em;
}

@media screen and (max-width: 1024px) {
    .three-two-fifths {
        grid-template-columns: 100%;
        grid-gap: 1.5em;
    }
}

/* Utility classes */
.text-uppercase {
    text-transform: uppercase;
}

.color-blue {
    color: var(--c-blue);
}

.color-red {
    color: var(--c-red);
}

.color-white {
    color: var(--c-white);
}

.color-black {
    color: var(--c-black);
}

.bg-blue {
    background-color: var(--c-blue);
}

.bg-red {
    background-color: var(--c-red);
}

.bg-white {
    background-color: var(--c-white);
}

.m-0 {
    margin: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.padded-section {
    padding: 5em 3em;
}

@media screen and (max-width: 1024px) {
    .padded-section {
        padding: 2em 1em;
    }
}

.no-top-bottom-margin > *:first-child {
    margin-top: 0;
}

.no-top-bottom-margin > *:last-child {
    margin-bottom: 0;
}

.restrict-width {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

@media screen and (max-width: 768px) {
    table {
        white-space: initial;
    }

        table td {
            padding: 0;
        }
}

/* Postcode finder container */
.postcode-finder-container {
    padding: 1.5em;
    border: 3px solid var(--c-blue);
}

/* Rota block */
.rota-block {
    padding: 12px;
    border: 3px solid var(--c-black);
}

    .rota-block span {
        font-size: 44px;
        line-height: 0.7;
        font-weight: bold;
    }

/* Table icon */
.table-icon {
    border: 3px solid var(--c-white);
    font-weight: 700;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

    .table-icon.black {
        border: 3px solid var(--c-black);
    }

/* Operator info */
.operator-info {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    margin: 1.5em 0 3em;
}

.operator-info-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 3em;
    text-align: center;
}

@media screen and (max-width: 768px) {
    .operator-info {
        flex-direction: column;
        align-items: center;
    }

    .operator-info-group {
        margin-right: 0;
    }

        .operator-info-group:first-child {
            margin-bottom: 1.5em;
        }
}

/* Print styles */
@media print {
    .dont-print {
        display: none !important;
    }

    body {
        font-size: 11pt;
        color: var(--c-black);
        background: var(--c-white);
        display: block;
        min-height: auto;
    }

    p, li {
        font-size: 11pt;
    }

    h1 {
        font-size: 20pt;
    }

    h2, .h3 {
        font-size: 16pt;
    }

    h3, .h4 {
        font-size: 13pt;
    }

    h4 {
        font-size: 11pt;
    }

    small, .footer-copyright > * {
        font-size: 9pt;
    }

    a {
        color: var(--c-black);
        text-decoration: underline;
    }

    .skip-link {
        display: none !important;
    }

    .header {
        background-color: var(--c-white) !important;
        color: var(--c-black) !important;
    }

    .header-internal {
        padding: 0.5em 0;
    }

    .header-logo span {
        color: var(--c-black);
        font-size: 16pt;
    }

    .footer {
        background-color: var(--c-white) !important;
        color: var(--c-black) !important;
        border-top: 1px solid var(--c-black);
    }

    .footer-internal {
        padding: 0.5em 0;
    }

    .footer-copyright {
        padding: 0.5em 0;
    }

    .restrict-width {
        max-width: 100%;
    }

    .padded-section {
        padding: 1em 0;
    }

    .two-cols,
    .three-two-fifths {
        display: block;
    }

    .two-cols.reverse {
        display: block;
    }

    .two-cols .col {
        margin-top: 0;
    }

    .color-blue,
    .color-white,
    .color-red {
        color: var(--c-black) !important;
    }

    .bg-blue,
    .bg-red {
        background-color: var(--c-white) !important;
        color: var(--c-black) !important;
    }

    .accordion-item {
        margin-bottom: 1em;
    }

    .accordion-item[open] .accordion-title::after,
    .accordion-title::after {
        display: none;
    }

    .accordion-content {
        display: block !important;
        padding: 0.5em 0;
    }

    details.accordion-item {
        border-bottom: 1px solid #cccccc;
        padding-bottom: 0.5em;
    }

    .accordion-title {
        text-decoration: none;
    }

    .postcode-error-message {
        background-color: var(--c-white) !important;
        color: var(--c-black) !important;
        border: 2px solid var(--c-black);
    }

    .operator-info-group {
        text-align: left;
        align-items: flex-start;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    details {
        page-break-inside: avoid;
    }
}
