/* Nav CSS */

#nav {
    display: grid;

    grid-template-columns: auto;
    background-color: var(--primary-color);
    padding: 24px 0;
    grid-gap: 24px;
    z-index: 4;
    width: 100%;
}

@media(min-width: 1200px) {
    #nav {
        display: grid;
        /*grid-template-columns: max-content auto max-content;*/
        padding: 8px 32px;
        width: calc(100% - 64px);
    }
}

/* - */

#nav-logo {
    display: grid;
    align-self: center;
    justify-self: center;
}

@media(min-width: 768px) {
    #nav-logo {
        justify-self: start;
        grid-row: 1;
        grid-column: 1;
        z-index: 2;
    }
}

/* - */

#nav-logo a {
    display: grid;
}

#nav-logo a img {
    max-height: 150px;
    justify-self: center;
    margin: 8px 0;
}

@media(max-width: 600px) {
    #nav-logo a img {
        justify-self: center;
        max-width: 320px;
    }

}

/* - */

.nav-link-outer {
    display: grid;
    align-self: center;
    justify-self: center;
    grid-gap: 16px;
    width: 90vw;
}

@media(min-width: 1200px) {
    .nav-link-outer {
        justify-self: center;
        grid-row: 1;
        grid-column: 1;
    }
}


@media(min-width:1200px) {
    #nav-burger {
        display: none;
    }
}

#nav-links {
    display: none;
    grid-gap: 8px;
    justify-self: center;
    align-self: center;
    width: 100%;
}

.show-nav {
    display: grid !important;
}


@media(min-width:1200px) {
    #nav-links {
        display: grid;
        justify-content: center;
        grid-gap: 32px;
    }
}


#nav-burger {
    font-size: 32px;
    color: var(--secondary-color);
    justify-self: center;
}

@media(min-width: 1200px) {
    #nav-burger {
        display: none;
    }
}

/* - */

.page-link {
    display: grid;
    width: calc(100% - 32px);
    background-color: var(--primary-color);
    justify-self: center;

    justify-content: center;
    align-content: center;
    text-align: center;

    padding: 16px 0;

    transition: opacity ease .5s;
}

.page-link:hover {
    opacity: 0.4;
}

.page-link p {
    color: var(--secondary-color);
    text-transform: uppercase;
    font-family: var(--unique-font);
    font-weight: 400;
    font-style: normal;
    font-size: 25px;
    letter-spacing: 1px;
}

.page-linkdrop p {
    color: var(--secondary-color);
    text-transform: uppercase;
    font-family: var(--unique-font);
    font-weight: 400;
    font-style: normal;
    font-size: 25px;
    letter-spacing: 1px;
}

/* - */

.active-link p {
    color: var(--secondary-color) !important;
    border-bottom: 1px solid var(--secondary-color);
}

@media(min-width:1200px) {
    .page-link {
        grid-row: 1;
        width: max-content;
        padding: 0;
        background: none;
    }
}

.nav-phone {
    display: grid;
    align-self: center;
    justify-content: center;
    grid-gap: 8px;
}

@media(min-width: 768px) {
    .nav-phone {
        justify-self: end;
        grid-row: 1;
        grid-column: 1;
        z-index: 2;
    }
}

.nav-phone a:hover {
    opacity: 0.4;
}

.nav-social {
    grid-row: 2 !important;
}

@media(min-width: 1200px) {
    .nav-social {
        grid-row: 1 !important;
    }
}

.nav-phone a {
    display: grid;
    grid-template-columns: max-content auto;
    grid-gap: 8px;
    color: var(--secondary-color);
    transition: opacity ease .5s;
    overflow-wrap: anywhere;
}

@media(min-width: 1200px) {
    .nav-phone a {
        display: grid;
        grid-template-columns: max-content auto;
        grid-gap: 8px;
    }

    .firstphone {
        grid-row: 1;
        overflow-wrap: anywhere;
    }

    /* .secondphone {
		grid-row: 2;
        overflow-wrap: anywhere;
	} */
}

.nav-socials {
    display: grid;
    grid-row: 2;
    /* change this to 3 if adding a second phone */
    justify-content: space-evenly;
}




/* - */

.nav-phone h2 {
    color: var(--secondary-color);
    letter-spacing: 2px;
    line-height: 25px;
    font-weight: 200;
    font-size: 18px;

}

.nav-icon {
    display: grid;
    align-self: center;
    font-size: 24px;
}


/* DROPDOWN */

@media(max-width:768px) {
    .page-linkdrop {}
}

.dropdown-outer:hover .dropdown-container {
    display: grid !important;
}

.dropdown-container {
    display: grid;
    background-color: var(--primary-color);
    padding: 16px 0;
    grid-gap: 8px;
    justify-self: center;
}

.dropdown-container p {
    justify-self: center;
}

@media(max-width: 1200px) {
    .dropdown-outer {
        display: contents;
        width: calc(100% - 32px);
    }

    .dropdown-container {
        width: calc(100% - 32px);
    }
}


@media(min-width: 768px) {
    .dropdown-outer {
        grid-row: 1;
    }
}

@media(min-width: 1200px) {
    .dropdown-container {
        display: none;
        position: absolute;
        z-index: 4;
        background-color: var(--primary-color);
        padding: 16px;
        grid-gap: 8px;
    }
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    color: var(--secondary-color);
}

.active-link .caret {
    color: var(--secondary-color);
}


/* ===== Responsive Header Navigation Fix ===== */

#nav {
    box-sizing: border-box;
}

#nav-logo,
#nav-link-outer,
.nav-link-outer,
.nav-phone {
    min-width: 0;
}

#nav-logo a img {
    max-width: 100%;
    height: auto;
}

@media (min-width: 1200px) {

    #nav {
        display: grid;
        grid-template-columns: minmax(120px, 0.85fr) minmax(0, 3fr) minmax(190px, 1.25fr);
        column-gap: 12px;
        align-items: center;
        width: 100%;
        padding: 8px 20px;
        box-sizing: border-box;
    }

    #nav-logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        min-width: 0;
    }

    #nav-logo a img {
        max-width: 160px;
        max-height: 100px;
        width: auto;
        object-fit: contain;
    }

    .nav-link-outer {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        justify-self: stretch;
        display: block;
    }

    #nav-links {
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: repeat(6, max-content);
        justify-content: center;
        align-items: center;
        column-gap: clamp(8px, 1vw, 18px);
        width: 100%;
        min-width: 0;
    }

    #nav-links .page-link {
        width: max-content;
        max-width: 100%;
        padding: 0;
        white-space: nowrap;
    }

    #nav-links .page-link p {
        margin: 0;
        font-size: clamp(15px, 1.45vw, 20px);
        letter-spacing: 0;
        white-space: nowrap;
    }

    .nav-phone {
        grid-column: 3;
        grid-row: 1;
        min-width: 0;
        width: 100%;
        justify-self: end;
        align-items: center;
        grid-gap: 6px;
    }

    .nav-phone h2 {
        font-size: clamp(13px, 1.15vw, 16px);
        letter-spacing: 0.5px;
        line-height: 1.4;
    }

    .nav-phone a {
        grid-gap: 5px;
    }

    .nav-socials {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 12px;
    }
}

/* Header menu size adjustments RU */

/* Force larger desktop navigation text */
@media (min-width: 1200px) {
    #nav #nav-links .page-link p {
        font-size: 26px !important;
        letter-spacing: 0 !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
    }

    #nav #nav-links {
        column-gap: 12px !important;
    }
}

/* Slightly smaller text on narrower desktop screens */
@media (min-width: 1200px) and (max-width: 1350px) {
    #nav #nav-links .page-link p {
        font-size: 18px !important;
    }

    #nav #nav-links {
        column-gap: 8px !important;
    }
}

