/* A single fleet photograph runs from the announcement bar to the page introduction. */
@media screen {
    .wp-site-blocks {
        --tp-fleet-nav-height: 8.75rem;
        --tp-fleet-intro-height: 400px;
        --tp-fleet-intro-inset: 40px;
    }

    header:has(+ main > .tp-photo-hero:first-child > .tp-photo-hero-image img) {
        position: relative;
        z-index: 30;

        & > .tp-top {
            border-block-end: 1px solid #fff;
        }

        & > .tp-header {
            position: absolute;
            inset: 100% 0 auto;
            box-sizing: border-box;
            min-height: var(--tp-fleet-nav-height);
            margin: 0;
            padding: .75rem clamp(1rem, 3vw, 3rem);
            background: transparent;
        }

        & .wp-block-navigation,
        & .wp-block-navigation__responsive-container-open {
            color: #153c48;
        }

        & .wp-block-navigation__responsive-container:not(.is-menu-open)
            .wp-block-navigation__container > li > :is(a, button) {
            color: #153c48;
        }

        & .wp-block-navigation__responsive-container:not(.is-menu-open)
            .wp-block-navigation__container > li > a:is(:hover, :focus-visible) {
            text-decoration: underline;
            text-underline-offset: .22em;
        }

        & .wp-block-navigation__responsive-container:not(.is-menu-open)
            .wp-block-navigation__container > li > :focus-visible,
        & .wp-block-navigation__responsive-container-open:focus-visible,
        & .tp-header .wp-block-button__link:focus-visible {
            outline: 3px solid #075468;
            outline-offset: 3px;
        }

        & .wp-block-navigation__submenu-container,
        & .wp-block-navigation__responsive-container.is-menu-open {
            background-color: white;
            color: #183e4b;
            text-shadow: none;
        }

        & .wp-block-navigation__submenu-container {
            border-color: #c8dce1;
        }

        & .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
            box-shadow: 0 .5rem 1.25rem rgb(7 32 43 / 15%);
        }
    }

    header + main:has(> .tp-photo-hero:first-child > .tp-photo-hero-image img) {
        margin-block-start: 0;
    }

    header + main > .tp-photo-hero:first-child:has(> .tp-photo-hero-image img) {
        min-height: calc(var(--tp-fleet-nav-height) + var(--tp-fleet-intro-height));
        padding-block-start: calc(var(--tp-fleet-nav-height) + var(--tp-fleet-intro-inset)) !important;

        & > .tp-photo-hero-image::after {
            content: "";
            position: absolute;
            inset: 0 0 auto;
            height: calc(var(--tp-fleet-nav-height) + 2.5rem);
            background: linear-gradient(to bottom, rgb(255 255 255 / 88%), rgb(255 255 255 / 74%) 62%, transparent);
            pointer-events: none;
        }
    }
}

@media screen and (min-width: 851px) {
    header:has(+ main > .tp-photo-hero:first-child > .tp-photo-hero-image img)
        .wp-block-navigation__container > .has-child:nth-last-child(-n+2)
        .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
        left: auto;
        right: 100%;
    }
}

@media screen and (min-width: 851px) and (max-width: 1199px) {
    header:has(+ main > .tp-photo-hero:first-child > .tp-photo-hero-image img) {
        & .tp-header { gap: .75rem; padding-inline: 1rem; }
        & .tp-header img { width: 4.75rem; }
        & .wp-block-navigation { font-size: 1rem; }
        & .wp-block-navigation__container { column-gap: clamp(.6rem, 1.2vw, 1rem); }
        & .tp-header .wp-block-button__link { padding-inline: 1rem; white-space: nowrap; }
    }
}

@media screen and (max-width: 1000px) {
    .wp-site-blocks { --tp-fleet-nav-height: 7.5rem; }
}

@media screen and (max-width: 850px) {
    .wp-site-blocks { --tp-fleet-nav-height: 6.5rem; }

    header:has(+ main > .tp-photo-hero:first-child > .tp-photo-hero-image img)
        .wp-block-navigation__responsive-container-open {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
    }
}

@media screen and (max-width: 650px) {
    .wp-site-blocks {
        --tp-fleet-intro-height: 380px;
        --tp-fleet-intro-inset: 20px;
    }
}

@media screen and (max-width: 540px) {
    .wp-site-blocks { --tp-fleet-nav-height: 5.75rem; }
}

/* Service-page examples keep the whole photo visible at either orientation. */
.tp-job-example {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "title photos" "copy photos";
    align-content: center;
    align-items: start;
    gap: .65rem clamp(1rem, 3vw, 2rem);
    margin-block: clamp(1.75rem, 4vw, 3rem);
    padding-block: clamp(1.1rem, 3vw, 2rem);
    border-block: 1px solid #c5dade;
}
.tp-job-example.tp-example-reverse {
    grid-template-areas: "photos title" "photos copy";
}
.tp-job-example > h2 {
    grid-area: title;
    align-self: end;
    margin: 0 !important;
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    line-height: 1.15;
    color: #07576a;
    text-wrap: balance;
}
.tp-job-example .tp-pair-copy { grid-area: copy; }
.tp-job-example .tp-pair-copy p { margin: 0 0 .5rem; }
.tp-job-example .tp-pair-link { display: inline-block; padding: .45rem 0; font-weight: 650; }
.tp-job-example .tp-pair-picker {
    grid-area: photos;
    position: relative;
    min-inline-size: 0;
    margin: 0;
    padding: 0;
    border: 1px solid #cadce0;
    border-radius: .85rem;
    overflow: hidden;
    background: #eaf1f2;
}
.tp-job-example > .tp-service-photo-inset {
    grid-area: photos;
    align-self: center;
    min-width: 0;
    width: min(100%, 25rem);
    margin: 0 auto;
}
.tp-job-example > .tp-service-photo-inset img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 25rem;
    height: auto;
    margin: 0 auto;
    border-radius: .75rem;
}
.tp-job-example > .tp-service-photo-inset figcaption {
    margin: .55rem 0 0;
    color: #294954;
    text-align: center;
}
.tp-pair-radio { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.tp-pair-frame {
    display: none;
    height: clamp(14rem, 25vw, 18rem);
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #335662;
    font-weight: 650;
}
.tp-pair-before:checked ~ .tp-pair-frames .tp-frame-before,
.tp-pair-after:checked ~ .tp-pair-frames .tp-frame-after { display: flex; }
.tp-job-example .tp-pair-frame img {
    width: 100%; height: 100%; object-fit: contain; border-radius: 0; display: block;
}
.tp-pair-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f7fafb; }
.tp-pair-tabs label {
    display: grid; place-items: center; min-height: 44px; cursor: pointer;
    font-weight: 650; color: #154c5b; border-top: 3px solid transparent;
}
.tp-pair-before:checked ~ .tp-pair-tabs label:first-child,
.tp-pair-after:checked ~ .tp-pair-tabs label:last-child {
    color: #fff; background: #15556a; border-top-color: #8ad7eb;
}
.tp-pair-before:focus-visible ~ .tp-pair-tabs label:first-child,
.tp-pair-after:focus-visible ~ .tp-pair-tabs label:last-child {
    outline: 2px solid currentColor; outline-offset: -5px;
}
@media (max-width: 620px) {
    .tp-job-example, .tp-job-example.tp-example-reverse {
        grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "photos" "copy"; gap: .8rem;
    }
    .tp-pair-frame { height: clamp(12rem, 59vw, 16.5rem); }
}
.tp-secondary-fleet { box-sizing: border-box; }
.tp-secondary-fleet .tp-hero-panel h1 { margin-block: 0; }
.tp-related-projects:not(.tp-city-rotation) h2.tp-fleet-heading { --tp-fleet-width: 2.7rem; gap: .5rem; }
.tp-related-projects:not(.tp-city-rotation) .tp-project-grid { gap: .85rem; }
.tp-related-projects:not(.tp-city-rotation) .tp-project-grid .tp-project-card > img {
    height: clamp(6.5rem, 12vw, 9rem); width: 100%; object-fit: cover;
}
.tp-related-projects:not(.tp-city-rotation) .tp-card-body { padding: .8rem; }
.tp-related-projects:not(.tp-city-rotation) .tp-card-body h3 { margin: .25rem 0; font-size: 1.1rem; line-height: 1.22; }
.tp-related-projects:not(.tp-city-rotation) .tp-card-body > p { margin: .25rem 0; }
.tp-related-projects:not(.tp-city-rotation) .tp-card-body > p:not([class]):not(:has(a)),
.tp-related-projects:not(.tp-city-rotation) .tp-card-body .tp-card-service { display: none; }
.tp-more-jobs { margin-block: .7rem; }
.tp-more-jobs summary { width: fit-content; padding: .65rem .1rem; cursor: pointer; color: #07576a; font-weight: 700; }
.tp-more-jobs summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 700px) {
    .tp-related-projects:not(.tp-city-rotation) h2.tp-fleet-heading { --tp-fleet-width: 2.25rem; }
    .tp-related-projects:not(.tp-city-rotation) .tp-project-grid,
    .post-type-archive-tp_project .tp-project-grid { grid-template-columns: minmax(0, 1fr); gap: .55rem; }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-grid .tp-project-card:has(> img) {
        display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: start;
        gap: .7rem; padding: .55rem; border-radius: .7rem;
    }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-card > p:empty,
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-card > br { display: none; }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-card:has(> img) > img {
        grid-area: 1 / 1;
    }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-card:has(> img) > .tp-card-body {
        grid-area: 1 / 2;
    }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-grid .tp-project-card > img {
        width: 4.5rem; height: 4.5rem; border-radius: .35rem; object-fit: cover;
    }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-grid .tp-card-body { padding: 0; min-width: 0; }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-grid .tp-card-body :is(h2,h3) {
        font-size: 1.05rem; line-height: 1.22; margin: 0; overflow-wrap: anywhere;
    }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-grid .tp-card-body p { margin: 0; }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-grid .tp-card-body > p:not(:has(a)) { display: none; }
    :is(.tp-related-projects:not(.tp-city-rotation), .tp-explorer) .tp-project-grid a.tp-card-more {
        display: inline-flex; align-items: center; min-height: 32px; padding: 0; font-size: .95rem;
    }
}
