/* Navigation */

nav {
    position: fixed;
    z-index: 1000;
    top: 0;
    width: 100%;
    height: var(--space-xl);
    background-color: var(--lightest);
}

.nav-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-logo {
    max-width: 20rem;
    width: 100%;
    height: auto;
    display: block;
    margin-right: var(--space-sm);
}

nav ul {
    display: flex;
    gap: var(--space-l);
    list-style: none; /* Removes bullet points */
    padding: 0; /* Removes default padding */
    margin: 0; /* Removes default margin */
}


nav ul li {
    text-transform: uppercase;
    opacity: 100%;
    text-decoration: none;
    color: var(--medium-dark);
    transition: opacity 0.3s ease;
    font-weight: 300;
}

.burger-icon {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 1.5rem;
    height: 1rem;
}

.menu-line {
    height: 2px;
    width: 100%;
    background-color: var(--dark);
}

.nav-tablet {
    display: flex;
    gap: var(--space-m);
    align-items: center;
    margin-left: var(--space-sm);
}

footer a {
    transition: opacity 0.3s ease;
}

nav ul:has(li:hover) li:not(:hover) {
    opacity: 0.5;
}

footer .flex:has(a:hover) a:not(:hover) {
    opacity: 0.5;
}


/* General styles */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

/* The mobile menu when active */
.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

/* Center the mobile menu items */
.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-menu ul li {
    margin: var(--space-m) 0;
}

.mobile-menu ul li a {
    font-size: 2rem;
    text-transform: uppercase;
    color: var(--light)!important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-menu ul li a.active {
   border-bottom: 1.5px solid white;
}

/* Burger Icon Animation */
.burger-icon {
    cursor: pointer;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 1.5rem;
    height: 1.175rem; /* Slightly taller for better proportions */
    position: relative;
}

.menu-line {
    height: 2px;
    width: 100%;
    background-color: var(--dark);
    transition: all 0.3s ease;
}

/* Open State (Transforms into X) */
.burger-icon.open .menu-line:nth-child(1) {
    position: absolute;
    top:0;
    transform: rotate(45deg); /* No translation needed */
    transform-origin: top left; /* Rotate around top edge */
    background-color: var(--light); /* Turn white */
}

.burger-icon.open .menu-line:nth-child(2) {
    opacity: 0; /* Hide middle line */
}

.burger-icon.open .menu-line:nth-child(3) {
    position: absolute;
    bottom: 0;
    transform: rotate(-45deg) ; /* No translation needed */
    transform-origin: bottom left;
    background-color: var(--light); /* Turn white */
}

/* Transition for the lines */
.menu-line {
    transition: all 0.3s ease;
}

/* Change burger icon lines to white when active */
.burger-icon.open .menu-line {
    background-color: var(--light); /* Ensure white color */
}
    

/* Breakpoints */

@media screen and (min-width:67.5rem) {
    
    .mobile-menu {
        display: none;
    }

    .burger-icon {
        display: none;
    }
}

/* Remove the display: none rule for the mobile menu */
@media screen and (max-width: 67.5rem) {

    .mobile-menu {
        opacity: 0;
        visibility: hidden; /* Initially hidden */
    }

    .mobile-menu ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

     /* The mobile menu when active */
     .mobile-menu.active {
        opacity: 1;
        visibility: visible;
     }

    .nav-content {
        justify-content: space-between;
    }

    .nav-desktop {
        display: none;
    }

   
}

@media screen and (max-width: 45rem) {

    nav .textlink {
        display: none;
    }



}










