/* ══════════════════════════
   INVESTIN SIDE MENU (Ported from Bhazar.com but restyled for Investin)
   ══════════════════════════ */
.side-menu {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(15, 12, 8, 0.7);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(var(--side-menu-rgb, 212, 175, 55), 0.25);
    border-radius: 30px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.side-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: rgba(var(--side-menu-rgb, 212, 175, 55), 0.65);
    background: transparent;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    animation: sideMenuFadeIn 0.6s ease-out backwards;
}

.side-menu > a:nth-of-type(1) { animation-delay: 0.1s; }
.side-menu > a:nth-of-type(2) { animation-delay: 0.2s; }
.side-menu > a:nth-of-type(3) { animation-delay: 0.3s; }
.side-menu > a:nth-of-type(4) { animation-delay: 0.4s; }

@keyframes sideMenuFadeIn {
    0% {
        opacity: 0;
        transform: translateX(20px) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.side-menu-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* Idle icon animations — ALL sidebar icon buttons */
.side-menu > a:nth-of-type(1) svg { animation: iconBounce 2.5s ease-in-out infinite; }
.side-menu > a:nth-of-type(2) svg { animation: iconRing 3s ease-in-out infinite 0.3s; }
.side-menu > a:nth-of-type(3) svg { animation: iconFloat 2.8s ease-in-out infinite 0.6s; }
.side-menu > a:nth-of-type(4) svg { animation: iconPulse 2.5s ease-in-out infinite 0.9s; }
.side-menu > a:nth-of-type(5) svg { animation: iconWobble 3s ease-in-out infinite 0.2s; }
.side-menu > a:nth-of-type(6) svg { animation: iconBounce 2.8s ease-in-out infinite 0.5s; }

.side-menu-globe svg {
    animation: iconFloat 2.8s ease-in-out infinite !important;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    20% { transform: translateY(-5px); }
    40% { transform: translateY(0); }
    55% { transform: translateY(-3px); }
    70% { transform: translateY(0); }
}

@keyframes iconRing {
    0%, 100% { transform: rotate(0deg); }
    8% { transform: rotate(18deg); }
    16% { transform: rotate(-14deg); }
    24% { transform: rotate(10deg); }
    32% { transform: rotate(-6deg); }
    40% { transform: rotate(0deg); }
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-4px) rotate(4deg); }
    60% { transform: translateY(2px) rotate(-2deg); }
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes iconWobble {
    0%, 100% { transform: rotate(0deg) scale(1); }
    15% { transform: rotate(-10deg) scale(1.1); }
    30% { transform: rotate(10deg) scale(1.1); }
    45% { transform: rotate(-10deg) scale(1.1); }
    60% { transform: rotate(0deg) scale(1); }
}

/* HOVER: Dynamically match theme */
.side-menu-btn:hover {
    color: rgba(var(--side-menu-rgb, 212, 175, 55), 1);
    transform: scale(1.25);
}

.side-menu-btn:hover svg {
    filter: drop-shadow(0 0 8px rgba(var(--side-menu-rgb, 212, 175, 55), 0.6));
}

.side-menu-btn:active {
    transform: scale(0.95);
}

.side-menu-divider {
    width: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--side-menu-rgb, 212, 175, 55), 0.35), transparent);
    margin: 4px 0;
}

/* Language Globe & Dropdown */
.side-menu-lang {
    position: relative;
    display: flex;
    justify-content: center;
}

.side-menu-globe {
    animation: iconFloat 2.8s ease-in-out infinite !important;
    border: none !important;
    background: none !important;
}

.lang-dropdown {
    position: absolute;
    right: 46px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(15, 12, 8, 0.95);
    border: 1px solid rgba(var(--side-menu-rgb, 212, 175, 55), 0.25);
    border-radius: 8px;
    padding: 6px;
    min-width: 90px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.lang-dropdown.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.lang-option {
    display: block;
    padding: 6px 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(var(--side-menu-rgb, 212, 175, 55), 0.6);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-align: center;
}

.lang-option:hover,
.lang-option.active {
    color: #fff;
    background: rgba(var(--side-menu-rgb, 212, 175, 55), 0.25);
}

/* Mobile side menu */
@media (max-width: 768px) {
    .side-menu {
        right: 8px;
        gap: 4px;
        padding: 8px 6px;
        border-radius: 24px;
    }
    .side-menu-btn {
        width: 32px;
        height: 32px;
    }
    .side-menu-btn svg {
        width: 14px;
        height: 14px;
    }
    .side-menu-divider {
        width: 16px;
        margin: 2px 0;
    }
}
