/* Airport Transfer Dropdown Styles */

.headerNav {
    position: relative;
}

/* Parent Link Container */
.navItem-dropdown {
    position: relative;
    display: inline-block;
}

.navLink-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.navLink-dropdown i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

/* Level 1: States Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: var(--dark-2);
    border-radius: 8px;
    padding: 12px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 100;
    border: 1px solid rgba(245, 192, 0, 0.1);
}

.navItem-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navItem-dropdown:hover .navLink-dropdown i {
    transform: rotate(180deg);
}

/* Dropdown Items */
.dropdown-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-sub);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown-item:hover {
    color: var(--yellow);
    background-color: rgba(245, 192, 0, 0.05);
}

.dropdown-item i {
    font-size: 10px;
    margin-left: 10px;
}

/* Level 2: Cities Dropdown */
.submenu {
    position: absolute;
    top: -12px;
    left: 100%;
    min-width: 200px;
    background-color: var(--dark-2);
    border-radius: 8px;
    padding: 12px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 101;
    border: 1px solid rgba(245, 192, 0, 0.1);
}

.dropdown-item:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.submenu-item {
    display: block;
    padding: 8px 20px;
    color: var(--text-sub);
    font-family: var(--font-body);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.submenu-item:hover {
    color: var(--yellow);
    background-color: rgba(245, 192, 0, 0.05);
    padding-left: 25px;
}

/* Mouseout Delay Hack using transitions */
.dropdown-menu, .submenu {
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s; /* Delay visibility hidden */
}

.navItem-dropdown:hover > .dropdown-menu,
.dropdown-item:hover > .submenu {
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
}

/* Mobile Styles */
@media (max-width: 1024px) {
    .navItem-dropdown {
        width: 100%;
    }

    .navLink-dropdown {
        font-family: var(--font-display);
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        color: var(--white);
        text-transform: uppercase;
        letter-spacing: 2px;
        width: 100%;
        justify-content: flex-start;
        padding: 0;
    }

    .navLink-dropdown::before {
        content: attr(data-index);
        font-family: var(--font-body);
        font-size: 12px;
        font-weight: 600;
        color: var(--yellow);
        opacity: 0.5;
        margin-right: 15px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        background-color: transparent;
        width: 100%;
        margin-left: 30px;
    }

    .navItem-dropdown.is-active > .dropdown-menu {
        max-height: 2000px; /* Large enough for nested lists */
        margin-top: 15px;
    }

    .navItem-dropdown.is-active .navLink-dropdown i {
        transform: rotate(180deg);
    }

    .dropdown-item {
        font-family: var(--font-display);
        font-size: 1.4rem;
        text-transform: uppercase;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        flex-direction: column;
        align-items: flex-start;
    }

    .dropdown-item i {
        position: absolute;
        right: 0;
        top: 15px;
        transition: transform 0.3s ease;
    }

    .dropdown-item.is-active i {
        transform: rotate(180deg);
    }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        background-color: transparent;
        width: 100%;
        padding-left: 20px;
    }

    .dropdown-item.is-active > .submenu {
        max-height: 1000px;
        margin-top: 10px;
    }

    .submenu-item {
        font-size: 1rem;
        padding: 8px 0;
        opacity: 0.8;
    }
}
