@import url(./declarations.module.css);

/* NAVBAR */

/* Navbar styling */
ul.navbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0;
    padding-inline: 40px;
    overflow: visible;
    background-color: var(--white);
    /* box-shadow: 0 5px 3px var(--dark-grey); */
    font-size: var(--fs-lrg);
    font-weight: var(--fw-semibold);
}

.logo {
    height: 100px;
}

/* Button Container */
ul.navbar li.link {
    display: inline-block;
    position: relative;
    flex: 1;
    z-index: 1;

    > a::after {
        content: "";
        position: absolute;
        bottom: 20%;
        left: 20%;
        height: 2px;
        width: 0%;
        background: var(--accent-orange);
        transition: ease-out 0.3s;
    }

    > a:hover::after {
        width: 60%;
        animation: fade-in 0.3s;
        animation-fill-mode: forwards;
    }
}

/* Styles the look of the button */
ul.navbar li.link > a {
    display: block;
    margin-inline: 5px;
    padding: 14px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    border-radius: 8px;
    transition: 0.1s;
}

/* Changes the style of the button when hovered */
ul.navbar li.link > a:hover {
    /* background-color: var(--light); */
    translate: 0 -2px;
    transition: 0.2s;
}

/* Shows the dropdown content when hoveing the button */
ul.navbar li.link:hover .drop_content {
    display: block;
    transition: 0.3s;
    animation: fade-in 0.4s forwards;
}

@keyframes fade-in {
    0% {
        opacity: 0%;
    }
    100% {
        opacity: 100%;
    }
}

/* changes the style of the button when the button */
/* is being hovered and the dropdown content is shown */
/* only if the button has a div inside with class drop_content */
ul.navbar li.link:has(div.drop_content):hover > a {
    /* background-color: var(--light); */
    translate: 0 -2px;

    &::after {
        width: 60%;
    }
}

/* Styles the little lines separators in between nav links */
span.nav_divider::before {
    content: "";
    border: 1px solid var(--light);
}

/* NAVBAR DROP DOWNS */

/* Dropdown content container styling */
div.drop_content {
    display: none;
    position: absolute;
    opacity: 0%;
    width: calc(100% - 30px);
    margin-left: 15px;
    translate: 0 -2px;
    z-index: 3;
    box-shadow: var(--shadow);
    background-color: var(--white);
    color: var(--dark);
    border: 2px solid var(--accent-orange);
    border-radius: 15px;
}

/* The little triaingle at the top of the drop content */
.drop_content::before {
    content: "";
    position: absolute;
    top: -12px;
    left: calc(50% - 15px);
    height: 20px;
    width: 20px;
    border-radius: 7%;
    border-top: 2px solid var(--accent-orange);
    border-left: 2px solid var(--accent-orange);
    rotate: 45deg;
    background-color: var(--white);
}

/* Styles the links in the dropdown content */
div.drop_content ul li a {
    display: block;
    padding: 0.6rem;

    &::after {
        content: "";
        position: absolute;
        opacity: 0%;
        height: 1rem;
        width: 1rem;
        right: 1.5rem;
        margin-top: 0.3rem;
        border-top: 3px solid var(--accent-orange);
        border-right: 3px solid var(--accent-orange);
        border-radius: 10%;
        transform: rotate(45deg);
    }
}

/* Styles dropdown links hover styles */
div.drop_content ul li a:hover {
    transition: 0.2s;
    &::after {
        animation: fade-in 0.2s forwards;
    }
}

/* Chnages the shape of the last link in the dropdown to have a curved bottom */
div.drop_content ul li:last-of-type a {
    border-radius: 0 0 15px 15px;
}

footer {
    background-color: var(--dark);
    color: var(--light);
    height: 50px;
}
