.nav_background {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: white;
    opacity: 0;
}

.nav_outer {
    height: 70px;
    width: 100%;
    display: flex;
    flex-direction: row;
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    position: fixed;
    top: 0;
    left: 0;
    background-color: transparent;
    z-index: 100;
    background-color: #fcfcf7;
    z-index: 10000;
}

@media screen and (max-width: 1000px) { 
    .nav_outer {
        flex-direction: column;
    }
}

.nav_left {
    width: 50%;
}

@media screen and (max-width: 1000px) { 
    .nav_left {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        z-index: 10;
        background-color: transparent;
    }
}

.nav_leftleft {
    display: flex;
    flex-direction: row;
    width: fit-content;
    margin-left: -10px;
    cursor: pointer;
}

.nav_logo {
    height: 70px;
    width: 50px;
    background-image: url(../branding/logo-black.svg);
    background-size: 85%;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: -3px;
}

.nav_title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    margin-bottom: 0px;
    margin-top: 14.5px;
}

.nav_byoscar {
    font-size: 15px;
    font-weight: 700;
    margin-top: -3px;
}

.nav_ico {
    height: inherit;
    width: 50px;
    margin-right: -12px;
    margin-top: -2px;
    z-index: 15;
    position: relative;
    
    flex-direction: column;
    justify-content: center;
    align-items: center;
    display: none;
}

@media (max-width: 1000px) {
    .nav_ico {
        display: flex;
    }
}


.nav_ico_line1,
.nav_ico_line2 {
    width: 24px;
    height: 2px;
    background-color: #000000;
    display: block;
    position: absolute;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: center;
}

.nav_ico_line1 {
    transform: translateY(-5px);
}

.nav_ico_line2 {
    transform: translateY(5px);
}

.nav_ico.active .nav_ico_line1 {
    transform: rotate(45deg);
}

.nav_ico.active .nav_ico_line2 {
    transform: rotate(-45deg);
}

.nav_ico:hover {
    cursor: pointer;
}

/* overlay styles for mobile dropdown */
.nav_overlay {
    height: 200px;
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    width: 100vw;
    background: linear-gradient(
        to bottom,
        rgba(252, 252, 247, 1) 0%,    /* start opaque */
        rgba(252, 252, 247, 1) 30%,   /* maintain opaque until 70% */
        rgba(252, 252, 247, 0) 100%   /* fade to transparent at bottom */
    );
    opacity: 0;
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                visibility 0s linear 0.3s;
    z-index: 5;
    pointer-events: none;
    visibility: hidden;
}

@media screen and (max-width: 1000px) {
    .nav_overlay {
        display: block;
    }
    
    .nav_overlay.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                    visibility 0s linear;
    }
}

.nav_right {
    width: 50%;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: -4px;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    margin-right: -50px;
    flex-wrap: nowrap;
    gap: 50px;
    
}

.nav_item {
    width: auto;
    height: 70px;
    margin-left: 0px;
    text-transform: uppercase;
    margin-top: 14px;
    text-align: right;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
}

@media screen and (max-width: 1000px) { 
    .nav_item {
        position: static;
        width: max-content;
        height: 28px;
        margin-top: 4px;
        margin-left: 0px;
        font-size: 13px;
        letter-spacing: 0px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav_right {
        width: 100vw;
        gap: 20px;
        margin-top: 0;
        opacity: 0;
        flex-wrap: wrap;
        transform: translateY(-20px);
        pointer-events: none;
        position: fixed;
        top: 54px;
        left: 0;
        z-index: 101;
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                    visibility 0s linear 0.3s;
        visibility: hidden;
        box-sizing: border-box;
        padding-right: 33px;
    }
    .nav_right.active {
        padding-right: 33px;
        flex-wrap: nowrap;
    }
    .nav_right {
        flex-wrap: nowrap;
    }
}

@media screen and (max-width: 500px) { 
    .nav_right.active {
        padding-right: 12px;
    }
    .nav_right {
        padding-right: 12px;
        gap: 14px;
    }
    .nav_item {
        font-size: 12px;
    }
}

.nav_right.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0.0, 0.2, 1),
                visibility 0s linear;

}

.nav_pagelink {
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 15px;
    height: fit-content;
    color: black;
    text-decoration: none;
    margin-top: 16px;
}

.nav_pagelink:hover {
    text-decoration: underline;
}


.nav_sub {
    position: relative;
    font-size: 13px;
    font-weight: 600;
    top: -3px;
}

.nav_pagelink:hover {
    text-decoration: underline;
    cursor: pointer;
}

.nav_sub {
    text-decoration: none;
}

.nav_dropdown_item_text:hover {
    text-decoration: underline;
}

.nav_dropdown_item:hover .nav_sub {
    text-decoration: none;
}

.nav_dropdown_item:hover .nav_sub {
    margin-left: 2px;
    font-size: 12px;
    text-decoration: none;
}

.nav_dropdown_item:hover {
    text-decoration: none;
}

/* Add padding to body to prevent content from appearing under the fixed nav */
body {
    padding-top: 70px;
}

.nav_spacing {
    height: 70px;
}

/* Portfolio dropdown styles for desktop */
.nav_portfolio {
    position: relative;
}

.nav_portfolio_trigger {
    cursor: pointer;
    user-select: none;
}

.nav_dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: transparent;
    min-width: 200px; 
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1000;
    padding: 0;
    margin-top: -10px;
    /*background-color: blue;*/
}

.nav_dropdownspace {
    position: absolute;
    right: 0px;
    top: -12px;
    width: 100px;
    height: 12px;
    /*background-color: yellow;*/
}

.nav_portfolio:hover .nav_dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav_drop_cont {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    width: 100%;
}

.nav_dropdown_item {
    display: block;
    padding: 12px 20px;
    color: black;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: white;
    transition: background-color 0.2s ease;
    margin-bottom: 10px;
    width: fit-content;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.nav_dropdown_item:last-child {
    border-bottom: none;
}

.nav_dropdown_item:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.nav_dropdown_item_text {
    text-decoration: none;
}

.nav_dropdown_item:hover .nav_dropdown_item_text {
    text-decoration: underline;
}

.nav_sub {
    margin-left: 2px;
    font-size: 12px;
    text-decoration: none !important;
}

/* Hide dropdown on mobile */
@media screen and (max-width: 1000px) {
    .nav_dropdown {
        display: none;
    }
    
    .nav_portfolio_trigger {
        cursor: pointer;
    }
    
    /* Hide the desktop portfolio item on mobile */
    .nav_portfolio {
        display: none;
    }
}

/* Show mobile-only items only on mobile */
.nav_item_mobile_only {
    display: none;
}

@media screen and (max-width: 1000px) {
    .nav_item_mobile_only {
        display: flex;
    }
}

/* Mobile portfolio submenu */
.nav_portfolio_mobile {
    display: none;
    position: relative;
    top: 40px;
    left: 0;
    width: 100vw;
    background: linear-gradient(
        to bottom,
        rgba(252, 252, 247, 1) 0%,
        rgba(252, 252, 247, 1) 80%,
        rgba(252, 252, 247, 0) 100%
    );
    z-index: 99;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
    visibility: hidden;
    padding-top: 0px;
    padding-bottom: 20px;
    padding-right: 0;
    padding-left: 0;
}

@media screen and (max-width: 1000px) {
    .nav_portfolio_mobile {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    
    .nav_portfolio_mobile.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        visibility: visible;
        width: 100%;
    }
}

.nav_portfolio_mobile_inner {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: nowrap;
    align-items: center;
    padding-left: 20px;
    padding-right: 0px;
    padding-top: 0;
    padding-bottom: 0;
    gap: 20px;
    width: 100%;
}

@media screen and (max-width: 1000px) { 
    .nav_portfolio_mobile_inner {
        gap: 10px;
        margin-top: -4px;
    }
    .nav_sub {
        margin-left: -3px;
        margin-top: -2px;
        font-size: 10px;
    }
}

@media screen and (max-width: 400px) { 
    .nav_portfolio_mobile_inner {
        gap: 20px;
    }
    .nav_sub {
        display: none;
    }
}

.nav_portfolio_mobile_item {
    color: black;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.nav_portfolio_mobile_item:hover {
    text-decoration: underline;
}

.nav_portfolio_mobile_item .nav_sub {
    font-size: 11px;
}