/* 
   --- GLOBAL NAVIGATION SYSTEM ---
   Shared styles for the site-wide Draggable Adaptive Menu
*/

.dropdown {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: rgba(28, 28, 28, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    padding: 0.75rem;
    display: none;
    opacity: 0;
    flex-direction: column;
    gap: 4px;
    z-index: 5000;
    border-radius: 16px;
    pointer-events: auto;
}

/* Invisible bridge to prevent mouseleave when moving to dropdown */
.dropdown::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: 40px;
}

.dropdown::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(28, 28, 28, 0.98);
}

.dropdown-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.dropdown-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
    color: #C8A8F5; /* Pale Lavender Accent */
}

.dropdown-link::after { content: '→'; opacity: 0; transition: opacity 0.3s; }
.dropdown-link:hover::after { opacity: 1; }

.global-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px; /* Increased padding creates a continuous hover zone */
}

.global-nav-link.has-dropdown::after {
    content: '▾';
    font-size: 0.6rem;
    margin-left: 6px;
    opacity: 0.5;
    transition: transform 0.3s;
}

.global-menu-item:hover .global-nav-link.has-dropdown::after {
    transform: rotate(180deg);
    opacity: 1;
}

.global-nav-container {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    height: 60px;
    width: 60px;
    background-color: #2D2D2D;
    color: white;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 8px; /* 8px + 44px toggle + 8px = 60px perfect center */
    cursor: grab;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 4000;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

.global-nav-container.is-active {
    overflow: visible;
    width: auto;
}

.global-nav-toggle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: background 0.3s;
    pointer-events: auto;
}

.global-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.global-nav-line {
    display: block;
    width: 18px; /* Slightly longer for visibility */
    height: 2px;
    background-color: #FFFFFF !important;
    border-radius: 1px;
    pointer-events: none; /* Let clicks pass to toggle */
    flex-shrink: 0;
}

.global-nav-content {
    display: flex;
    align-items: center;
    padding: 0 12px;
    opacity: 0;
    visibility: hidden;
}

.global-nav-link {
    text-decoration: none;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.6;
    transition: opacity 0.3s;
    font-family: 'Inter', sans-serif;
    padding: 10px 0; /* Vertical hit area */
}

/* Home link needs its own padding since it's not in a menu-item */
a.global-nav-link:first-child {
    padding: 0 16px;
}

.global-nav-link:hover { opacity: 1; }

.index-back-link {
    position: fixed;
    bottom: 40px;
    left: 40px;
    text-decoration: none;
    color: inherit;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid currentColor;
    padding-bottom: 5px;
    opacity: 0.4;
    transition: opacity 0.3s;
    z-index: 500;
}

.index-back-link:hover { opacity: 1; }

.new-badge {
    font-size: 10px;
    background: #F5A8C0; /* Candy Pink */
    color: #2D2D2D;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1.2;
    letter-spacing: 1px;
}
