/* ============================================================
   INTERFAZ FIJA (redes sociales + botón de WhatsApp)
   Barra fija en la esquina inferior derecha de todas las páginas.
   ============================================================ */

.interfaz-fija {
    position: fixed;
    bottom: 1.5rem;
    right: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    z-index: 100;
    pointer-events: none;
}

/* Contenedor de redes sociales en PC */
.contenedor-redes-pc {
    position: relative;
    pointer-events: auto;
}

/* Botón desplegable "Redes Sociales" para PC */
.boton-toggle-redes {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.45rem 1.15rem;
    border-radius: 999px;
    height: 42px;
    background: var(--gradiente-oscuro);
    border: 1.5px solid var(--color-acento);
    color: #ffffff;
    font-family: var(--font-serif);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 21, 85, 0.35), 0 0 12px rgba(251, 186, 0, 0.15);
    transition: transform 220ms var(--curva-salida), box-shadow 220ms var(--curva-salida), background 220ms var(--curva-salida);
    user-select: none;
}

.boton-toggle-redes i {
    color: var(--color-acento);
    font-size: 0.95rem;
    transition: transform 0.25s var(--curva-salida);
}

.boton-toggle-redes:focus-visible {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 16px 40px rgba(0, 21, 85, 0.5), 0 0 16px rgba(251, 186, 0, 0.3);
    outline: none;
}
@media (hover: hover) and (pointer: fine) {
    .boton-toggle-redes:hover {
        transform: translateY(-3px) scale(1.03);
        box-shadow: 0 16px 40px rgba(0, 21, 85, 0.5), 0 0 16px rgba(251, 186, 0, 0.3);
        outline: none;
    }
}

.boton-toggle-redes.abierto i {
    transform: rotate(180deg);
}

/* Redes sociales en PC: Ocultas por defecto, se despliegan flotando arriba del botón */
.redes-sociales-fijas {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: rgba(6, 16, 36, 0.96);
    backdrop-filter: blur(14px);
    border: 1.5px solid rgba(251, 186, 0, 0.35);
    border-radius: 18px;
    padding: 0.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 20px rgba(251, 186, 0, 0.15);
    opacity: 0;
    transform: translateY(10px) scale(0.92);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(.2,.8,.2,1), transform 0.25s cubic-bezier(.2,.8,.2,1), visibility 0.25s var(--curva-salida);
    z-index: 120;
}

.contenedor-redes-pc.redes-abiertas .redes-sociales-fijas {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
}

.boton-red-social {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--background-alt);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transition: transform 180ms var(--curva-salida), background 180ms var(--curva-salida);
}

.boton-red-social img {
    display: block;
}

.boton-red-social--facebook {
    background: #1877f2;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(24, 119, 242, 0.4);
}

.boton-red-social--instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(214, 36, 159, 0.4);
}

.boton-red-social--tiktok {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(254, 44, 85, 0.3);
}

.boton-red-social--whatsapp {
    background: #25d366;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.boton-red-social--youtube {
    background: #ff0000;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

.boton-red-social--x,
.boton-red-social--twitter {
    background: #000000;
    color: #ffffff;
}

.boton-red-social:focus-visible {
    transform: scale(1.12);
    filter: brightness(1.1);
    outline: none;
}
@media (hover: hover) and (pointer: fine) {
    .boton-red-social:hover {
        transform: scale(1.12);
        filter: brightness(1.1);
        outline: none;
    }
}

/* Estilo base compartido para botones de acción flotantes (WhatsApp) */
.boton-whatsapp-flotante,
.boton-clubes {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    padding: 0.3rem;
    border-radius: 999px;
    height: 42px;
    min-width: 175px;
    text-decoration: none;
    transform-origin: right center;
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms var(--curva-salida), border-color 220ms var(--curva-salida);
    user-select: none;
}

/* Variante WhatsApp (verde oficial): canal principal de contacto */
.boton-whatsapp-flotante {
    background: #25d366;
    border: 1.5px solid #5be58f;
    box-shadow: 0 12px 36px rgba(37, 211, 102, 0.28), 0 0 0 6px rgba(37, 211, 102, 0.08);
}

.boton-whatsapp-flotante:focus-visible {
    transform: translateY(-3px) scale(1.02);
    outline: none;
}
@media (hover: hover) and (pointer: fine) {
    .boton-whatsapp-flotante:hover {
        transform: translateY(-3px) scale(1.02);
        outline: none;
    }
}

/* Iconos e imágenes del botón */
.icono-accion-flotante,
.icono-clubes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    flex: 0 0 auto;
}

.icono-accion-flotante img,
.icono-clubes img {
    max-width: 100%;
}

.icono-accion-flotante i,
.icono-clubes i {
    font-size: 1.2rem;
    color: #ffffff;
    line-height: 1;
}

/* Tipografía de títulos */
.texto-accion-flotante,
.texto-clubes {
    font-size: 0.8rem;
    color: #ffffff;
    font-family: var(--font-serif);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Iconos Font Awesome en botones de redes sociales */
.boton-red-social i {
    font-size: 1.3rem;
    color: #ffffff;
}

/* Botón Toggle desplegable (móvil) */
.boton-desplegar-dock {
    display: none;
    pointer-events: auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: var(--gradiente-oscuro);
    border: 1.5px solid var(--color-acento);
    color: var(--color-acento);
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 14px rgba(251, 186, 0, 0.25);
    z-index: 70;
    transition: transform 0.25s var(--curva-salida), background 0.25s var(--curva-salida);
}

.icono-chevron-dock {
    font-size: 0.85rem;
    transition: transform 0.25s var(--curva-salida);
}

.boton-desplegar-dock.abierto .icono-chevron-dock {
    transform: rotate(180deg);
}

.panel-dock-desplegable {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.85rem;
}

.boton-admision-dock-movil {
    display: none;
}

/* ============================================================
   RESPONSIVE (MÓVIL - DOCK REPLEGABLE COMPACTO CON BOTÓN ^)
   ============================================================ */

@media (max-width: 768px) {
    .interfaz-fija {
        bottom: 1.1rem;
        right: 0.9rem;
        z-index: 250;
    }

    .boton-desplegar-dock {
        display: inline-flex;
    }

    .contenedor-redes-pc {
        width: 100%;
    }

    /* Ocultar botón de redes individual en celular porque la gaveta móvil maneja todo */
    .boton-toggle-redes {
        display: none;
    }

    .panel-dock-desplegable {
        position: absolute;
        bottom: calc(100% + 0.6rem);
        right: 0;
        background: rgba(6, 16, 36, 0.96);
        backdrop-filter: blur(14px);
        border: 1px solid rgba(251, 186, 0, 0.35);
        border-radius: 18px;
        padding: 1rem;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
        opacity: 0;
        transform: translateY(12px) scale(0.95);
        pointer-events: none;
        visibility: hidden;
        transition: opacity 0.25s var(--curva-salida), transform 0.25s var(--curva-salida), visibility 0.25s var(--curva-salida);
        min-width: 200px;
        align-items: center;
        gap: 0.9rem;
    }

    .interfaz-fija.abierto .panel-dock-desplegable {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
        visibility: visible;
    }

    .redes-sociales-fijas {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        visibility: visible;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        backdrop-filter: none;
        flex-direction: row;
        justify-content: center;
        gap: 0.6rem;
    }

    .acciones-flotantes-grupo {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        width: 100%;
    }

    .boton-whatsapp-flotante,
    .boton-clubes {
        width: 100%;
        min-width: 0;
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }

    .texto-accion-flotante,
    .texto-clubes {
        font-size: 0.92rem;
        display: inline !important;
    }

    .icono-accion-flotante,
    .icono-clubes {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        font-size: 1.1rem;
    }

    .boton-admision-dock-movil {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.6rem 0.9rem;
        border-radius: 12px;
        background: var(--boton-dorado);
        color: var(--color-primario);
        font-weight: 800;
        font-size: 0.92rem;
        text-decoration: none;
        box-shadow: 0 6px 16px rgba(255, 139, 0, 0.3);
    }
}