/* ====================
   PANEL FLOTANTE SOCIAL
   ==================== */
.social-panel {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 15px 15px 0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
    padding: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: none;
    max-height: 90vh;
    overflow: hidden;
}

    /* Estado oculto */
    .social-panel.hidden {
        transform: translateY(-50%) translateX(-150px);
        background: transparent;
        box-shadow: none;
        border: none;
        pointer-events: none; /* Evita que interfiera con clics */
    }

        .social-panel.hidden .social-toggle {
            transform: translateX(150px);
            pointer-events: auto; /* El botón sigue siendo clickeable */
        }

        .social-panel.hidden .social-content {
            opacity: 0;
            max-height: 0;
            padding: 0 18px;
            min-width: 0;
            overflow: hidden;
            background: transparent;
            box-shadow: none;
            border: none;
            pointer-events: none; /* Evita clics en contenido oculto */
        }

/* Botón de toggle */
.social-toggle {
    min-width: 45px;
    height: 65px;
    border: none;
    background: linear-gradient(135deg, #1a3a5c, #2c5a8c);
    color: white;
    cursor: pointer;
    border-radius: 0 10px 10px 0;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

    .social-toggle:hover {
        background: linear-gradient(135deg, #2c5a8c, #1a3a5c);
        transform: scale(1.05);
    }

    .social-toggle i {
        transition: transform 0.4s ease;
    }

/* Rotar icono cuando está oculto */
.social-panel.hidden .social-toggle i {
    transform: rotate(180deg);
}

/* Contenido del panel */
.social-content {
    padding: 15px 18px;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.4s ease;
    opacity: 1;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 15px 15px 0;
}

    /* Scrollbar personalizada */
    .social-content::-webkit-scrollbar {
        width: 3px;
    }

    .social-content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .social-content::-webkit-scrollbar-thumb {
        background: #1a3a5c;
        border-radius: 10px;
    }

    .social-content h3 {
        font-size: 13px;
        color: #1a3a5c;
        margin: 0 0 5px 0;
        font-weight: 700;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        text-align: center;
        border-bottom: 2px solid #e0e0e0;
        padding-bottom: 8px;
        width: 100%;
    }

.social-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: all 0.3s ease;
    background: transparent;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
}

    .social-link img {
        width: 28px;
        height: 28px;
        object-fit: contain;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }

    .social-link:hover {
        background: rgba(26, 58, 92, 0.08);
        transform: translateX(3px);
    }

        .social-link:hover img {
            transform: scale(1.1);
        }

    .social-link .link-text {
        font-size: 12px;
        color: #555;
        transition: color 0.3s ease;
    }

    .social-link:hover .link-text {
        color: #1a3a5c;
        font-weight: 600;
    }

/* Responsive para tablet y móvil */
@media (max-width: 992px) {
    .social-panel {
        top: auto;
        bottom: 90px;
        transform: none;
        border-radius: 12px 0 0 12px;
        right: 0;
        left: auto;
        max-height: 70vh;
        background: transparent;
        box-shadow: none;
        border: none;
        overflow: visible; /* Permite que el contenido sea visible cuando está abierto */
    }

        .social-panel.hidden {
            transform: translateX(0px);
            background: transparent;
            box-shadow: none;
            border: none;
            pointer-events: none;
        }

            .social-panel.hidden .social-toggle {
                transform: translateX(0px);
                pointer-events: auto;
            }

            /* Cuando está oculto, solo mostramos el botón y ocultamos el contenido */
            .social-panel.hidden .social-content {
                display: none !important;
                opacity: 0;
                max-height: 0;
                padding: 0;
                margin: 0;
                width: 0;
                min-width: 0;
                overflow: hidden;
                border: 0;
                box-shadow: none;
                background: transparent;
            }

    .social-toggle {
        border-radius: 10px 0 0 10px;
        height: 50px;
        min-width: 40px;
        font-size: 18px;
        box-shadow: -3px 0 15px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 2;
        margin-left: auto; /* Empuja el botón a la derecha */
    }

    .social-content {
        min-width: 130px;
        padding: 12px 14px;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 12px 0 0 12px;
        box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-right: none;
        opacity: 1;
        max-height: 80vh;
        transform: scale(1);
        transition: all 0.4s ease;
        position: relative;
        z-index: 1;
    }

        .social-content h3 {
            font-size: 11px;
            margin-bottom: 5px;
        }

    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .social-link {
        padding: 4px 8px;
        flex-direction: column;
        gap: 3px;
        min-width: 45px;
    }

        .social-link img {
            width: 24px;
            height: 24px;
        }

        .social-link .link-text {
            font-size: 9px;
            display: block;
        }

        .social-link:hover {
            transform: translateY(-2px);
        }
}

@media (max-width: 576px) {
    .social-panel {
        bottom: 75px;
        max-height: 60vh;
    }

    .social-content {
        min-width: 100px;
        padding: 10px 10px;
    }

        .social-content h3 {
            font-size: 10px;
            padding-bottom: 5px;
        }

    .social-link {
        padding: 3px 5px;
        min-width: 40px;
    }

        .social-link img {
            width: 20px;
            height: 20px;
        }

        .social-link .link-text {
            font-size: 8px;
        }

    .social-toggle {
        height: 40px;
        min-width: 32px;
        font-size: 14px;
    }
}
