/* =========================
   Header Base
========================= */

#header {
    background-color: var(--primary);
    position: relative;
    z-index: 2000;
}

#headerContent {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 20px;
    margin: 0 auto;
    max-width: var(--content-max-width);
    gap: 10px;
}

#headerContentLink {
    justify-self: start;
}

#headerContentLogo {
    width: 230px;
}

#headerContentText {
    font-size: 24px;
    text-align: center;
    line-height: 1.15;
}

#headerContentTextTagline {
    font-family: "Times New Roman", Times, serif;
    font-size: 21px;
    font-weight: 600;
    font-style: italic;
}

#headerContentTextCta {
    color: #1f3e5a;
    display: block;
    text-align: center;
}

#headerContentTextCtaPhone {
    font-weight: 600;
}

#headerContentTextTagline,
#headerContentTextCtaPhone,
#headerContentSpanish {
    color: var(--red);
}

#headerContentSpanish {
    justify-self: end;
    font-size: 12px;
    margin-bottom: auto;
}

#headerContentMobileButton,
#headerContentHamburger,
.mobileBreak {
    display: none;
}

/* =========================
   Mobile Layout
========================= */

@media (max-width: 800px) {
    .mobileBreak {
        display: block;
    }

    #header {
        height: auto;
    }

    #headerContent {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto auto;
        align-items: center;
        justify-items: center;
        padding: 12px 20px;
        max-width: var(--content-max-width);
        margin: 0 auto;
        row-gap: 0;
    }

    #headerContentLogo {
        max-width: 100px;
        grid-column: 2;
        grid-row: 1;
    }

    #headerContentSpanish {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: start;
    }

    #headerContentHamburger {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-self: end;
        align-self: start;
        background: none;
        border: none;
        cursor: pointer;
        transition: opacity 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    #headerContentHamburger:hover,
    #headerContentHamburger.open {
        opacity: 0.5;
        cursor: pointer;
    }

    #headerContentHamburger.open {
        position: relative;
        z-index: 2000;
    }

    #headerContentHamburgerIcon {
        display: flex;
        flex-direction: column;
        gap: 4px;
        position: relative;
        width: 22px;
        height: 14px;
    }

    #headerContentHamburgerIcon span {
        width: 22px;
        height: 2px;
        background-color: var(--blue);
        display: block;
        position: absolute;
        left: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    #headerContentHamburgerIcon span:nth-child(1) {
        top: 0;
    }

    #headerContentHamburgerIcon span:nth-child(2) {
        top: 6px;
    }

    #headerContentHamburgerIcon span:nth-child(3) {
        top: 12px;
    }

    #headerContentHamburger.open #headerContentHamburgerIcon span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    #headerContentHamburger.open #headerContentHamburgerIcon span:nth-child(2) {
        opacity: 0;
    }

    #headerContentHamburger.open #headerContentHamburgerIcon span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    #headerContentHamburgerText {
        font-size: 12px;
        color: var(--blue);
        margin-top: 4px;
    }

    #headerContentText {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    #headerContentTextTagline {
        display: block;
        padding: 8px 0;
    }

    #headerContentTextCta {
        display: none;
    }

    #headerContentMobileButton {
        display: flex;
        justify-content: center;
        align-items: center;
        grid-column: 1 / -1;
        grid-row: 3;
        background-color: var(--red);
        color: var(--primary);
        width: 95%;
        height: 48px;
        padding: 10px;
        font-weight: 600;
        font-size: 16px;
        text-align: center;
        text-transform: uppercase;
        white-space: nowrap;
    }
}