/* Hide default WP arrow */
.wp-block-navigation__submenu-icon {
    display: none !important;
}

/* Arrow wrapper */
.glassmak-arrow {

    margin-left: 6px;
    transition: transform 0.25s ease, color 0.2s ease;
    /* color is set via inline CSS variables injected by PHP */
}

/* Force SVG internals to inherit currentColor for both stroke & fill */
.glassmak-arrow svg,
.glassmak-arrow svg * {
    stroke: currentColor;
    fill: currentColor;
}

/* Rotate on open (desktop + mobile) */
.wp-block-navigation-item.gm-open > a .glassmak-arrow {
    transform: rotate(var(--gm-rotation, 180deg));
}

/* Also rotate when hovering parent (desktop) */
.wp-block-navigation-item.has-child:hover > a .glassmak-arrow {
    transform: rotate(var(--gm-rotation, 180deg));
}

/* Desktop: auto-open submenu */
@media (min-width: 992px) {

    /* Open submenu on hover */
    .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Ensure submenu is positioned correctly */
    .wp-block-navigation__submenu-container {
        display: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease;
    }
}

@media (max-width: 991px) {
    .glassmak-arrow {
        display: none !important;
    }
}