﻿.jk-social {
    --icon: 32px;
    --expand: 130px;
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.jk-social .social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jk-social .social-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    background: transparent !important;
}

.jk-social .social-container {
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease-out;
    width: var(--icon);
    height: var(--icon);
}

.jk-social .social-icon {
    width: var(--icon);
    height: var(--icon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    position: absolute;
    left: 0;
    z-index: 3;
    border-radius: 4px;
    transition: all 0.4s ease-out;
}

.jk-social .social-slider {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    transition: all 0.4s ease-out;
    z-index: 1;
}

.jk-social .social-label {
    color: #A7C7FF;
    padding: 0 10px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease-out;
    position: absolute;
    left: 8px;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* === HOVER EFFECTS === */
.jk-social .social-link:hover .social-container {
    width: var(--expand);
}

.jk-social .social-link:hover .social-slider {
    width: var(--expand);
}

.jk-social .social-link:hover .social-icon {
    transform: translateX(calc(var(--expand) - var(--icon))) scale(1.05);
}

.jk-social .social-link:hover .social-label {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.15s;
}

/* === PLATFORM COLORS === */
.jk-social .social-link[data-platform="Facebook"] .social-icon {
    background: #3b5998 !important;
}

.jk-social .social-link[data-platform="Twitter"] .social-icon {
    background: #181818 !important;
}

.jk-social .social-link[data-platform="YouTube"] .social-icon {
    background: #ff0000 !important;
}

.jk-social .social-link[data-platform="Instagram"] .social-icon {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
}

.jk-social .social-link[data-platform="LinkedIn"] .social-icon {
    background: #0077b5 !important;
}

.jk-social .social-link[data-platform="GitHub"] .social-icon {
    background: #333 !important;
}

.jk-social .social-link[data-platform="TikTok"] .social-icon {
    background: #000000 !important;
}

.jk-social .social-link[data-platform="WhatsApp"] .social-icon {
    background: #25D366 !important;
}

/* Default platform color */
.jk-social .social-icon {
    background: #666 !important;
}

    .jk-social .social-link::before,
    .jk-social .social-link::after,
    .jk-social .social-container::before,
    .jk-social .social-container::after,
    .jk-social .social-icon::before,
    .jk-social .social-icon::after {
        content: none !important;
        background: none !important;
        box-shadow: none !important;
        filter: none !important;
    }

/* === RESPONSIVE & MOBILE SIDEBAR INTEGRATION === */
@media (max-width: 768px) {
    /* 1. If placed INSIDE the mobile nav menu, make it a horizontal row */
    .nav-menu .jk-social {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        padding: 20px 0;
        margin-top: 10px;
        display: flex;
        justify-content: center;
        border-top: 1px solid rgba(0,0,0,0.05);
    }

        .nav-menu .jk-social .social-links {
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            gap: 12px;
        }
        /* Disable expand effect and make icons circular/square inside the menu */
        .nav-menu .jk-social .social-link {
            width: auto;
            margin: 0;
            padding: 0;
        }

        .nav-menu .jk-social .social-container {
            width: 36px !important;
            height: 36px !important;
            border-radius: 8px;
            box-shadow: none;
        }

        .nav-menu .jk-social .social-icon {
            width: 36px;
            height: 36px;
            font-size: 16px;
            border-radius: 8px;
            position: relative;
            transform: none !important;
        }

        .nav-menu .jk-social .social-label,
        .nav-menu .jk-social .social-slider {
            display: none !important;
        }
    /* Hide labels on mobile menu */
    /* 2. Hide the original floating widget (the one outside the menu) when the mobile menu is open */
    body.menu-open .jk-social:not(.nav-menu .jk-social) {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    /* Default fallback for the floating version on mobile (when menu is closed) */
    .jk-social {
        --icon: 28px;
        --expand: 115px;
        left: 8px;
    }

        .jk-social .social-label {
            font-size: 0.75rem;
            left: 6px;
            padding: 0 8px;
        }
}

@media (max-width: 480px) {
    .jk-social {
        --icon: 24px;
        --expand: 100px;
        left: 5px;
    }

        .jk-social .social-label {
            font-size: 0.7rem;
            left: 4px;
            padding: 0 6px;
        }
}