/* ----------------------------------------
   BARRA SOCIAL FLOTANTE
   Presentación pura (sin JS). Fija al lateral izquierdo, lista vertical, color por red.
   z-index por debajo del overlay/drawer móvil (9999/10000) y del modal de Bootstrap,
   para que esos lo cubran cuando estén abiertos y no se solapen.
   Prefijo de clase propio (social-floating-bar) para no colisionar.
   ---------------------------------------- */
.social-floating-bar {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1030;
}

.social-floating-bar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.social-floating-bar__link {
    position: relative; /* ancla del tooltip */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: #ffffff;
    background-color: #2C3D85;
    border-radius: 0 10px 10px 0;
    font-size: 1.25rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

/* En hover el fondo de marca se conserva e intensifica con brightness (el degradado de
   Instagram también, porque brightness no cambia el tono). El icono se MANTIENE BLANCO:
   en _typography.css hay un `a:hover { color: var(--fe-primary) }` global (verde) que,
   por mayor especificidad que la regla base, teñiría de verde el glyph (usa currentColor);
   se neutraliza fijando color aquí con `:hover` (especificidad 0,2,0 > 0,1,1). */
.social-floating-bar__link:hover {
    color: #ffffff;
    transform: translateX(4px);
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.social-floating-bar__link:focus-visible {
    outline: 3px solid #9BB643;
    outline-offset: 2px;
}

/* Tooltip con el nombre de la red. Nace en el borde derecho del icono (left: 100%)
   y se revela saliendo hacia la DERECHA, igual para todas las redes. Texto desde
   data-tooltip del enlace; visible en hover y en foco por teclado (accesibilidad). */
.social-floating-bar__link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    margin-left: 10px;
    transform: translate(-6px, -50%);
    padding: 5px 10px;
    background-color: #2C3D85;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.social-floating-bar__link:hover::after,
.social-floating-bar__link:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
}

/* Color por red */
.social-floating-bar__link--whatsapp  { background-color: #25D366; }
.social-floating-bar__link--facebook  { background-color: #1877F2; }
/* Instagram no es color plano: degradado de marca desde la esquina inferior izquierda. */
.social-floating-bar__link--instagram {
    background: radial-gradient(circle at 0% 100%, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
}
.social-floating-bar__link--linkedin  { background-color: #0A66C2; }
.social-floating-bar__link--tiktok    { background-color: #010101; }
.social-floating-bar__link--youtube   { background-color: #FF0000; }
.social-floating-bar__link--twitter   { background-color: #000000; }

/* Móvil (mismo breakpoint que el drawer del menú): la barra pasa a ABAJO, fija al fondo,
   horizontal y a todo el ancho. Se reserva espacio con padding-bottom en el body para no
   tapar el contenido del pie. El tooltip lateral se desactiva (no aplica en horizontal).
   El overlay/drawer (z-index 9999/10000) y el modal siguen cubriéndola al abrirse. */
@media (max-width: 991.98px) {
    .social-floating-bar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
    }

    .social-floating-bar__list {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        padding: 0.5rem;
        background-color: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .social-floating-bar__link {
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }

    /* En barra horizontal inferior el tooltip lateral "sale a la derecha" no aplica. */
    .social-floating-bar__link::after {
        display: none;
    }

    body {
        padding-bottom: 64px;
    }
}
