/* ==========================================================
   NAV.CSS — FINAL FIXED v8.7
   Tutto stabile: hover, dropdown, mobile, lingua, logo
========================================================== */

/* HEADER WRAPPER */
.mirc-header {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 12px 22px;

    background: var(--panel);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);

    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 9000;
}

/* LEFT SIDE ================================================= */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* LOGO — fermo, ruota solo on-hover */
.droop-logo img {
    width: 42px;
    height: 42px;
    display: block;

    transform-origin: center center;
    transition: transform .6s ease;
    animation: none !important; /* blocchiamo idle/roll globali */
}

/* Rotazione fluida quando passi il mouse */
.droop-logo:hover img {
    transform: rotate(360deg);
}


/* BRAND */
.brand {
    text-decoration: none;
    color: var(--text);
    font-size: 1.2rem;
}


/* ===========================
   DESKTOP NAVIGATION
=========================== */
.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

/* menu group */
.menu-group {
    position: relative;
}

/* clickable label */
.menu-trigger {
    cursor: pointer;
    color: var(--text);
    user-select: none;
}

/* ===========================
   DROPDOWN (NO display:none!)
=========================== */
.menu-sub {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;

    min-width: 200px;
    padding: 14px;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    gap: 8px;

    box-shadow: 0 0 20px var(--glow);
    backdrop-filter: blur(12px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .18s ease, transform .2s ease;
    transform: translateY(6px);

    z-index: 9200;
}

/* visible */
.menu-group.open .menu-sub {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* auto flip */
.menu-sub.flip {
    left: auto;
    right: 0;
}


/* ===========================
   LANGUAGE SWITCHER DESKTOP
=========================== */
.lang-switcher {
    display: flex;
    gap: 10px;
}

.lang-btn {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: .95rem;

    border: 1px solid transparent;
    background: rgba(255,255,255,0.08);
    transition: .25s ease;
    white-space: nowrap;
}

.lang-btn.active {
    border-color: var(--accent);
    background: rgba(255,255,255,0.16);
    font-weight: bold;
}


/* ===========================
   MOBILE TOGGLE
=========================== */
.mobile-toggle {
    border: none;
    background: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text);
    margin: 4px 0;
    border-radius: 2px;
}


/* ==========================================================
   MOBILE MENU — FULL PANEL MODERNO
========================================================== */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -360px; /* nascosto */
    width: 360px;
    max-width: 85%; /* sicurezza su telefoni piccoli */

    height: 100vh;
    padding: 20px 24px;

    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(14px);

    overflow-y: auto;
    transition: right .35s ease;

    box-shadow: -6px 0 25px var(--glow);
    z-index: 999999;
}

.mobile-menu.open {
    right: 0;
}

/* X in alto a destra */
.mobile-close {
    font-size: 2.2rem;
    font-weight: bold;
    text-align: right;
    cursor: pointer;
    margin-bottom: 22px;
}

/* LANGUAGE SWITCH AREA */
.mobile-lang {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.mobile-lang a {
    padding: 8px 18px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid transparent;
}

.mobile-lang a.active {
    border-color: var(--accent);
    background: rgba(255,255,255,0.15);
    font-weight: bold;
}

/* MENU LISTA */
.mobile-list {
    padding: 0;
}

.mobile-list > li {
    margin-bottom: 20px;
}

.mobile-list > li > span {
    display: block;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 8px;
}

/* Submenu */
.mobile-list ul {
    padding-left: 16px;
}

.mobile-list ul li a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ==========================================================
   MENU ITEMS — ACTIVE / SELECTED FX (theme-aware)
========================================================== */

/* voci menu base */
.main-nav a,
.menu-sub a,
.mobile-menu a {
    position: relative;
    color: var(--text);
    transition: .25s ease;
}

/* HOVER */
.main-nav a:hover,
.menu-sub a:hover,
.mobile-menu a:hover {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent2);
}

/* INDICATORE LINEA (hover + active) */
.main-nav a::after,
.menu-sub a::after,
.mobile-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;

    width: 0;
    height: 2px;
    background: var(--accent);

    transition: .25s ease;
}

/* mostra linea in hover */
.main-nav a:hover::after,
.menu-sub a:hover::after,
.mobile-menu a:hover::after {
    width: 100%;
}

/* VOCE ATTIVA (manuale o PHP) */
.menu-active,
.menu-active:hover {
    color: var(--accent);
    font-weight: 600;
    text-shadow: 0 0 10px var(--accent2);
}

.menu-active::after {
    width: 100%;
}
