﻿
/* Dropdown container */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown trigger link */
.dropdown > a {
    display: block;
    /*padding: 10px 15px;*/
   
    color: #333;
    text-decoration: none;
    position: relative;
    transition: all 0.3s;
}

    /* Dropdown arrow */
    /*.dropdown > a:after {
        content: "▼";
        margin-left: 5px;
        font-size: 0.7em;
        transition: transform 0.3s;
    }*/
    .dropdown > a:after {
        content: "";
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid currentColor;
        transition: all 0.3s ease;
    }
/* Rotate arrow when open */
.dropdown:hover > a:after {
    transform: rotate(180deg);
}

/* Dropdown menu */
    .dropdown > ul {
        display: block; /* Changed to block for animation */
        position: absolute;
        left: 0;
        top: 100%;
       
        min-width: 200px;
        background: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    }

/* Show dropdown on hover */
.dropdown:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu items - initially hidden */
.dropdown > ul > li {
    position: relative;
    padding: 0 15px;
    height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border-bottom: 1px dotted #ccc;
    overflow: hidden;
}

/* Animate items sequentially when dropdown is hovered */
.dropdown:hover > ul > li {
    height: 44px; /* Adjust based on your content */
    opacity: 1;
    transform: translateY(0);
    padding: 8px 15px;
}

    /* Staggered animation delays */
    .dropdown:hover > ul > li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .dropdown:hover > ul > li:nth-child(2) {
        transition-delay: 0.2s;
    }

    .dropdown:hover > ul > li:nth-child(3) {
        transition-delay: 0.3s;
    }

    .dropdown:hover > ul > li:nth-child(4) {
        transition-delay: 0.4s;
    }

    .dropdown:hover > ul > li:nth-child(5) {
        transition-delay: 0.5s;
        border-bottom: none; /* Remove border from last item */
    }

/* Links */
.dropdown li a {
    color: #333;
    text-decoration: none;
    display: block;
    transition: all 0.2s;
    padding: 5px 0;
}

    /* Hover effect */
    .dropdown li a:hover {
        background: rgba(0,0,0,0.05);
        color: darkgoldenrod;
        transform: translateX(5px);
        border-left: 3px solid #1a5e27;
    }

 

    /* Active/Hover States */
    .dropdown:hover > a,
    .dropdown .dropdown:hover > a {
        background: #1a5e27;
        color: white !important;
        /*padding: 6px 18px;*/
    }

/* Hover effect to match other items */
li.afdsa > a:hover {
    background: rgb(6, 81, 51, 0.08);
}
/* Rotate arrow when menu is open */
.dropdown:hover > a:after {
    transform: translateY(-50%) rotate(180deg);
}
/* Show megamenu on hover */
.dropdown:hover .megamenu {
    display: block;
    animation: fadeIn 0.3s ease;
}
/* Dropdown arrow styling */
.dropdown > a {
    position: relative;
    padding-right: 20px;
    /*   padding: 5px 15px;*/
    text-decoration: none;
    color: #333; /* Default text color */
}

/* Fade-in animation for megamenu */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}