/* ---------------- footer ---------------- */
.home{
    .ftWrap{
        background-color: #fff;
    }
}
.ftWrap{
    padding-bottom: 20px;
    /*===blue rounded panel===*/
    .ftPanel{
        background-color: var(--blue);
        padding: 70px 80px 60px;
    }
    .ftBrand{
        text-align: center;
        margin-bottom: 60px;
        .ftLogo{
            margin-bottom: 20px;
            img{
                max-width: 300px;
                /*===white version of the wordmark on the blue panel===*/
                filter: brightness(0) invert(1);
            }
        }
        .ftTagline{
            color: #dce9f5;
            font-size: 18px;
        }
    }
    .ftGrid{
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
        .ftCol{
            flex: 1 1 0;
            min-width: 0;
            &.ftContact{
                flex: 1.4 1 0;
            }
            &.ftNews{
                flex: 1.4 1 0;
            }
        }
    }
    .ftTitle{
        display: block;
        color: #fdfdfd9c;
        font-size: 22px;
        font-weight: 600;
        margin-bottom: 22px;
    }
    .ftSubTitle{
        display: block;
        color: #fff;
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 18px;
    }
    /*===A second address sits inside the list, so its label rides with it
         rather than heading the column like .ftSubTitle does. Set a step
         down from that one so the two do not read as equal headings.===*/
    .ftAddrLabel{
        display: block;
        margin-bottom: 4px;
        color: #fff;
        font-size: 15px;
        font-weight: 600;
    }
    .ftLinkList{
        li{
            margin-bottom: 12px;
            &:last-child{
                margin-bottom: 0;
            }
            a{
                color: #cfe0ef;
                font-size: 17px;
                transition: color .3s ease;
                &:hover{
                    color: #fff;
                }
            }
        }
    }
    /*===contact block===*/
    .ftContactList{
        li{
            display: flex;
            /*===Font Awesome swaps the <i> for an <svg>, which stretches to
               the row height and floats its glyph in the middle; pin the
               row to the top so the pin sits on the first line===*/
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 16px;
            &:last-child{
                margin-bottom: 0;
            }
            i,
            svg{
                flex-shrink: 0;
                margin-top: 3px;
                font-size: 15px;
                width: 1em;
                height: auto;
                color: #cfe0ef;
                fill: currentColor;
            }
            p{
                /* Flex items default to min-width:auto, so a long unbroken
                   address (the email) sets the column floor and pushes the
                   footer past the viewport between 992px and 1200px. */
                min-width: 0;
                overflow-wrap: anywhere;
                color: #cfe0ef;
                font-size: 18px;
                line-height: 1.5;
                a{
                    color: #cfe0ef;
                    overflow-wrap: anywhere;
                    &:hover{
                        color: #fff;
                    }
                }
            }
        }
    }
    /*===newsletter===*/
    .ftNewsForm{
        margin-bottom: 25px;
        input{
            width: 100%;
            padding: 13px 25px;
            margin-bottom: 12px;
            border: 1px solid rgb(255 255 255 / 55%);
            border-radius: 30px;
            background-color: transparent;
            color: #fff;
            font-size: 14px;
            font-family: inherit;
            text-align: center;
            &::placeholder{
                color: #cfe0ef;
            }
            &:focus{
                border-color: #fff;
            }
        }
        button{
            width: 100%;
            padding: 13px 25px;
            border: 1px solid #fff;
            border-radius: 30px;
            background-color: #fff;
            color: #000;
            font-size: 14px;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
            transition: all .3s ease;
            &:hover{
                background-color: transparent;
                color: #fff;
            }
        }
        /*===the form is Contact Form 7's: flatten the wrappers it adds
             around each control so the two pills sit as they did, and
             put its messages in the footer's own colours===*/
        p{
            margin: 0;
        }
        .wpcf7-form-control-wrap{
            display: block;
        }
        .wpcf7-not-valid-tip{
            margin: -4px 0 12px;
            color: #ffd9d9;
            font-size: 12px;
            text-align: center;
        }
        .wpcf7-response-output{
            margin: 12px 0 0;
            padding: 10px 14px;
            border-width: 1px;
            border-radius: 14px;
            color: #fff;
            font-size: 13px;
            line-height: 1.5;
            text-align: center;
        }
    }
    .ftSocials{
        display: flex;
        justify-content: center;
        /* five 38px pills plus gaps outrun this column around 992px,
           so let the row wrap instead of pushing the page sideways */
        flex-wrap: wrap;
        gap: 12px;
        li{
            a{
                width: 38px;
                height: 38px;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 50%;
                background-color: #fff;
                transition: all .3s ease;
                i,
                svg{
                    font-size: 15px;
                    width: 1em;
                    height: auto;
                    color: #5b7a99;
                    fill: currentColor;
                    transition: color .3s ease;
                }
                &:hover{
                    background-color: #0d4c7d;
                    i,
                    svg{
                        color: #fff;
                    }
                }
            }
        }
    }
    /*===legal strip under the panel===*/
    .ftBottom{
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 15px;
        padding: 22px 10px 5px;
        .ftCopy,
        .ftMade{
            font-size: 16px;
            color: #1f2428;
            a{
                color: var(--blue);
                font-weight: 600;
                &:hover{
                    text-decoration: underline !important;
                }
            }
        }
        .ftLegal{
            display: flex;
            gap: 8px;
            li{
                font-size: 16px;
                &:first-child::after{
                    content: " .";
                    color: #1f2428;
                }
                a{
                    color: #1f2428;
                    &:hover{
                        color: var(--blue);
                    }
                }
            }
        }
    }
}
@media (max-width: 1199px){
    /* .ftContact and .ftNews carry their own flex further up, at a higher
       specificity than a bare .ftCol, so they must be named here too -
       otherwise they keep flex-basis:0 and collapse to a few pixels while
       the other two take 40% each. Two per row, allowing for the 40px gap. */
    .ftWrap .ftGrid .ftCol,
    .ftWrap .ftGrid .ftCol.ftContact,
    .ftWrap .ftGrid .ftCol.ftNews{
        flex: 1 1 calc(50% - 20px);
    }
}
@media (max-width: 767px){
    .ftWrap{
        .ftPanel{
            border-radius: 30px;
            padding: 45px 25px 40px;
        }
        .ftBrand{
            margin-bottom: 40px;
            .ftLogo img{
                max-width: 220px;
            }
        }
        .ftGrid{
            gap: 30px;
            .ftCol,
            .ftCol.ftContact,
            .ftCol.ftNews{
                flex: 1 1 100%;
            }
        }
        .ftBottom{
            flex-direction: column;
            text-align: center;
        }
    }
}

/*===================================================
    Footer columns as accordions on mobile.

    Quick Links, Business Units and Contacts collapse
    below 768px; the newsletter column is left open so
    the form and social links stay reachable. The title
    is a real <button> so it is keyboard operable - the
    button chrome is stripped so it still reads as the
    plain heading it was on desktop.
===================================================*/
.ftWrap .ftTitle{
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    text-align: left;
}
/*===above the breakpoint it is a heading, not a control===*/
.ftWrap .ftAccordion > .ftTitle{
    cursor: default;
    pointer-events: none;
}

@media (max-width: 767px){
    .ftWrap{
        .ftAccordion{
            border-bottom: 1px solid rgb(255 255 255 / 18%);
            > .ftTitle{
                position: relative;
                cursor: pointer;
                pointer-events: auto;
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 16px;
                padding: 16px 0;
                margin-bottom: 0;
                color: #fff;
                font-size: 19px;
                /*===chevron from borders, so it does not wait on the icon font===*/
                &::after{
                    content: '';
                    flex-shrink: 0;
                    width: 9px;
                    height: 9px;
                    margin-top: -4px;
                    border-right: 2px solid currentColor;
                    border-bottom: 2px solid currentColor;
                    transform: rotate(45deg);
                    transition: transform 0.35s ease;
                }
            }
            &.isOpen > .ftTitle::after{
                margin-top: 2px;
                transform: rotate(-135deg);
            }
            .ftColBody{
                display: none;
                padding-bottom: 20px;
            }
        }
        /*===the grid gap would double the borders up===*/
        .ftGrid{
            gap: 0;
            .ftCol.ftNews{
                margin-top: 30px;
            }
        }
    }
}
