/* Panel flotante de redes sociales */
/* Salvaguarda global: evita scroll horizontal en cualquier página */
html, body {
    overflow-x: hidden;
}

.social-float {
    position: fixed;
    bottom: 20px;
    right: max(24px, env(safe-area-inset-right) + 16px); /* margen extra + safe area iOS */
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    contain: layout paint; /* aísla efectos de transform/box-shadow para no generar scroll */
    backface-visibility: hidden;
    transform: translateZ(0);
}

.social-float__btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.social-float__btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.social-float__btn:hover::before {
    transform: scale(1);
}

.social-float__btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.social-float__btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Colores específicos por red social */
.social-float__btn--youtube {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
}

.social-float__btn--youtube:hover {
    background: linear-gradient(135deg, #FF1a1a 0%, #E60000 100%);
}

.social-float__btn--instagram {
    background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #FCAF45 100%);
}

.social-float__btn--instagram:hover {
    background: linear-gradient(135deg, #9B4FC9 0%, #FF3838 50%, #FFB85C 100%);
}

.social-float__btn--facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0D5DBF 100%);
}

.social-float__btn--facebook:hover {
    background: linear-gradient(135deg, #3B8DF5 0%, #1877F2 100%);
}

.social-float__btn--email {
    background: linear-gradient(135deg, #e34028 0%, #b8321f 100%);
}

.social-float__btn--email:hover {
    background: linear-gradient(135deg, #e85540 0%, #e34028 100%);
}

/* Animación de entrada */
.social-float--animate {
    animation: fadeInUp 0.6s ease-out;
}

.social-float--no-anim {
    animation: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .social-float {
        bottom: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .social-float__btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Reducir tamaño en pantallas muy pequeñas */
@media (max-width: 480px) {
    .social-float {
        bottom: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .social-float__btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* Asegurar que esté por encima de todo */
.social-float {
    pointer-events: auto;
}

.social-float__btn {
    pointer-events: auto;
}

/* Accesibilidad: focus visible */
/* Accesibilidad: focus sin generar overflow */
.social-float__btn:focus,
.social-float__btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.75), 0 6px 20px rgba(0,0,0,0.25);
}

.social-float__btn:focus:not(:focus-visible) {
    outline: none;
}
