.page-template-template-provider-directory {
    max-width: none !important;
    margin: 0 !important;

    .top--bar,
    .header,
    .footer {
        display: none;
    }
}

.pd-page-title {
    background: $pd-brand-blue-alt;
    color: white;
    font: 700 6vw $font-stack-libre-baskerville; /* 80px */
    text-transform: none;
    text-align: center;
}

.pd-header-image {
    width: 100%;
    margin: 0;
    display: block;
}

.pd-group {
    &:nth-child(odd) {
        background-color: $pd-brand-blue;
        color: white;
        padding-top: 10px;
    }
    &:nth-child(even) {
        background: url('../images/providers-directory/wave-top.jpg') center bottom no-repeat,
                    url('../images/providers-directory/wave-bottom.jpg') center top no-repeat;
        background-size: 100% 130px;
        padding: 130px 0;
    }
}

.pd-group-title {
    color: $pd-sky-blue;
    font: 700 4vw $font-stack-avenir-next; /* 48px */
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 6px;
    position: relative;
    text-align: center;
    text-transform: uppercase;

    span {
        background: $pd-brand-blue;
        position: relative;
        padding: 0 40px;
        z-index: 5;
    }
    .pd-groups-main &::after {
        content: '';
        background-color: currentColor;
        position: absolute;
        top: calc( 50% - 0.15vw );
        left: 50px;
        height: 0.15vw;
        width: calc( 100% - 100px );
    }
    .pd-group:nth-child(even) & {
        color: $pd-brand-blue-alt;
    }
    .pd-group:nth-child(even) & span {
        background: white;
    }
}

.pd-section-title {
    color: $pd-brand-blue-alt;
    display: flex;
    align-items: center;
    font: 700 2.4vw $font-stack-libre-baskerville; /* 32px */
    padding: .8vw 0 .8vw 50px;
    position: relative;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    .has-providers & {
        background: $pd-midnight-blue;
        color: white;
        display: inline-block;
        margin-bottom: 3vw; /* 40px */

        &::after {
            content: '';
            border-right: 3.6vw solid transparent;
            border-top: 4.55vw solid $pd-midnight-blue;
            width: 0;
            height: 0;
            position: absolute;
            top: 0;
            right: -3.6vw;
        }
    }
    .no-providers & span {
        background: white;
        position: relative;
        z-index: 5;
    }
    .no-providers &::after {
        content: '';
        background: #287EBE;
        width: calc( 100% - 100px );
        height: 2px;
        position: absolute;
        top: 50%;
        left: 50px;
        z-index: 1;
    }
}

.pd-section-title-name {
    padding-right: 1.5vw; /* 20px */
}

.pd-section-title-group-name {
    font: 700 2vw $font-stack-avenir-next; /* 26px */
    border-left: 0.15vw solid #287EBE;
    padding: 0 1.5vw;
    text-transform: uppercase;

    .has-providers & {
        border-left-color: white;
    }
}

.pd-section  {
    &.has-providers {
        padding-bottom: 3vw; /* 40px */
    }
    &.no-providers {
        padding-bottom: 1.5vw; /* 20px */
    }
    &.no-providers + &.has-providers {
        margin-top: 5.2vw; /* 70px */
    }
}

.pd-section-providers {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 50px;
}

.pd-provider {
    border-top: 0.15vw solid $pd-light-cyan;
    display: flex;
    align-items: center;
    margin-bottom: 3vw; /* 40px */
    width: 41vw; /* 43.9%/556px */

    .pd-group:nth-child(even) & {
        border-top-color: $pd-brand-blue-alt;
    }
}

.pd-provider-title {
    font: 600 2.1vw $font-stack-libre-baskerville; /* 28px */
    display: block;
    margin-bottom: 0.4vw;
}

.pd-provider-creds {
    font: 400 1.8vw $font-stack-libre-baskerville; /* 24px */
}

.pd-provider-headshot {
    margin-left: 5%;
    width: 10.7vw; /* 145px */
    height: 12.5vw; /* 170px */
    overflow: hidden;

    img {
        width: 100%;
    }
}

.pd-provider-content {
    flex: 1; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.pd-group-section-list {
    color: $pd-midnight-blue;
    font: 400 1.7vw $font-stack-libre-baskerville; /* 24px */
    padding: 0 30px;
    margin-bottom: 3vw;
    text-align: center;

    .pd-group:nth-child(odd) & {
        color: white;
    }
    ul > li {
        display: inline-block;
        padding: 0 1.5vw;
        margin-bottom: .8vw;

        &:not(:last-child) {
            border-right: .15vw solid $pd-midnight-blue;
        }
        &:nth-child(3) {
            border: none;
        }
    }
    .pd-group:nth-child(odd) & ul > li:not(:last-child) {
        border-right-color: white;
    }
}

.pd-footer {
    background: $pd-brand-blue;
    color: white;
    padding: 3vw 29.3vw 5.9vw 20vw; /* 40px 400px 80px */

    li > ul {
        padding: 3.7vw 0; /* 50px 0 */
    }
    li > ul > li {
        font: 400 2.1vw $font-stack-libre-baskerville; /* 28px */
        padding-left: 3.7vw; /* 50px */
        margin-bottom: 1.5vw; /* 20px */
    }
}

// hide no-provider section(s) in first group
.pd-group:first-child {
    .pd-group-section-list {
        display: none;
    }
    .pd-section.no-providers {
        display: none;
    }
    .pd-section.has-providers:nth-child(2) {
        margin-top: 0;
    }
}