/* Ribbon Styles */
.top-ribbon-left {
    position: fixed;
    top: 0;
    left: 0;
    width: 52%;
    background-color: var(--primary_color);
    color: var(--footer_header_text_color);
    display: flex;
    height: 3.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.875rem;
    box-shadow: 0rem 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-sizing: border-box;
    top: 0;
    left: 0;
    transition: transform 1s ease;
}

.top-ribbon-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 48%;
    background-color: rgb(254, 254, 254);
    color: var(--footer_header_text_color);
    display: flex;
    height: 3.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.875rem;
    z-index: 1000;
    box-sizing: border-box;
    transition: transform 1s ease;
}

.logo img {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    height: clamp(2.5rem, 4vw, 3rem);
    width: auto;
    z-index: 9999;
    cursor: pointer;
    pointer-events: auto;
}

.overgang img {
    position: absolute;
    top: 0%;
    right: 0%;
    height: 3.75rem;
}

nav {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3.75rem;
    background: var(--secondary-color);
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    z-index: 999;
}


nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    margin-right: 0;
}

nav ul li {
    display: flex;
    align-items: stretch;
    height: 100%;
}

/* Navigation Styles */
nav ul li a {
    text-decoration: none;
    background-color: white;
    color: var(--primary_color);
    width: clamp(5rem, 11.5vw, 12.5rem);
    height: 3.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: border-bottom 0s;
}

/* Hover effect */
nav ul li a:hover {
    background-color: white;
    color: var(--primary_color);
    border-bottom: 0.3rem solid var(--primary_color);
}


nav ul li a.active {
    border-bottom: 0.3rem solid var(--primary_color);
}

body {
    padding-top: 5rem;
}

/* Off-screen menu */
.off-screen-menu {
    background: white;
    width: 15rem;
    /* Increased width to match the normal navbar's item size */
    height: auto;
    max-height: auto;
    position: fixed;
    top: 3.75rem;
    right: 0;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.3, 1.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    box-sizing: border-box;
    z-index: 1000;
}

/* Active state for off-screen menu */
.off-screen-menu.active {
    transform: translateX(0);
    height: auto;
    max-height: calc(100vh - 100px);
    padding: 0;
    overflow-y: auto;
}

/* Hide scrollbar */
.off-screen-menu::-webkit-scrollbar {
    display: none;
}

/* Styling the list inside the off-screen menu */
.off-screen-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Styling for each list item */
.off-screen-menu ul li {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    width: 100%;
    cursor: pointer;
    margin: 0;
    padding-left: 1rem;
    position: relative;
    box-sizing: border-box;
}

/* Styling for each link inside the list item */
.off-screen-menu ul li a {
    text-decoration: none;
    color: var(--primary_color);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 3.75rem;
    width: 12.5rem;
    position: relative;
    padding: 0 1rem;
    border-radius: 0;
    transition: border-right 0s;
}

/* Hover effect for each link */
.off-screen-menu ul li:hover {
    border-right: 0.3rem solid var(--secondary_color);
}

.off-screen-menu ul li.active {
    border-right: 0.3rem solid var(--secondary_color);
}

/* Hamburger menu */
.ham-menu {
    height: 3rem;
    width: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: absolute;
    right: 1rem;
}

.ham-menu span {
    height: 0.1rem;
    width: 75%;
    background-color: var(--primary_color);
    border-radius: 1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.3s ease;
}

.ham-menu:hover span {
    background-color: var(--primary_color);
}

.ham-menu span:nth-child(1) {
    top: 25%;
}

.ham-menu span:nth-child(2) {
    opacity: 0;
}

.ham-menu span:nth-child(3) {
    top: 50%;
}

.ham-menu span:nth-child(4) {
    opacity: 0;
}

.ham-menu span:nth-child(5) {
    top: 75%;
}


/* Ham menu active */
.ham-menu.active span:nth-child(1) {
    opacity: 0;
}

.ham-menu.active span:nth-child(2) {
    opacity: 100%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.ham-menu.active span:nth-child(3) {
    opacity: 0;
}

.ham-menu.active span:nth-child(4) {
    opacity: 100%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.ham-menu.active span:nth-child(5) {
    opacity: 0;
}


@media screen and (min-width: 768px) {
    .ham-menu {
        display: none;
    }

    .off-screen-menu {
        display: none !important;
    }
}

@media screen and (max-width: 767px) {
    .ham-menu {
        display: block;
    }

    .nav-links {
        display: none;
    }
}