/* navbar.css */
body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #222323;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.sticky {
    position: fixed;
    top: -100px;
    width: 100%;
    box-shadow: 7px 11px 13px 11px rgb(255 255 255 / 42%);
    animation: slideDown 0.5s forwards;
}

.navbar.sticky.hidden {
    top: 0;
    animation: slideUp 0.5s forwards; /* Apply slide up animation */
}

@keyframes slideDown {
    to {
        top: 0; /* End the animation at the top of the screen */
    }
}

@keyframes slideUp {
    from {
        top: 0; /* Start the animation at the top of the screen */
    }
    to {
        top: -100px; /* End the animation off-screen */
    }
}

.navbar .logo img {
    height: 60px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.navbar .nav-links li {
    margin: 0 1rem;
    position: relative;
}

.navbar .nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
}

.navbar .nav-links a:hover {
    background-color: #0056b3;
    border-radius: 5px;
    color: #ffffff;
}

.navbar .nav-links .dropdown-content {
    display: none;
    position: absolute;
    background-color: #333;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 150px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.navbar .nav-links .dropdown-content li {
    padding: 0;
}

.navbar .nav-links .dropdown-content a {
    padding: 0.5rem 1rem;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar .nav-links .dropdown-content a i {
    margin-right: 8px;
}

.navbar .nav-links .dropdown-content a:hover {
    background-color: #0056b3;
    color: #ffffff;
}

.navbar .nav-links .dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.hamburger:hover {
    background-color: #444;
}

.hamburger i {
    font-size: 1.5rem;
    color: white;
    transition: color 0.3s ease;
}

.hamburger:hover i {
    color: #0056b3;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 300px;
    background-color: #333;
    color: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, visibility 0.3s;
    visibility: hidden;
    z-index: 20000;
}

.mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu .close-btn {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
}

.mobile-menu .close-btn i {
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    padding: 1rem;
    border-bottom: 1px solid #444;
}

.mobile-nav-links a {
    color: white;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    text-align: center;
}

.mobile-nav-links a:hover {
    background-color: #0056b3;
    color: #ffffff;
}

.mobile-nav-links .dropdown-content {
    display: none;
    background-color: #444;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links .dropdown:hover .dropdown-content {
    display: block;
}

@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }
}
/* Existing styles remain unchanged */

/* Dropdown caret rotation */
.nav-links .dropbtn .fa-caret-down {
    transition: transform 0.3s ease;
}

.nav-links .dropbtn.active .fa-caret-down {
    transform: rotate(180deg);
}

/* Mobile dropdown caret rotation */
.mobile-nav-links .dropbtn .fa-caret-down {
    transition: transform 0.3s ease;
}

.mobile-nav-links .dropbtn.active .fa-caret-down {
    transform: rotate(180deg);
}

/* Dropdown animation */
@keyframes expand {
    from {
        opacity: 0;
        transform: scaleY(0);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes collapse {
    from {
        opacity: 1;
        transform: scaleY(1);
    }
    to {
        opacity: 0;
        transform: scaleY(0);
    }
}

.nav-links .dropdown-content {
    animation: collapse 0.3s forwards;
    transform-origin: top;
}

.nav-links .dropdown:hover .dropdown-content {
    display: block;
    animation: expand 0.3s forwards;
    transform-origin: top;
}

.mobile-nav-links .dropdown-content {
    animation: collapse 0.3s forwards;
    transform-origin: top;
}

.mobile-nav-links .dropdown:hover .dropdown-content {
    display: block;
    animation: expand 0.3s forwards;
    transform-origin: top;
}





