@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;550&display=swap');

/* Menu styles */
.menu {
    flex: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

/* Hide the Menu text */
.navigation-text {
    font-size: 1em;
    color: #1c3694;
    opacity: 1;
    visibility: visible;
    transition: none;
}

/* Menu toggle button */
.navbar-toggler {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 28px; /* Reduced height from 36px to 28px */
    width: 40px;
}

/* Menu icon bars with varying lengths */
.navbar-toggler-icon {
    background-color: #001F62;
    display: block;
    transition: background-color 0.5s ease;
}

.navbar-toggler-icon:nth-child(1),
.navbar-toggler-icon:nth-child(2),
.navbar-toggler-icon:nth-child(3) {
    height: 4px;
    border-radius: 2px;
    background: #1c3694;
    transition: background 0.3s ease, transform 0.3s ease;
}

.navbar-toggler-icon:nth-child(1) {
    width: 60%;
}

.navbar-toggler-icon:nth-child(2) {
    width: 80%;
}

.navbar-toggler-icon:nth-child(3) {
    width: 100%;
}

/* Menu icon hover state */
.navbar-toggler:hover .navbar-toggler-icon {
    background: #315cfd;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
    transform: translateY(-20px);
    visibility: hidden;
    width: 220px;
    margin-right: 10px;
    border: 1px solid #e0e0e0;
}

/* Show dropdown with smooth transition */
.menu-item:hover > .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

/* Dropdown items */
.dropdown-item {
    color: #1c3694;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.3s ease, padding-left 0.3s ease;
    font-size: 1em;
    font-weight: 500;
    border-radius: 4px;
    position: relative;
    z-index: 1;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    padding-left: 25px;
    box-shadow: inset 4px 0 0 #315cfd;
}

.menu .dropdown-menu {
    position: absolute;
    right: 0;
    top: 40px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 250px;
    z-index: 9999;
    display: none; /* Initially hidden */
}

/* Submenu styles */
.submenu {
    display: none;
    padding-left: 0;
    background-color: #001F62;
    border-radius: 8px;
    position: relative;
    top: 0;
    left: 0;
    min-width: 220px;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.menu-item:hover .submenu,
.menu-item.active > .submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu .dropdown-item {
    padding: 10px 15px;
    color: #ffffff;
    background-color: #001F62;
    font-size: 1em;
    font-weight: 500;
    border-bottom: none;
}

.submenu .dropdown-item:hover {
    background-color: #315cfd;
    padding-left: 25px;
}

/* Submenu toggle icon */
.submenu-toggle {
    float: right;
    margin-right: 10px;
    font-size: 1em;
    color: #1c3694;
    transition: transform 0.3s ease;
}

.submenu-toggle::before {
    content: "\25BC";
    font-size: 1em;
    color: #1c3694;
    transition: transform 0.3s ease;
}

.dropdown-item:hover .submenu-toggle::before {
    transform: rotate(180deg);
}

@media (min-width: 2560px) {
    .navigation-text {
        font-size: 1.5em; /* Increase font size for navigation text */
    }

    .navbar-toggler {
        height: 40px; /* Increase height of the menu toggle button */
        width: 60px;  /* Increase width of the menu toggle button */
    }

    .navbar-toggler-icon:nth-child(1),
    .navbar-toggler-icon:nth-child(2),
    .navbar-toggler-icon:nth-child(3) {
        height: 6px; /* Increase the height of the menu icon bars */
    }

    .navbar-toggler-icon:nth-child(1) {
        width: 70%; /* Increase width of the first bar */
    }

    .navbar-toggler-icon:nth-child(2) {
        width: 90%; /* Increase width of the second bar */
    }

    .navbar-toggler-icon:nth-child(3) {
        width: 100%; /* Keep the width of the third bar full */
    }

    .dropdown-menu {
        width: 350px; /* Increase dropdown menu width */
        padding: 20px; /* Increase padding inside the dropdown */
    }

    .dropdown-item {
        font-size: 1.2em; /* Increase font size for dropdown items */
        padding: 15px 20px; /* Adjust padding for dropdown items */
    }

    .dropdown-item:hover {
        padding-left: 30px; /* Increase padding on hover */
    }

    .submenu {
        min-width: 260px; /* Increase submenu width */
    }

    .submenu .dropdown-item {
        font-size: 1.2em; /* Increase font size for submenu items */
        padding: 15px 20px; /* Adjust padding for submenu items */
    }

    .submenu-toggle {
        font-size: 1.2em; /* Increase font size of submenu toggle */
    }

    .submenu-toggle::before {
        font-size: 1.2em; /* Increase font size of the toggle icon */
    }
}
