/**
 * Shared branch page layout.
 *
 * @package jpd-theme
 */

.jpd-page--branch {
    background: #fdfdfd;
    color: #313131;
}

/* Hero */
.jpd-branch-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(25rem, 34.8vw, 31.313rem);
    overflow: hidden;
    background: #fdc112;
}

.jpd-branch-hero__image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 54%;
}

.jpd-branch-hero__overlay {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: -1;
    width: min(72%, 60.563rem);
    background: linear-gradient(
        90deg,
        #fdc112 0%,
        #fdc112 30%,
        rgba(255, 210, 80, 0.76) 63%,
        rgba(255, 210, 80, 0) 100%
    );
}

.jpd-branch-hero__inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(calc(100% - 6rem), 84rem);
    min-height: inherit;
    margin-inline: auto;
    padding-top: clamp(7rem, 13.5vw, 12rem);
}

.jpd-branch-hero__title {
    max-width: 34rem;
    margin: 0 0 1rem;
    color: #313131;
    font-size: clamp(2rem, 2.5vw, 2.25rem);
    font-weight: 900;
    line-height: 1.03;
    letter-spacing: -0.035em;
}

.jpd-branch-hero__title-line {
    display: block;
}

.jpd-branch-hero__contact {
    display: flex;
    flex-direction: column;
    margin: 0;
    color: #313131;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-style: normal;
    font-weight: 500;
    line-height: 1.7;
}

/* Services */
.jpd-branch-services {
    display: block;
    padding: clamp(4rem, 5.8vw, 5.2rem) 0 clamp(5rem, 9vw, 10rem);
}

.jpd-branch-services__inner {
    width: min(calc(100% - 6rem), 80.5rem);
    margin-inline: auto;
}

.jpd-branch-services__title {
    margin: 0 0 clamp(2.25rem, 3vw, 2.75rem);
    color: #313131;
    font-size: clamp(2rem, 2.8vw, 2.5rem);
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

/* District service groups */
.jpd-district-services .jpd-branch-services__title {
    margin-bottom: clamp(4rem, 7vw, 7rem);
}

.jpd-district-services--with-test-table {
    padding-top: 6rem;
    padding-bottom: 7rem;
}

.jpd-branch-service-groups {
    max-width: 62rem;
    margin: 0;
    padding-left: 1.5rem;
}

.jpd-branch-service-groups__group + .jpd-branch-service-groups__group {
    margin-top: 0.1rem;
}

.jpd-branch-service-groups__title {
    margin: 0;
    color: #313131;
    font-size: 1rem;
    font-weight: 400;
    line-height: 2.125;
}

.jpd-branch-service-groups__list {
    margin: 0;
    padding-left: 3rem;
    color: #313131;
    font-size: 1rem;
    line-height: 2.125;
}

.jpd-branch-service-groups__list li {
    margin: 0;
    padding-left: 0.15rem;
}

/* Driving test table shared by district branches */
.jpd-branch-test-table-wrap {
    max-width: 66.25rem;
    margin: 4.75rem auto 0;
    overflow-x: auto;
    outline-offset: 4px;
}

.jpd-branch-test-table-wrap:focus-visible {
    outline: 3px solid var(--jpd-primary);
}

.jpd-branch-test-table {
    width: 100%;
    min-width: 48rem;
    border: 0;
    border-collapse: collapse;
    color: #313131;
    font-size: 1rem;
    line-height: 1.375;
    table-layout: fixed;
}

.jpd-branch-test-table th,
.jpd-branch-test-table td {
    border: 0;
    vertical-align: middle;
}

.jpd-branch-test-table th {
    height: 4.25rem;
    padding: 0.8rem 1.5rem;
    background: #fdc112;
    font-weight: 600;
    text-align: center;
}

.jpd-branch-test-table th:first-child,
.jpd-branch-test-table td:first-child {
    width: 11%;
}

.jpd-branch-test-table th:nth-child(2),
.jpd-branch-test-table td:nth-child(2) {
    width: 43%;
    text-align: center;
}

.jpd-branch-test-table th:nth-child(3),
.jpd-branch-test-table td:nth-child(3) {
    width: 46%;
}

.jpd-branch-test-table td {
    min-height: 5rem;
    padding: 1rem 1.5rem;
}

.jpd-branch-test-table td:first-child {
    text-align: center;
}

.jpd-branch-test-table tbody tr:nth-child(odd) td {
    background: #fef5d9;
}

.jpd-branch-test-table tbody tr:nth-child(even) td {
    background: #fdc112;
}

.jpd-branch-test-table tbody tr:last-child td {
    padding-block: 1.25rem;
}

.jpd-branch-test-table p {
    margin: 0;
}

.jpd-branch-test-table p + p {
    margin-top: 1.35rem;
}

@media (max-width: 900px) {
    .jpd-branch-hero {
        min-height: 26rem;
    }

    .jpd-branch-hero__inner,
    .jpd-branch-services__inner {
        width: min(calc(100% - 3rem), 80.5rem);
    }

    .jpd-branch-hero__overlay {
        width: 82%;
    }
}

@media (max-width: 640px) {
    .jpd-branch-hero {
        display: grid;
        min-height: 32rem;
    }

    .jpd-branch-hero__image {
        object-position: 58% center;
    }

    .jpd-branch-hero__overlay {
        width: 100%;
        background: linear-gradient(
            180deg,
            rgba(253, 193, 18, 0.26) 0%,
            rgba(253, 193, 18, 0.9) 52%,
            #fdc112 100%
        );
    }

    .jpd-branch-hero__inner {
        justify-content: flex-end;
        width: min(calc(100% - 2rem), 80.5rem);
        padding: 2rem 0;
    }

    .jpd-branch-hero__title {
        max-width: 24rem;
        font-size: clamp(1.75rem, 8vw, 2.1rem);
    }

    .jpd-branch-hero__contact {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .jpd-branch-services {
        padding-top: 3.5rem;
        padding-bottom: 5rem;
    }

    .jpd-branch-services__inner {
        width: min(calc(100% - 2rem), 80.5rem);
    }

    .jpd-branch-services__title {
        margin-bottom: 2.5rem;
    }

    .jpd-district-services--with-test-table {
        padding-top: 3.5rem;
        padding-bottom: 5rem;
    }

    .jpd-district-services .jpd-branch-services__title {
        margin-bottom: 2.75rem;
    }

    .jpd-branch-service-groups {
        padding-left: 0;
    }

    .jpd-branch-service-groups__group + .jpd-branch-service-groups__group {
        margin-top: 0.75rem;
    }

    .jpd-branch-service-groups__title,
    .jpd-branch-service-groups__list {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .jpd-branch-service-groups__list {
        padding-left: 1.75rem;
    }

    .jpd-branch-test-table-wrap {
        margin-top: 3rem;
    }

    .jpd-branch-test-table {
        font-size: 0.9rem;
    }
}
