/*!
 * ANKY.AI -- Proprietary License
 * Copyright (c) 2026 ANKY.AI. All rights reserved.
 *
 * This file is part of the Jatin Sethi WordPress theme, designed and built
 * by ANKY.AI (https://anky.ai) exclusively for Jatin Sethi & Co.
 * (https://jatinsethi.com). Redistribution, resale, sublicensing, or listing
 * on any third-party marketplace or public repository is strictly prohibited.
 * Use on any domain other than jatinsethi.com requires a separate written
 * license from ANKY.AI. See LICENSE.txt in the theme root.
 * Contact: licensing@anky.ai
 */

/**
 * Header Menu - 3-Level Dropdown Styles
 * Jatin Sathi WordPress Theme
 *
 * Extracted from nav-walker.php inline markup
 * and frontend/includes/header.php
 */

/* =========================================================================
 *  SVG Arrow Icons
 * ========================================================================= */

.dropdown-arrow {
    width: 18px;
    height: 18px;
    margin-left: 4px;
    vertical-align: middle;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.submenu-arrow {
    width: 14px;
    height: 14px;
    margin-left: auto;
    vertical-align: middle;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-dropdown:hover > .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-submenu:hover > .dropdown-toggle .submenu-arrow {
    transform: rotate(90deg);
}

/* =========================================================================
 *  Level 1 - Top-Level Dropdown Wrapper
 * ========================================================================= */

.nav-dropdown {
    position: relative;
}

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

/* =========================================================================
 *  Level 2 - Dropdown Menu (appears on hover)
 * ========================================================================= */

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    min-width: 220px;
    padding: 8px;
    z-index: 1000;
    display: none;
    animation: dropdownSlideIn 0.2s ease-out;
}

.nav-dropdown:hover > .dropdown-menu {
    display: block;
}

/* =========================================================================
 *  Dropdown Item (link inside dropdown)
 * ========================================================================= */

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: #374151;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* =========================================================================
 *  Level 3 - Submenu (flyout)
 * ========================================================================= */

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu-content {
    position: absolute;
    left: 100%;
    top: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    min-width: 220px;
    padding: 8px;
    z-index: 1000;
    display: none;
    animation: submenuSlideIn 0.15s ease-out;
}

.dropdown-submenu:hover > .dropdown-submenu-content {
    display: block;
}

/* =========================================================================
 *  Badge (menu item badges like "New", "Hot", etc.)
 * ========================================================================= */

.menu-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    color: white;
    margin-left: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    vertical-align: middle;
}

.submenu-badge {
    font-size: 0.6rem;
    padding: 1px 6px;
}

/* =========================================================================
 *  Animations
 * ========================================================================= */

@keyframes dropdownSlideIn {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes submenuSlideIn {
    from {
        transform: translateX(10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =========================================================================
 *  Current Page Indicator
 * ========================================================================= */

.w--current {
    color: #3b82f6;
    font-weight: 600;
}

/* =========================================================================
 *  Mobile Responsive (max-width: 991px)
 * ========================================================================= */

@media (max-width: 991px) {

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-left: 3px solid #3b82f6;
        margin-left: 10px;
        padding-left: 10px;
        border-radius: 0;
        min-width: auto;
        animation: none;
    }

    .dropdown-submenu-content {
        position: static;
        box-shadow: none;
        border-left: 3px solid #93c5fd;
        margin-left: 10px;
        padding-left: 10px;
        border-radius: 0;
        min-width: auto;
        animation: none;
    }

    .dropdown-item {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .dropdown-arrow {
        width: 16px;
        height: 16px;
    }

    .submenu-arrow {
        width: 12px;
        height: 12px;
    }

    .nav-dropdown:hover > .dropdown-menu {
        display: block;
    }

    .dropdown-submenu:hover > .dropdown-submenu-content {
        display: block;
    }
}
