﻿:root {
    --primary: #4B3F92;
    --accent: #7D162B;
    --white: #ffffff;
}

/* Header */
header {
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.logo img {
    max-width: 70px;
    height: auto;
}

.nav-bar {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    gap: 10px;
}

/* Nav Items */
.nav-bar_item {
    list-style: none;
    padding: 6px 10px;
    position: relative;
    white-space: nowrap;
}

    .nav-bar_item a {
        text-decoration: none;
        color: var(--primary);
        font-weight: bold;
        display: inline-block;
        position: relative;
    }

        .nav-bar_item a:hover {
            color: var(--accent);
        }

        .nav-bar_item a::after {
            content: "";
            position: absolute;
            height: 2px;
            width: 0;
            bottom: 0;
            left: 0;
            background-color: var(--accent);
            transition: width 0.15s ease-in-out;
        }

        .nav-bar_item a:hover::after {
            width: 100%;
        }

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-arrow {
    margin-left: 5px;
    font-size: 0.75em;
    transition: transform 0.3s ease;
}

.nav-bar_item.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.project {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    visibility: hidden;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    text-align: center;
    padding: 12px 15px;
    transition: all 0.3s ease;
    min-width: max-content;
}

.dropdown:hover .project {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

.drop-item {
    list-style: none;
    margin-bottom: 8px;
}

    .drop-item a {
        color: var(--primary);
        text-decoration: none;
    }

/* Desktop View */
@media (min-width: 992px) {
    .desktop-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

        .desktop-nav .logo {
            flex-shrink: 0;
        }

        .desktop-nav .navbar-nav {
            flex-grow: 1;
            display: flex;
            justify-content: flex-end;
        }

    .nav-bar {
        flex-direction: row;
        align-items: center;
    }

    .nav-bar_item {
        padding: 6px 12px;
    }
}

/* Mobile View */
@media (max-width: 991.98px) {
    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
        width: fit-content; /* shrink to fit text */
        margin-top: 1rem;
        padding-left: 10px;
    }

    .nav-bar_item {
        width: auto;
        padding: 8px 0;
        margin-right: 10px;
    }

        .nav-bar_item a {
            padding: 6px 8px;
        }

    .dropdown > a {
        width: auto;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .dropdown-arrow {
        margin-left: 5px;
    }

    .dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }

    .project {
        display: none;
        position: static;
        background: none;
        box-shadow: none;
        padding-left: 10px;
        margin-top: 4px;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: auto;
    }

    .dropdown.open .project {
        display: block;
    }

    .drop-item {
        padding: 2px 0;
        white-space: nowrap;
    }

    .nav-bar_item a::after {
        display: none !important;
    }

    .menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .logo {
        max-width: 60%;
    }

    .menu-toggle {
        font-size: 1.8rem;
        color: var(--primary);
    }
}

/* Very Small Screens */
@media (max-width: 767.98px) {
    .logo img {
        max-width: 50px;
    }
}
